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

Commit 65fce928 authored by Zach Johnson's avatar Zach Johnson Committed by android-build-merger
Browse files

Merge "Pass full binder UID to checkPackage"

am: fa7070cb

Change-Id: Id035acec97b3e98860928c11ff6bc0a702b8d359
parents bc09c92e fa7070cb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1922,7 +1922,7 @@ public class AdapterService extends Service {
        UserHandle callingUser = UserHandle.of(UserHandle.getCallingUserId());
        debugLog("startDiscovery");
        enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, "Need BLUETOOTH ADMIN permission");
        mAppOps.checkPackage(callingUser.getIdentifier(), callingPackage);
        mAppOps.checkPackage(Binder.getCallingUid(), callingPackage);
        boolean isQApp = Utils.isQApp(this, callingPackage);
        String permission = null;
        if (Utils.checkCallerHasNetworkSettingsPermission(this)) {
+2 −2
Original line number Diff line number Diff line
@@ -1921,7 +1921,7 @@ public class GattService extends ProfileService {
        }
        final ScanClient scanClient = new ScanClient(scannerId, settings, filters, storages);
        scanClient.userHandle = UserHandle.of(UserHandle.getCallingUserId());
        mAppOps.checkPackage(scanClient.userHandle.getIdentifier(), callingPackage);
        mAppOps.checkPackage(Binder.getCallingUid(), callingPackage);
        scanClient.isQApp = Utils.isQApp(this, callingPackage);
        if (scanClient.isQApp) {
            scanClient.hasLocationPermission =
@@ -1968,7 +1968,7 @@ public class GattService extends ProfileService {
        piInfo.callingPackage = callingPackage;
        ScannerMap.App app = mScannerMap.add(uuid, null, null, piInfo, this);
        app.mUserHandle = UserHandle.of(UserHandle.getCallingUserId());
        mAppOps.checkPackage(app.mUserHandle.getIdentifier(), callingPackage);
        mAppOps.checkPackage(Binder.getCallingUid(), callingPackage);
        app.mIsQApp = Utils.isQApp(this, callingPackage);
        try {
            if (app.mIsQApp) {