summaryrefslogtreecommitdiff
path: root/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothManager.java
Commit message (Collapse)AuthorAgeFilesLines
* Makes LocalBluetoothManager multi-user aware.jovanak2018-10-251-11/+38
| | | | | | | | | | | | | | | | | | It enables LocalBluetoothManager to receive broadcasts for a specific UserHandle, not just the one that created it, by exposing an additional create method. To pass in UserHandle different from the one returned in context.getUser(), one must have INTERACT_ACROSS_USERS_FULL permission. Should be used by singletons with adequate permissions to be able to monitor bluetooth state across all users. For monitoring the state across all users, pass in UserHandle.ALL. Change-Id: Id89d73b05bfebc2f9e8673c5610b3ff8f70dba0c Fixes: 117517726 Test: working on them
* Remove BluetoothEventManager#setReceiverHandlerAmin Shaikh2018-08-291-4/+17
| | | | | | | | | Make BluetoothEventManager fields final and remove the method to unregister receivers unnecessarily (introduced in b/35415158). Bug: 113122466 Test: runtest systemui && make RunSettingsLibRoboTests Change-Id: I8f34ab1a809638959ab4096a829c72b3d1ac3a23
* Fix crash in CachedBluetoothDevice.jackqdyulei2018-08-281-0/+2
| | | | | | | | | | | | | | | In LocalBluetoothProfileManager, we will update profiles in constructor by register service callback to bluetooth profiles. So the callback may return before this constructor, in which case mBluetoothProfileManager maybe null in LocalBluetoothMangaer. This cl moves the updateLocalProfiles() out of the constructor, to make sure we will first construct mBluetoothProfileManger and then connect to bluetooth profiles. Change-Id: I93a388cf0598555d26181a6b0da99dcb35f227dd Fixes: 113290231 Test: RunSettingsRoboTests
* Fix memory leak in ApplicationStatesFan Zhang2018-06-081-4/+8
| | | | | | | | | | | - Use app context in dreambackend - Use WeakReference in LocalBluetoothManager to track foreground activity - Use WeakReference in ApplicationsState to track active sessions Bug: 109894607 Test: hprof Change-Id: I0e868182a364efbd110eb77ebd6cdbd83f164669
* Read paired device After LocalBtManager is createdjackqdyulei2017-12-221-0/+1
| | | | | | | | | | | | | After this cl, it could guarantee that device list always has saved devices: 1. Even though in onCreate(Fix flaky UI) 2. Even though there is no other bluetooth event to trigger it (e.g. no device is connecting) Fixes: 70934171 Fixes: 63910184 Test: Build Change-Id: Iec628d455690a68d92f201f6eac9cd97b555b2b4
* Make classes non-final so mockito can mock them.Fan Zhang2016-12-271-1/+1
| | | | | | Bug: 33341275 Test: RunSettingsRoboTests Change-Id: If83180d7caf3af29c9d0dcdc20d557d8d9827c74
* Make QS use SettingsLib's BT codeJason Monk2015-03-021-1/+1
| | | | | | | | | | | 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/+122
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