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

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

Merge "[RESTRICT AUTOMERGE] Do not send new Intent to non-exported activity...

Merge "[RESTRICT AUTOMERGE] Do not send new Intent to non-exported activity when navigateUpTo" into qt-dev
parents 718c21f2 b9a93406
Loading
Loading
Loading
Loading
+17 −1
Original line number Diff line number Diff line
@@ -4308,7 +4308,23 @@ class ActivityStack extends ConfigurationContainer {
                    parentLaunchMode == ActivityInfo.LAUNCH_SINGLE_TASK ||
                    parentLaunchMode == ActivityInfo.LAUNCH_SINGLE_TOP ||
                    (destIntentFlags & Intent.FLAG_ACTIVITY_CLEAR_TOP) != 0) {
                boolean abort;
                try {
                    final int callingPid = srec.app != null ? srec.app.getPid() : 0;
                    abort = !mStackSupervisor.checkStartAnyActivityPermission(destIntent,
                            parent.info, null /* resultWho */, -1 /* requestCode */, callingPid,
                            callingUid, srec.info.packageName, false /* ignoreTargetSecurity */,
                            false /* launchingInTask */, srec.app, null /* resultRecord */,
                            null /* resultRootTask */);
                } catch (SecurityException e) {
                    abort = true;
                }
                if (abort) {
                    android.util.EventLog.writeEvent(0x534e4554, "238605611", callingUid, "");
                    foundParentInTask = false;
                } else {
                    parent.deliverNewIntentLocked(callingUid, destIntent, srec.packageName);
                }
            } else {
                try {
                    ActivityInfo aInfo = AppGlobals.getPackageManager().getActivityInfo(