Merge "Set bluetooth discoverable off at power on time if the timeout is no forever"
This commit is contained in:
@@ -602,6 +602,11 @@ public class BluetoothService extends IBluetooth.Stub {
|
||||
* It inits bond state and profile state before STATE_ON intent is broadcasted.
|
||||
*/
|
||||
/*package*/ void initBluetoothAfterTurningOn() {
|
||||
String discoverable = getProperty("Discoverable", false);
|
||||
String timeout = getProperty("DiscoverableTimeout", false);
|
||||
if (discoverable.equals("true") && Integer.valueOf(timeout) != 0) {
|
||||
setAdapterPropertyBooleanNative("Discoverable", 0);
|
||||
}
|
||||
mBondState.initBondState();
|
||||
initProfileState();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user