Merge "Set bluetooth discoverable off at power on time if the timeout is no forever"

This commit is contained in:
Matthew Xie
2011-08-23 10:54:07 -07:00
committed by Android (Google) Code Review

View File

@@ -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();
}