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

Commit 9b1ead5c authored by Eugene Susla's avatar Eugene Susla
Browse files

Fix isAutoRevokeWhitelisted api to ignore manifest declaration

This behavior is a leftover from it was expected we'll
have a manifest-based whitelist

Test: use the app to ensure manifest declaration no longer changes API result
Fixes: 162077344
Change-Id: If613d02c74459d61d9dd7db05ad5c60a129f16e3
parent 484f9ac9
Loading
Loading
Loading
Loading
+1 −12
Original line number Diff line number Diff line
@@ -25289,18 +25289,7 @@ public class PackageManagerService extends IPackageManager.Stub
        int mode = mInjector.getAppOpsManager().checkOpNoThrow(
                AppOpsManager.OP_AUTO_REVOKE_PERMISSIONS_IF_UNUSED,
                Binder.getCallingUid(), packageName);
        if (mode == MODE_ALLOWED) {
            return false;
        } else if (mode == MODE_IGNORED) {
            return true;
        } else {
            synchronized (mLock) {
                boolean manifestWhitelisted =
                        mPackages.get(packageName).getAutoRevokePermissions()
                                == ApplicationInfo.AUTO_REVOKE_DISALLOWED;
                return manifestWhitelisted;
            }
        }
        return mode == MODE_IGNORED;
    }
    @Override