summaryrefslogtreecommitdiffstats
path: root/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java
diff options
context:
space:
mode:
authorJason Monk <jmonk@google.com>2015-02-04 13:00:55 -0500
committerJason Monk <jmonk@google.com>2015-03-02 10:40:21 -0500
commitbe3c5dbee66758517a8198f98ed2e20c80af326b (patch)
tree24cf7c862730a2f530710e9aaae33f52d932ee64 /packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java
parentc94ea96cb77b27d93e675912b2420bd43ae9b8fe (diff)
downloadframeworks_base-be3c5dbee66758517a8198f98ed2e20c80af326b.zip
frameworks_base-be3c5dbee66758517a8198f98ed2e20c80af326b.tar.gz
frameworks_base-be3c5dbee66758517a8198f98ed2e20c80af326b.tar.bz2
Make QS use SettingsLib's BT code
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
Diffstat (limited to 'packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java')
-rwxr-xr-xpackages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java
index 65db95f..a9f4bd3 100755
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java
@@ -35,9 +35,11 @@ public final class CachedBluetoothDeviceManager {
private Context mContext;
private final List<CachedBluetoothDevice> mCachedDevices =
new ArrayList<CachedBluetoothDevice>();
+ private final LocalBluetoothManager mBtManager;
- CachedBluetoothDeviceManager(Context context) {
+ CachedBluetoothDeviceManager(Context context, LocalBluetoothManager localBtManager) {
mContext = context;
+ mBtManager = localBtManager;
}
public synchronized Collection<CachedBluetoothDevice> getCachedDevicesCopy() {
@@ -88,6 +90,7 @@ public final class CachedBluetoothDeviceManager {
profileManager, device);
synchronized (mCachedDevices) {
mCachedDevices.add(newDevice);
+ mBtManager.getEventManager().dispatchDeviceAdded(newDevice);
}
return newDevice;
}