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

Commit 3315572d authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix isAutoRevokeWhitelisted api to ignore manifest declaration" into rvc-qpr-dev

parents 2b9317ea 9b1ead5c
Loading
Loading
Loading
Loading
+1 −12
Original line number Original line Diff line number Diff line
@@ -25289,18 +25289,7 @@ public class PackageManagerService extends IPackageManager.Stub
        int mode = mInjector.getAppOpsManager().checkOpNoThrow(
        int mode = mInjector.getAppOpsManager().checkOpNoThrow(
                AppOpsManager.OP_AUTO_REVOKE_PERMISSIONS_IF_UNUSED,
                AppOpsManager.OP_AUTO_REVOKE_PERMISSIONS_IF_UNUSED,
                Binder.getCallingUid(), packageName);
                Binder.getCallingUid(), packageName);
        if (mode == MODE_ALLOWED) {
        return mode == MODE_IGNORED;
            return false;
        } else if (mode == MODE_IGNORED) {
            return true;
        } else {
            synchronized (mLock) {
                boolean manifestWhitelisted =
                        mPackages.get(packageName).getAutoRevokePermissions()
                                == ApplicationInfo.AUTO_REVOKE_DISALLOWED;
                return manifestWhitelisted;
            }
        }
    }
    }
    @Override
    @Override