summaryrefslogtreecommitdiff
path: root/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothAdapter.java
Commit message (Collapse)AuthorAgeFilesLines
* Merge "[API Review] Replace usage of getUuids by new SystemApi" am: ↵Etienne Ruffieux2022-03-171-1/+4
|\ | | | | | | | | | | | | | | e2b00d3a7d am: 1de1157d4e am: 520a6e5a9b Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2020438 Change-Id: I20adac33682b4647fd1906f80dbed55a4476325c
| * [API Review] Replace usage of getUuids by new SystemApiEtienne Ruffieux2022-03-101-1/+4
| | | | | | | | | | | | | | Bug: 223253153 Test: build Tag: #feature Change-Id: I8b75a774cb05863b340de0fff83130e7ab9d3891
* | Refactor Bluetooth scan mode APIsEtienne Ruffieux2021-11-161-2/+6
|/ | | | | | | | | | | | Removed setScanMode(int, long), setScanMode(int mode) is now a SystemApi. Made getDiscoverableTimeout a public API. setDiscoverableTimeout is now SystemApi and takes java.time.Duration as parameter. Tag: #feature Bug: 195150096 Test: Manual Change-Id: I824b24464987e1db87efc193d30452a6d9d0411e
* Resolve BluetoothA2dpSink APIs used by SettingsRahul Sabnis2019-12-131-1/+1
| | | | | | Bug: 146082017 Test: Manual Change-Id: Iebae62408c490cb9091b1f4e4a5a5e32321e2700
* Merge "Remove A2DP connect logic from settingslib" am: bd249a19bb am: 2b614b6ea9Chienyuan2018-08-161-4/+0
|\ | | | | | | | | | | am: 1bc55c7df5 Change-Id: Ib571b93298c46885d90672dc9330ea67f90d053f
| * Remove A2DP connect logic from settingslibChienyuan2018-08-091-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | A2dpProfile will disconnect current device when receive connect event and max connectable device is one. Ideally we shouldn't have any bluetooth code in settingslib. The corresponding logic is moved to the Bluetooth A2dpService. Bug: 111812003 Test: 1. Developer options > Maxium connected Bluetooth device > 1. 2. Connected 2 BT Headset respectively Change-Id: I298c39942756523b8a2b34a4104bcd247d2455eb
| * Disable Hearing Aid Profile for all platforms except PixelsStanley Tng2018-04-301-0/+5
| | | | | | | | | | | | | | | | | | | | | | Add code to selectively disable Hearing Aid Profile depending on the config.xml file. Note: Cherry-picked from internal branch. Bug: 78142728 Test: Manual Pairing on various Pixel phones Change-Id: I8094f1a1665647b026eb9601e032fb7fbb816ec6 (cherry picked from commit a21efa58369b304e5ea818a3f8b1577f1fed3d02)
* | Mark LocalBluetoothAdapter as obsoleteChienyuan2018-08-031-0/+3
| | | | | | | | | | | | | | | | | | Most of its API can replace by BluetoothAdapter directly. In Q, we should remove it and use BluetoothAdapter instead. Bug: 111810977 Test: build pass Change-Id: Ibea3a5e7a14f356f0df6706bfa81c9360a074020
* | Rename the Utils class in settingslib.bluetoothKunhung Li2018-05-181-1/+1
| | | | | | | | | | | | | | | | Make it more unique to speficy related bluetooth, so change class name from Utils to BluetoothUtils. Bug: 78676509 Test: atest RunSettingsLibRoboTests Change-Id: I83baf214fef125a2c2b9bb2526d11f0c8838a82c
* | Disable Hearing Aid Profile for all platforms except PixelsStanley Tng2018-04-261-0/+5
|/ | | | | | | | | Add code to selectively disable Hearing Aid Profile depending on the config.xml file. Bug: 78142728 Test: Manual Pairing on various Pixel phones Change-Id: I8094f1a1665647b026eb9601e032fb7fbb816ec6
* Fix ANR due to long wait for synchronization lockGurpreet Ghai2018-01-301-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | Use Case: Repeated BT ON/OFF Failure: ANR occurs due to UI wait for long time waiting to acquire thread lock. Steps: Repeated BT ON/OFF Root Cause: The synchronized function that updates state also read paired devices as an additional operation. When the number of devices is cached list is large, the block time for other threads waiting for same lock tends to increase causing ANR. Fix: Limited the synchronized block to the part where actual update of local state takes place. Test: SNS Testing Bug: 35412140 Change-Id: I69ff9f8a032b3772bf3d048d8db70181319ad31d
* Add Settings support for Bluetooth Multi-A2DP and Multi-HFPPavlin Radoslavov2018-01-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | 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. Also: * Listen to the BluetoothA2dp.ACTION_ACTIVE_DEVICE_CHANGED and BluetoothHeadset.ACTION_ACTIVE_DEVICE_CHANGED intents and update the the status of the current active device. * When connecting a new device, and Multi-A2DP is enabled, don't disconnect the currently connected device. * Update the implementation of isA2dpPlaying() so it correctly checks all connected devices, not only the first one. Test: Manual: multiple connected A2DP devices, and selecting each as the Active Device. Bug: 64767509 Change-Id: I69f3c85ebf5a7f07f6deed484c6dd65705460ae4 Merged-In: I69f3c85ebf5a7f07f6deed484c6dd65705460ae4 (cherry picked from commit 1af33a192614bb490701ab2e8e21866690b3b4fa)
* Add method to get bluetooth macjackqdyulei2017-05-041-0/+4
| | | | | | Bug: 35875420 Test: Build Change-Id: I2b4de320a89d466752708121b7e73676e455cde9
* Merge "Bluetooth: add getDiscoveryEndMillis() call" am: 1785fc4eea am: ↵Marie Janssen2017-01-301-0/+4
|\ | | | | | | | | | | | | | | 7f8d8638eb am: ca312c1cd3 am: 9eb3d7e335 Change-Id: I45a29862c9a841b68bee41daff1d8e46145cbd79
| * Bluetooth: add getDiscoveryEndMillis() callMarie Janssen2017-01-271-0/+4
| | | | | | | | | | | | | | | | | | Method to tell when the adapter finished (or will finish) being in discovery mode. Test: compiles and still can scan Bug: 34395439 Change-Id: I41b48c2b934c0a1d5e1727cec08f3f762e3cb309
* | Make classes non-final so mockito can mock them.Fan Zhang2016-12-271-1/+1
|/ | | | | | Bug: 33341275 Test: RunSettingsRoboTests Change-Id: If83180d7caf3af29c9d0dcdc20d557d8d9827c74
* While turning OFF do not honor ON requests.Sanket Agarwal2016-05-191-1/+2
| | | | | | | | | | | | | | | | Native stack does not handle being put from OFF -> ON state without doing a complete cleanup. Hence instead of going from start -> ON -> OFF -> cleanup it goes start -> ON -> OFF ->ON -> ... usually leads to race conditions down the road in native. This patch is a workaround so that we can throw away the requests if we are in currently "turning off" phase. The side-effect would be that user will need to turn it ON again. The race happens when the turn OFF time is longer but usually it is found to be close to order of seconds hence the wait should be bounded. Bug: b/28318203 Change-Id: I14f6633f31311e5b561e1dcbc8a9d6d2a5dd6fdc
* Add support for AVRCP 1.3.Sanket Agarwal2016-01-141-0/+4
| | | | | | | | | | | | | | | | | | | * Add metadata support. * Add player settings support. * Add playback support. A2DP Settings App support. Bluetooth: A2DP Sink support for Settings App - add support for A2DP Sink in Settings App. This will enable connection initiation and updation on Settings App - add framework Apis to support A2DP Sink. Any third party Apps can access A2DP Sink priority of device and playing state of device - add support for key to set priority. This manages priority of device for A2DP Sink profile Change-Id: If5f9139f37cdb9d200387877c7801075205c78a0
* Add SystemUI component to watch for keyboard attachment.Michael Wright2015-10-121-0/+5
| | | | | | | | | | | Add a new SystemUI component to watch for keyboard attachment / detachment. If the config specifies the name of a keyboard that is packaged with the device, then SystemUI will ask the user if they would like to enable BT (if disabled) and then attempt to pair to the device. Bug: 22876536 Change-Id: I786db35524d49706d5e61d8b8bc71194d50113f3
* Add ability to get device by addressJason Monk2015-06-021-0/+4
| | | | | Bug: 21444336 Change-Id: I003092a12e93e2eccab736e7da20a6a23df30bbf
* Make QS use SettingsLib's BT codeJason Monk2015-03-021-0/+4
| | | | | | | | | | | A couple of changes needed to be made to SettingsLib to support this. - SettingsLib needed to track ACTION_CONNECTION_STATE_CHANGED - The summary code needed to move from Settings up into SettingsLib - Added a getMaxConnectionState to CachedBluetoothDevice - This simplifies the states of all of the profiles into one. Change-Id: I7f828f0038ad0cf39274986ece6d486d545f0286
* Move non-ui bt settings code to SettingsLibJason Monk2015-02-051-0/+216
Mostly this is moving classes from Settings to SettingsLib but there were a few changes to support this separation. - A bunch of things became public rather than package - Moved some settings only code out of these classes - Added error callback to handle errors To see the changes from original classes view the diff against patch-set 1. Bug: 19180466 Change-Id: I69fd888362c6dbb325f6113b32c4b15cc6a23a41