Use different key (prefix + CacheBluetooothDevice hash) for
each BluetoothDevicePreference to avoid Java crash due to "Two different
ViewHolders have the same change ID".
Test: atest
Fix: 325831741
Flag: EXEMPT safe fix only change preference key string
Change-Id: Ic993f3cab206b794045c2f46e6b4b376bfa3adea
* BaseHearingDevicePreferenceController will also be used in "Hearing devices", so extract to parent class first.
Bug: 237625815
Test: make RunSettingsRoboTests ROBOTEST_FILTER="(SavedHearingDeviceUpdaterTest|BaseBluetoothDevicePreferenceControllerTest|BluetoothDeviceUpdaterTest|AvailableMediaBluetoothDeviceUpdaterTest|ConnectedBluetoothDeviceUpdaterTest|SavedBluetoothDeviceUpdaterTest)"
Change-Id: I8a492866f48e3a664b9ff78bce5a4f082c0dc465
Before this CL, bluetooth settings update the battery level of earbuds
when receiving first pair status callback. But sometimes the callback
will not send immediately cause the battery level is inconsistent.
This CL will update the earbuds battery level when onResum() to refresh
battery level immediately.
Bug: 174929347
Bug: 159544311
Test: make -j42 RunSettingsRoboTests
Change-Id: I8505f8fed4ec821b9fa2d88bc437bddd7a30f0e2
- support tapping to activate for all available media devices including
Hearing aid and Headset
- support tapping to connect for previously connected devices
Bug: 149667096
Test: robotest
Change-Id: I25f74b1b20fbb1876200a561775aa675ff60ac37
Add two type SortType.TYPE_DEFAULT and SortType.TYPE_FIFO in BluetoothDevicePreference.
It needs to decide the sort type when you create the BluetoothDevicePreference.
TYPE_DEFAULT - According to the CacheBluetoothDevice state to sort
TYPE_FIFO - According to the timestamp to sort
Bug: 112546918
Test: make -j42 RunSettingsRoboTests
Change-Id: Icd25d9b76a44d5a105f8daf64e5bc1f9ead8cd92
The issue is happened when BT is disabled then navigate to
"Connected devices". BluetoothDeviceUpdater didn't update
UI when BT is disabled. Remove all device from preference when
BT is disabled.
Bug: 80090956
Test: make -j42 RunSettingsRoboTests
Change-Id: Ia1fd8cfbcf95d712a1a702fdf101ff98186b76cd
The resources available to tests are now exactly the merged resources
located in the APK under test.
Bug: 74359828
Test: make -j56 RunSettingsRoboTests
Change-Id: I050db81a92decefea23314b5ec7a62f77ff4bb2b
-handle UI updating when sub device connection state changes
-add test case
Bug: 112735753
Test: make -j42 RunSettingsRoboTests
Change-Id: Ie2643657c47a0956aac3f8cac4bfdbdea0399ce8
This method check whether it has connected profile, not physical
connection between devices.
It make more sense to use it in settings:
1. We only care about whether it has active profile(i.e. A2dp, hfp..)
2. Sometime when profile is disconnected, BluetoothDevice.isConnected()
still return true. This may make UI flaky.
Bug: 79947085
Test: RunSettingsRoboTests
Change-Id: I44039704508a742c7a8aef0a035afcf169b08939
Having consistent import order will reduce chance of merge
conflict between internal and external master
Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
1. Clear connected Bluetooth device from preference when Bluetooth state
is off.
2. Do not force to update the list of Bluetooth device when Bluetooth is
disable.
3. Add test to verify following situations:
1. Do not force to update the list of Bluetooth device when Bluetooth
is disable.
2. Force to update the list of Bluetooth device when Bluetooth is
enable.
3. Force to update the list of Bluetooth device when Bluetooth state
is on.
4. Clear the connected Bluetooth device from preference when
Bluetooth state is off.
Bug: 110178164
Test: make -j42 RunSettingsRoboTests
Change-Id: I8b17c5d761e010e4eab620355c8b9185543e85ed
- Add LocalBluetoothManager null check for device that
not support Bluetooth
- Add test to verify when LocalBluetoothManager is null
will not crash
Bug: 110712414
Test: make -j42 RunSettingsRoboTests
Change-Id: Ib506a0206cfcfdfec60bdfcf9a1944338a7ab729
* Implement available media devices group
* Add AvailableMediaDeviceGroupController to realize UI, the user can see the all device that can be activated in this group.
* ConnectedDeviceGroupController change to show the device that cannot be activated but is connected.
* Refactoring the below class, implement the controller in connected_devices.xml.
ConnectedDeviceGroupController.java
SavedDeviceGroupController.java
ConnectedDeviceDashboardFragment.java
connected_devices.xml
* Add AvailableMediaBluetoothDeviceUpdaterTest to verify the add/remove preference behavior when connectedStateChanged or profileAudioStateChanged
* Add test that used to verify device is connected or not in BluetoothDeviceUpdaterTest.
* Add test that used to verify the add/remove preference behavior when connectedStateChanged or profileAudioStateChanged in ConnectedBluetoothDeviceUpdaterTest.
* Add AvailableMediaDeviceGroupControllerTest to verify bluetooth feature is supported or not and test register callback.
* Add test that used to verify bluetooth feature is supported or not and test register callback in ConnectedDeviceGroupControllerTest.
* Add test that used to verify bluetooth feature is supported or not and test register callback in SavedDeviceGroupControllerTest
Bug: 74134939
Test: make -j40 RunSettingsRoboTests
Change-Id: I54d03c2ddadc6a4be7519dd74cdbcb5055d44083
This CL tries to detect Bluetooth hearing aid devices and tries to
combine the entry of the hearing aids with the same HiSyncIds and
show only 1 entry for each pair in the connected devices list.
This CL also shows 2 battery status in the device details page.
This change shows the combined entry after a user returns to the
settings activity after pressing the back button or somehow
without killing it. It also combines the entries just after pairing.
Test: RunSettingsRoboTests
Bug: 74204427
Change-Id: I47fb0bdd96b1cc972d88a4aef85d0113985d63bb
This allows Settings to test against the latest framework changes.
Also replaced TestConfig with traditional robolectric.properties.
Bug: 73173204
Bug: 73892008
Test: make -j56 RunSettingsRoboTests
Change-Id: I3135b4fa5f095ba79b282a76f45dd9baa2584bc7
1. Remove the placeholder summary so it won't show blank summary
2. Update settings_entity_header to make text center_vertical,
so it could align with the icon.
Bug: 71742145
Test: Screenshot
Change-Id: I185114a4e0c8d996f218075a8633e802fabf3c66
Then UI won't be janky(as everything slide down a little bit)
Bug: 63910184
Test: RunSettingsRoboTests
Change-Id: Ie4074694f54af92da52f09d2caaab5490fa73647
The core thing is to find out a way to update group when devices
(bt device and usb device)are updated.
The infrastructure contains three parts:
1. ConnectedDeviceController
Normal PreferenceController. Get info from sub controller and update
the preferenceGroup.
2. BluetoothDeviceUpdater
Listen to bluetooth callback, decide whether to add/remove devices
3. DevicePreferenceCallback
Interface to add/remove preference. This interface will be used in
ConntectedDeviceController and future SavedDeviceController
Bug: 69333961
Test: RunsettingsRoboTests
Change-Id: I85a9ef216a801d5f0dd1cf0130d53850a68be4bd