BLuetooth Discoverable timer not correctly cleared
Changing the discoverable timer from 2min to infinity before the 2min timer has passed will not clear the 2min timer. This fix handles this case. Bug: 12220031 Change-Id: I8794eda353c74e46b09e15ee9a7a491658e7b5cd
This commit is contained in:
@@ -143,7 +143,10 @@ final class BluetoothDiscoverableEnabler implements Preference.OnPreferenceClick
|
||||
|
||||
if (timeout > 0) {
|
||||
BluetoothDiscoverableTimeoutReceiver.setDiscoverableAlarm(mContext, endTimestamp);
|
||||
} else {
|
||||
BluetoothDiscoverableTimeoutReceiver.cancelDiscoverableAlarm(mContext);
|
||||
}
|
||||
|
||||
} else {
|
||||
mLocalAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE);
|
||||
BluetoothDiscoverableTimeoutReceiver.cancelDiscoverableAlarm(mContext);
|
||||
|
Reference in New Issue
Block a user