Merge "Ensure settings maintains its Bluetooth device inquiry state" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
524f4979f5
@@ -229,14 +229,18 @@ public abstract class DeviceListPreferenceFragment extends
|
|||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
void enableScanning() {
|
void enableScanning() {
|
||||||
// BluetoothAdapter already handles repeated scan requests
|
// BluetoothAdapter already handles repeated scan requests
|
||||||
startScanning();
|
if (!mScanEnabled) {
|
||||||
mScanEnabled = true;
|
startScanning();
|
||||||
|
mScanEnabled = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
void disableScanning() {
|
void disableScanning() {
|
||||||
stopScanning();
|
if (mScanEnabled) {
|
||||||
mScanEnabled = false;
|
stopScanning();
|
||||||
|
mScanEnabled = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user