Merge "Fixed a Bluetooth Scanning issue." into lmp-dev

This commit is contained in:
PauloftheWest
2014-08-20 21:09:42 +00:00
committed by Android (Google) Code Review

View File

@@ -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);