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

Commit 3c114987 authored by Ajay Panicker's avatar Ajay Panicker
Browse files

Do not allow apps to cause Bluetooth to be discoverable forever

Trying to set a discoverable timout of 0 for Bluetooth will now
not allow bluetooth to be discoverable forever.

Bug: 28177801
Change-Id: Icfa03e2100f8e7f31415ebab39889b9ec32e6c77
(cherry picked from commit 6dcab67c)
parent 682c2ede
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -267,7 +267,7 @@ public class RequestPermissionActivity extends Activity implements

            Log.d(TAG, "Setting Bluetooth Discoverable Timeout = " + mTimeout);

            if (mTimeout < 0 || mTimeout > MAX_DISCOVERABLE_TIMEOUT) {
            if (mTimeout < 1 || mTimeout > MAX_DISCOVERABLE_TIMEOUT) {
                mTimeout = BluetoothDiscoverableEnabler.DEFAULT_DISCOVERABLE_TIMEOUT;
            }
        } else {