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

Commit 1d97893d authored by Bryce Lee's avatar Bryce Lee Committed by Android (Google) Code Review
Browse files

Merge "Clear calling identity when get package uid."

parents 0e694a63 38585a2c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -25623,11 +25623,14 @@ public class ActivityManagerService extends IActivityManager.Stub
            // "= 0" is needed because otherwise catch(RemoteException) would make it look like
            // packageUid may not be initialized.
            int packageUid = 0;
            final long ident = Binder.clearCallingIdentity();
            try {
                packageUid = AppGlobals.getPackageManager().getPackageUid(
                        packageName, PackageManager.MATCH_DEBUG_TRIAGED_MISSING, userId);
            } catch (RemoteException e) {
                // Shouldn't happen.
            } finally {
                Binder.restoreCallingIdentity(ident);
            }
            synchronized (ActivityManagerService.this) {