Merge "Fixed a Bluetooth Scanning issue." into lmp-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
d251fba2fe
@@ -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