diff options
author | Jose Lima <joselima@google.com> | 2014-03-24 15:59:36 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-03-24 15:59:36 +0000 |
commit | 6c45157caac7571db0c1f09819ebfc0e7c9dfd48 (patch) | |
tree | de82bcbcde258a7b02a53c4b6815b187fa8f054a | |
parent | 7390d4ab8d12d5ffa5d28341096f4425247204a0 (diff) | |
parent | d13d701681220cdcb61b5a62669e88bb77d156aa (diff) | |
download | frameworks_base-6c45157caac7571db0c1f09819ebfc0e7c9dfd48.zip frameworks_base-6c45157caac7571db0c1f09819ebfc0e7c9dfd48.tar.gz frameworks_base-6c45157caac7571db0c1f09819ebfc0e7c9dfd48.tar.bz2 |
am d13d7016: am eb2c85df: Merge "Added isGame application tag to the manifest" into klp-modular-dev
* commit 'd13d701681220cdcb61b5a62669e88bb77d156aa':
Added isGame application tag to the manifest
-rw-r--r-- | api/current.txt | 2 | ||||
-rw-r--r-- | core/java/android/content/pm/ApplicationInfo.java | 10 | ||||
-rw-r--r-- | core/java/android/content/pm/PackageParser.java | 5 | ||||
-rw-r--r-- | core/res/res/values/attrs_manifest.xml | 7 | ||||
-rw-r--r-- | core/res/res/values/public.xml | 1 |
5 files changed, 23 insertions, 2 deletions
diff --git a/api/current.txt b/api/current.txt index 28042bf..0072a5b 100644 --- a/api/current.txt +++ b/api/current.txt @@ -621,6 +621,7 @@ package android { field public static final int isAsciiCapable = 16843753; // 0x10103e9 field public static final int isAuxiliary = 16843647; // 0x101037f field public static final int isDefault = 16843297; // 0x1010221 + field public static final int isGame = 16843764; // 0x10103f4 field public static final int isIndicator = 16843079; // 0x1010147 field public static final int isModifier = 16843334; // 0x1010246 field public static final int isRepeatable = 16843336; // 0x1010248 @@ -7034,6 +7035,7 @@ package android.content.pm { field public static final int FLAG_HAS_CODE = 4; // 0x4 field public static final int FLAG_INSTALLED = 8388608; // 0x800000 field public static final int FLAG_IS_DATA_ONLY = 16777216; // 0x1000000 + field public static final int FLAG_IS_GAME = 33554432; // 0x2000000 field public static final int FLAG_KILL_AFTER_RESTORE = 65536; // 0x10000 field public static final int FLAG_LARGE_HEAP = 1048576; // 0x100000 field public static final int FLAG_PERSISTENT = 8; // 0x8 diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java index 9c46d96..57acdff 100644 --- a/core/java/android/content/pm/ApplicationInfo.java +++ b/core/java/android/content/pm/ApplicationInfo.java @@ -315,6 +315,12 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { public static final int FLAG_IS_DATA_ONLY = 1<<24; /** + * Value for {@link #flags}: true if the application was declared to be a game, or + * false if it is a non-game application. + */ + public static final int FLAG_IS_GAME = 1<<25; + + /** * Value for {@link #flags}: set to {@code true} if the application * is permitted to hold privileged permissions. * @@ -363,7 +369,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { * {@link #FLAG_SUPPORTS_LARGE_SCREENS}, {@link #FLAG_SUPPORTS_XLARGE_SCREENS}, * {@link #FLAG_RESIZEABLE_FOR_SCREENS}, * {@link #FLAG_SUPPORTS_SCREEN_DENSITIES}, {@link #FLAG_VM_SAFE_MODE}, - * {@link #FLAG_INSTALLED}. + * {@link #FLAG_INSTALLED}, {@link #FLAG_IS_GAME}. */ public int flags = 0; @@ -474,7 +480,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { * @hide */ public int installLocation = PackageInfo.INSTALL_LOCATION_UNSPECIFIED; - + public void dump(Printer pw, String prefix) { super.dumpFront(pw, prefix); if (className != null) { diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java index a07ec1a..b3b6e09 100644 --- a/core/java/android/content/pm/PackageParser.java +++ b/core/java/android/content/pm/PackageParser.java @@ -2089,6 +2089,11 @@ public class PackageParser { ai.enabled = sa.getBoolean( com.android.internal.R.styleable.AndroidManifestApplication_enabled, true); + if (sa.getBoolean( + com.android.internal.R.styleable.AndroidManifestApplication_isGame, false)) { + ai.flags |= ApplicationInfo.FLAG_IS_GAME; + } + if (false) { if (sa.getBoolean( com.android.internal.R.styleable.AndroidManifestApplication_cantSaveState, diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml index 55392ef..22fc18b 100644 --- a/core/res/res/values/attrs_manifest.xml +++ b/core/res/res/values/attrs_manifest.xml @@ -312,6 +312,12 @@ content providers. --> <attr name="exported" format="boolean" /> + <!-- A boolean flag used to indicate if an application is a Game or not. + <p>This information can be used by the system to group together + applications that are classified as games, and display them separately + from the other applications. --> + <attr name="isGame" format="boolean" /> + <!-- If set to true, a single instance of this component will run for all users. That instance will run as user 0, the default/primary user. When the app running is in processes for other users and interacts @@ -967,6 +973,7 @@ any accounts. The type should correspond to the account authenticator type, such as "com.google". --> <attr name="requiredAccountType" format="string"/> + <attr name="isGame" /> </declare-styleable> <!-- The <code>permission</code> tag declares a security permission that can be diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml index f6edf33..8555237 100644 --- a/core/res/res/values/public.xml +++ b/core/res/res/values/public.xml @@ -2094,4 +2094,5 @@ <public type="attr" name="banner" id="0x10103f2" /> <public type="attr" name="windowSwipeToDismiss" id="0x10103f3" /> + <public type="attr" name="isGame" /> </resources> |