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() {
|
||||
if (isUiRestricted()) return;
|
||||
if (isUiRestricted()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mAvailableDevicesCategoryIsPresent) {
|
||||
getPreferenceScreen().addPreference(mAvailableDevicesCategory);
|
||||
}
|
||||
|
||||
if (mAvailableDevicesCategory != null) {
|
||||
setDeviceListGroup(mAvailableDevicesCategory);
|
||||
removeAllDevices();
|
||||
}
|
||||
|
||||
mLocalManager.getCachedDeviceManager().clearCachedDevices();
|
||||
mAvailableDevicesCategory.removeAll();
|
||||
mLocalAdapter.startScanning(true);
|
||||
|
Reference in New Issue
Block a user