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

Commit 70dbc143 authored by Rahul Sabnis's avatar Rahul Sabnis Committed by Android Build Coastguard Worker
Browse files

Removes app access to BluetoothAdapter#setDiscoverableTimeout by requiring...

Removes app access to BluetoothAdapter#setDiscoverableTimeout by requiring BLUETOOTH_PRIVILEGED permission.

Bug: 206807679
Test: Manual
Merged-In: I73288f495d35280a5724d070248db54e2fe537fd
Change-Id: I73288f495d35280a5724d070248db54e2fe537fd
(cherry picked from commit 528ea846)
Merged-In: I73288f495d35280a5724d070248db54e2fe537fd
parent e20b9da5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1919,7 +1919,8 @@ public class AdapterService extends Service {
    }

    boolean setDiscoverableTimeout(int timeout) {
        enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission");
        enforceCallingOrSelfPermission(
                BLUETOOTH_PRIVILEGED, "Need BLUETOOTH PRIVILEGED permission");

        return mAdapterProperties.setDiscoverableTimeout(timeout);
    }