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

Commit 8d123f46 authored by Svet Ganov's avatar Svet Ganov
Browse files

Clear calling identity before calling in package managerwq

Test: manual

bug:130221551

Change-Id: I66cd11ad3475f168a2caf72183a184d7cbca302f
parent 835f260d
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);
        }
    }