Ensure settings maintains its Bluetooth device inquiry state
Bug: 187165224 Test: Manual Change-Id: I4dafb7bf5b410d99cba7e30ee17f966611458db7
This commit is contained in:
@@ -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