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

Commit 75731016 authored by Craig Mautner's avatar Craig Mautner
Browse files

Add test for attribute android:allowEmbedded

Throw a SecurityException if it is not true for an activity launched
using ActivityContainer.startActivity().

Change-Id: Id1d70e630195a49a3eccdc64a0beccc420400332
parent ffd14a13
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -705,6 +705,10 @@ public final class ActivityStackSupervisor implements DisplayListener {
                profileFile, profileFd, userId);

        ActivityContainer container = (ActivityContainer)iContainer;
        if (container != null && (aInfo.flags & ActivityInfo.FLAG_ALLOW_EMBEDDED) == 0) {
            throw new SecurityException(
                    "Activities launched in ActivityContainers must set allowEmbedded=\"true\"");
        }
        synchronized (mService) {
            int callingPid;
            if (callingUid >= 0) {