Refreshing Bluetooth devices will clear all available devices.
Bug: 16851309 Change-Id: I9ffb1ddaeb8e785be145ea79467fc361a022d8d7
This commit is contained in:
@@ -86,7 +86,9 @@ final class CachedBluetoothDeviceManager {
|
||||
BluetoothDevice device) {
|
||||
CachedBluetoothDevice newDevice = new CachedBluetoothDevice(mContext, adapter,
|
||||
profileManager, device);
|
||||
mCachedDevices.add(newDevice);
|
||||
synchronized (mCachedDevices) {
|
||||
mCachedDevices.add(newDevice);
|
||||
}
|
||||
return newDevice;
|
||||
}
|
||||
|
||||
@@ -110,6 +112,10 @@ final class CachedBluetoothDeviceManager {
|
||||
return device.getAddress();
|
||||
}
|
||||
|
||||
public synchronized void clearCachedDevices() {
|
||||
mCachedDevices.clear();
|
||||
}
|
||||
|
||||
public synchronized void onScanningStateChanged(boolean started) {
|
||||
if (!started) return;
|
||||
|
||||
|
Reference in New Issue
Block a user