OSDN Git Service

Split BluetoothSettings into two pages
authorjackqdyulei <jackqdyulei@google.com>
Wed, 10 May 2017 21:57:16 +0000 (14:57 -0700)
committerjackqdyulei <jackqdyulei@google.com>
Mon, 22 May 2017 23:57:37 +0000 (16:57 -0700)
commit52ccb49fbe65c8e84a5d4fde1d8028b62a713204
tree06666ebc721f1bb5b8c39743a4a9fcdd58984707
parent5333ecd1fb630ad5bc4211c0db4eb2d32e5859f9
Split BluetoothSettings into two pages

This cl splits the BluetoothSettings into paired device page and
pairing page, including small changes about:
1. Refactor the pages so they could get as much as static preference
from xml file rather than dynamically add/remove them everytime.
2. Remove creating method in BluetoothDeviceNamePreferenceController
and add it in xml file
3. Create BluetoothPairingDetail page, basically move the logic from
BluetoothSettings.
4. Make pairing preference clickable and jump to BluetoothPairingDetail
5. Add and update bunch of tests

Bug: 35877041
Test: RunSettingsRoboTests
Change-Id: Ief9e9690c612f7b46c58e866e5cecc511af642c8
14 files changed:
res/values/strings.xml
res/xml/bluetooth_pairing_detail.xml [new file with mode: 0644]
res/xml/bluetooth_settings.xml
src/com/android/settings/bluetooth/BluetoothDeviceNamePreferenceController.java
src/com/android/settings/bluetooth/BluetoothPairingDetail.java [new file with mode: 0644]
src/com/android/settings/bluetooth/BluetoothPairingPreferenceController.java
src/com/android/settings/bluetooth/BluetoothSettings.java
src/com/android/settings/bluetooth/DeviceListPreferenceFragment.java
src/com/android/settings/bluetooth/DevicePickerFragment.java
tests/robotests/assets/grandfather_not_implementing_index_provider
tests/robotests/src/com/android/settings/bluetooth/BluetoothPairingDetailTest.java [new file with mode: 0644]
tests/robotests/src/com/android/settings/bluetooth/BluetoothPairingPreferenceControllerTest.java
tests/robotests/src/com/android/settings/bluetooth/BluetoothSettingsTest.java
tests/robotests/src/com/android/settings/bluetooth/DeviceListPreferenceFragmentTest.java [new file with mode: 0644]