summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/bluetooth/BluetoothDeviceUpdater.java
Commit message (Collapse)AuthorAgeFilesLines
* Migrate Settings to androidx.Aurimas Liutikas2018-04-201-2/+2
| | | | | | Test: make Settings Bug: 76692459 Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
* Merge "Implement audio switch UI" into pi-devTreeHugger Robot2018-04-161-4/+28
|\
| * Implement audio switch UIhughchen2018-04-151-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | Show only 1 entry for hearing aid devices without killing the activity.Isha Bobra2018-04-131-1/+6
|/ | | | | | | | | | | | | | | | | 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
* Rename onProfileAudioStateChanged() to onAudioModeChanged()timhypeng2018-04-101-1/+1
| | | | | | Bug: 74134939 Test: Build Change-Id: I85895238b6ee16fec85d0cf3dd0242c9ba17a3bd
* Add callback onProfileAudioStateChanged()ryanywlin2018-03-301-0/+4
| | | | | | Bug: 74134939 Test: Build Change-Id: I2a7e837703b66e1798679c65afab7dc6572c295e
* Add search index provider for bt pageLei Yu2018-03-211-2/+2
| | | | | | | | | | | | | 1. Implement the search index provider for ConnectedDeviceDashboardFragment. 2. Since in SEARCH_INDEX_DATA_PROVIDER fragment is null, so we need to pass in context to all components instead of getting it from fragment. 3. Update test for it as well as creating new shadow. Change-Id: If0aa67d5b6ca207c6b728c8355581bf414577091 Fixes: 69333961 Test: RunSettingsRoboTests
* Move the setActiveDevice logic from Settings to SettingsLib (2/2)Hansong Zhang2018-03-201-22/+1
| | | | | | | | | | Currently the Settings app handles the logic of setting active device; however, this should be handled by SettingsLib so the logic can be shared. Bug: 75984255 Test: robolectric test Change-Id: I5742de1463d156ff29708ea2aecfc3fd00795e9e
* Update the Bluetooth Active Device state in the Device ManagerPavlin Radoslavov2018-02-231-8/+0
| | | | | | | | | | | The Bluetooth Active Device state should be updated for all CachedBluetoothDevice entries. This should be done inside CachedBluetoothDeviceManager in SettingsLib instead of BluetoothDeviceUpdater in the Settings app. Bug: 72316092 Test: Manual - two headsets and switching the active device Change-Id: If379bb0853dcd78385430cf14192e9adfae4ecd0
* Migrate more settings to use SubSettingsLauncherFan Zhang2018-02-181-8/+10
| | | | | | Bug: 73250851 Test: robotests Change-Id: I08f6f380489646231d6d8ceb1488e2efb036bf69
* Add Settings support for Bluetooth Multi-A2DP and Multi-HFPPavlin Radoslavov2018-01-221-0/+53
| | | | | | | | | | | | When there are multiple connected A2DP/HFP devices, if a connected device's name is clicked on, that device will be chosen as Active - i.e., it will be the device chosen for audio out / phone call. Test: Manual: multiple connected A2DP devices, and selecting each as the Active Device. Bug: 64767509 Change-Id: Iee76286110ed87703d6a968f50273c22cd7c7086
* Tweak bluetooth text alignmentjackqdyulei2018-01-171-1/+0
| | | | | | | | | | 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
* Add summary placeholder for bt preferencejackqdyulei2017-12-221-0/+1
| | | | | | | | Then UI won't be janky(as everything slide down a little bit) Bug: 63910184 Test: RunSettingsRoboTests Change-Id: Ie4074694f54af92da52f09d2caaab5490fa73647
* Add preference group for saved devcies.jackqdyulei2017-11-271-1/+14
| | | | | | | | Currently it only contains bluetooth devices. Bug: 3240835 Test: RunSettingsRoboTests Change-Id: Ief102e7174a4c4610dbda6b728419b303ff928f9
* Add infrastructure for connected device group.jackqdyulei2017-11-211-0/+181
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