Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d96daf1a authored by Matthew Xie's avatar Matthew Xie
Browse files

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

Set bluetooth discoverable off at power on time if the discoverable timeout
is no forever
bug 5068151

Change-Id: I413e8de5f49030b741a8b84a566065d112ee60be
parent 86c471db
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -600,6 +600,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();
    }