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

* commit 'd251fba2fe308ea6aa18002c92506fca9d53848d':
  Fixed a Bluetooth Scanning issue.
This commit is contained in:
PauloftheWest
2014-08-20 21:17:34 +00:00
committed by Android Git Automerger

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