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

Commit 403a2c4f authored by Svet Ganov's avatar Svet Ganov Committed by android-build-team Robot
Browse files

Clear calling identity before calling in package managerwq

Test: manual

bug:130221551

Change-Id: I66cd11ad3475f168a2caf72183a184d7cbca302f
(cherry picked from commit 8d123f46)
parent 7f81874b
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);
        }
    }