Fixed a Bluetooth Scanning issue.
+ When refreshing Bluetooth devices, sometimes it took awhile for some devices to come back up. This is a fix. Bug: 17049458 Change-Id: Id6233b38585e003e0432707663af4d06b0ce98c2
This commit is contained in:
@@ -230,10 +230,19 @@ public final class BluetoothSettings extends DeviceListPreferenceFragment implem
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void startScanning() {
|
private void startScanning() {
|
||||||
if (isUiRestricted()) return;
|
if (isUiRestricted()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!mAvailableDevicesCategoryIsPresent) {
|
if (!mAvailableDevicesCategoryIsPresent) {
|
||||||
getPreferenceScreen().addPreference(mAvailableDevicesCategory);
|
getPreferenceScreen().addPreference(mAvailableDevicesCategory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mAvailableDevicesCategory != null) {
|
||||||
|
setDeviceListGroup(mAvailableDevicesCategory);
|
||||||
|
removeAllDevices();
|
||||||
|
}
|
||||||
|
|
||||||
mLocalManager.getCachedDeviceManager().clearCachedDevices();
|
mLocalManager.getCachedDeviceManager().clearCachedDevices();
|
||||||
mAvailableDevicesCategory.removeAll();
|
mAvailableDevicesCategory.removeAll();
|
||||||
mLocalAdapter.startScanning(true);
|
mLocalAdapter.startScanning(true);
|
||||||
|
Reference in New Issue
Block a user