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

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

Merge "Clear calling identity before calling in package managerwq" into qt-dev

parents 21df0436 8d123f46
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1840,11 +1840,14 @@ public class AppOpsService extends IAppOpsService.Stub {
    }

    private boolean isPackageSuspendedForUser(String pkg, int uid) {
        final long identity = Binder.clearCallingIdentity();
        try {
            return AppGlobals.getPackageManager().isPackageSuspendedForUser(
                    pkg, UserHandle.getUserId(uid));
        } catch (RemoteException re) {
            throw new SecurityException("Could not talk to package manager service");
        } finally {
            Binder.restoreCallingIdentity(identity);
        }
    }