diff options
author | Craig Mautner <cmautner@google.com> | 2014-04-24 16:33:02 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-04-24 16:33:02 +0000 |
commit | f8a5820817eb59e0fe16e3ce0f10bb3dca090192 (patch) | |
tree | 49d78fb80f80c15b75f873bbbeaef0ea71b425c3 /core/java/android/content | |
parent | 07bed4921a05e717a4b7f10a25e3830e346426b7 (diff) | |
parent | 03981a4c2e9689197e4d2c916c07ae16207b5276 (diff) | |
download | frameworks_base-f8a5820817eb59e0fe16e3ce0f10bb3dca090192.zip frameworks_base-f8a5820817eb59e0fe16e3ce0f10bb3dca090192.tar.gz frameworks_base-f8a5820817eb59e0fe16e3ce0f10bb3dca090192.tar.bz2 |
am 03981a4c: Merge "Add activity attribute allowEmbedded" into klp-modular-dev
* commit '03981a4c2e9689197e4d2c916c07ae16207b5276':
Add activity attribute allowEmbedded
Diffstat (limited to 'core/java/android/content')
-rw-r--r-- | core/java/android/content/pm/ActivityInfo.java | 9 | ||||
-rw-r--r-- | core/java/android/content/pm/PackageParser.java | 6 |
2 files changed, 14 insertions, 1 deletions
diff --git a/core/java/android/content/pm/ActivityInfo.java b/core/java/android/content/pm/ActivityInfo.java index b8ac3bf..941b726 100644 --- a/core/java/android/content/pm/ActivityInfo.java +++ b/core/java/android/content/pm/ActivityInfo.java @@ -187,7 +187,7 @@ public class ActivityInfo extends ComponentInfo /** * @hide Bit in {@link #flags}: If set, this component will only be seen * by the primary user. Only works with broadcast receivers. Set from the - * {@link android.R.attr#primaryUserOnly} attribute. + * android.R.attr#primaryUserOnly attribute. */ public static final int FLAG_PRIMARY_USER_ONLY = 0x20000000; /** @@ -199,6 +199,13 @@ public class ActivityInfo extends ComponentInfo */ public static final int FLAG_SINGLE_USER = 0x40000000; /** + * @hide Bit in {@link #flags}: If set, this activity may be launched into an + * owned ActivityContainer such as that within an ActivityView. If not set and + * this activity is launched into such a container a SecurityExcception will be + * thrown. Set from the {@link android.R.attr#allowEmbedded} attribute. + */ + public static final int FLAG_ALLOW_EMBEDDED = 0x80000000; + /** * Options that have been set in the activity declaration in the * manifest. * These include: diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java index b3b6e09..66d4f50 100644 --- a/core/java/android/content/pm/PackageParser.java +++ b/core/java/android/content/pm/PackageParser.java @@ -2445,6 +2445,12 @@ public class PackageParser { a.info.flags |= ActivityInfo.FLAG_IMMERSIVE; } + if (sa.getBoolean( + com.android.internal.R.styleable.AndroidManifestActivity_allowEmbedded, + false)) { + a.info.flags |= ActivityInfo.FLAG_ALLOW_EMBEDDED; + } + if (!receiver) { if (sa.getBoolean( com.android.internal.R.styleable.AndroidManifestActivity_hardwareAccelerated, |