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

Unverified Commit d0110a17 authored by Kevin F. Haggerty's avatar Kevin F. Haggerty
Browse files

Merge tag 'android-security-10.0.0_r67' of...

Merge tag 'android-security-10.0.0_r67' of https://android.googlesource.com/platform/packages/apps/Bluetooth into staging/lineage-17.1_merge_android-security-10.0.0_r67

Android Security 10.0.0 Release 67 (8528209)

* tag 'android-security-10.0.0_r67' of https://android.googlesource.com/platform/packages/apps/Bluetooth:
  Removes app access to BluetoothAdapter#setDiscoverableTimeout by requiring BLUETOOTH_PRIVILEGED permission.
  Removes app access to BluetoothAdapter#setScanMode by requiring BLUETOOTH_PRIVILEGED permission.

Change-Id: I5ab1df6542585715f93cdd939c2ddf856031d255
parents 3245d196 cfe22215
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1931,7 +1931,8 @@ public class AdapterService extends Service {
    }

    boolean setScanMode(int mode, int duration) {
        enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission");
        enforceCallingOrSelfPermission(
                BLUETOOTH_PRIVILEGED, "Need BLUETOOTH PRIVILEGED permission");

        setDiscoverableTimeout(duration);

@@ -1946,7 +1947,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);
    }