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

Commit 15833237 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Pass full binder UID to checkPackage"

parents 1296f0a4 6f2dd3a7
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) {