Fix discoverability timeout issues. (a) implement timeout logic (b) persist 'never timeout' after reboot (c) code cleanup
Change-Id: Iacaec4a48a45935a49576c140ea11ea3d0da6361
This commit is contained in:
committed by
Android (Google) Code Review
parent
3b147b7702
commit
827de2d73e
3
core/java/android/bluetooth/BluetoothAdapter.java
Normal file → Executable file
3
core/java/android/bluetooth/BluetoothAdapter.java
Normal file → Executable file
@@ -670,7 +670,8 @@ public final class BluetoothAdapter {
|
||||
/** @hide */
|
||||
public boolean setScanMode(int mode) {
|
||||
if (getState() != STATE_ON) return false;
|
||||
return setScanMode(mode, 120);
|
||||
/* getDiscoverableTimeout() to use the latest from NV than use 0 */
|
||||
return setScanMode(mode, getDiscoverableTimeout());
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
|
||||
Reference in New Issue
Block a user