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

Commit d8c87fcd authored by Bryce Lee's avatar Bryce Lee Committed by android-build-merger
Browse files

Merge "Clear calling UID before resolving intent types." into pi-dev am: c16de056

am: 04652379

Change-Id: I6b4d2f5eb1ba02ceb24b8eddfca338a217c59c85
parents 3f5e5aef 04652379
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -25938,16 +25938,19 @@ public class ActivityManagerService extends IActivityManager.Stub
                Bundle bOptions) {
            Preconditions.checkNotNull(intents, "intents");
            final String[] resolvedTypes = new String[intents.length];
            for (int i = 0; i < intents.length; i++) {
                resolvedTypes[i] = intents[i].resolveTypeIfNeeded(mContext.getContentResolver());
            }
            // UID of the package on user userId.
            // "= 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 {
                for (int i = 0; i < intents.length; i++) {
                    resolvedTypes[i] =
                            intents[i].resolveTypeIfNeeded(mContext.getContentResolver());
                }
                packageUid = AppGlobals.getPackageManager().getPackageUid(
                        packageName, PackageManager.MATCH_DEBUG_TRIAGED_MISSING, userId);
            } catch (RemoteException e) {