Loading core/java/android/app/Activity.java +2 −0 Original line number Diff line number Diff line Loading @@ -4100,6 +4100,7 @@ public class Activity extends ContextThemeWrapper * {@link #setImmersive}. * * @see android.content.pm.ActivityInfo#FLAG_IMMERSIVE * @hide */ public boolean isImmersive() { try { Loading @@ -4122,6 +4123,7 @@ public class Activity extends ContextThemeWrapper * * @see #isImmersive * @see android.content.pm.ActivityInfo#FLAG_IMMERSIVE * @hide */ public void setImmersive(boolean i) { try { Loading core/java/android/content/pm/ApplicationInfo.java +13 −11 Original line number Diff line number Diff line Loading @@ -272,17 +272,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { */ public static final int FLAG_SUPPORTS_XLARGE_SCREENS = 1<<19; /** * Value for {@link #flags}: set to <code>true</code> if the application * has reported that it is heavy-weight, and thus can not participate in * the normal application lifecycle. * * <p>Comes from the * {@link android.R.styleable#AndroidManifestApplication_heavyWeight android:heavyWeight} * attribute of the <application> tag. */ public static final int FLAG_HEAVY_WEIGHT = 1<<20; /** * Value for {@link #flags}: this is true if the application has set * its android:neverEncrypt to true, false otherwise. It is used to specify Loading @@ -309,6 +298,19 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { */ public static final int FLAG_NATIVE_DEBUGGABLE = 1<<28; /** * Value for {@link #flags}: set to <code>true</code> if the application * has reported that it is heavy-weight, and thus can not participate in * the normal application lifecycle. * * <p>Comes from the * {@link android.R.styleable#AndroidManifestApplication_heavyWeight android:heavyWeight} * attribute of the <application> tag. * * {@hide} */ public static final int CANT_SAVE_STATE = 1<<27; /** * Flags associated with the application. Any combination of * {@link #FLAG_SYSTEM}, {@link #FLAG_DEBUGGABLE}, {@link #FLAG_HAS_CODE}, Loading core/java/android/content/pm/PackageParser.java +14 −12 Original line number Diff line number Diff line Loading @@ -1607,15 +1607,17 @@ public class PackageParser { ai.enabled = sa.getBoolean( com.android.internal.R.styleable.AndroidManifestApplication_enabled, true); if (false) { if (sa.getBoolean( com.android.internal.R.styleable.AndroidManifestApplication_heavyWeight, com.android.internal.R.styleable.AndroidManifestApplication_cantSaveState, false)) { ai.flags |= ApplicationInfo.FLAG_HEAVY_WEIGHT; ai.flags |= ApplicationInfo.CANT_SAVE_STATE; // A heavy-weight application can not be in a custom process. // We can do direct compare because we intern all strings. if (ai.processName != null && ai.processName != ai.packageName) { outError[0] = "Heavy-weight applications can not use custom processes"; outError[0] = "cantSaveState applications can not use custom processes"; } } } } Loading Loading @@ -1921,7 +1923,7 @@ public class PackageParser { sa.recycle(); if (receiver && (owner.applicationInfo.flags&ApplicationInfo.FLAG_HEAVY_WEIGHT) != 0) { if (receiver && (owner.applicationInfo.flags&ApplicationInfo.CANT_SAVE_STATE) != 0) { // A heavy-weight application can not have receives in its main process // We can do direct compare because we intern all strings. if (a.info.processName == owner.packageName) { Loading Loading @@ -2211,7 +2213,7 @@ public class PackageParser { sa.recycle(); if ((owner.applicationInfo.flags&ApplicationInfo.FLAG_HEAVY_WEIGHT) != 0) { if ((owner.applicationInfo.flags&ApplicationInfo.CANT_SAVE_STATE) != 0) { // A heavy-weight application can not have providers in its main process // We can do direct compare because we intern all strings. if (p.info.processName == owner.packageName) { Loading Loading @@ -2452,7 +2454,7 @@ public class PackageParser { sa.recycle(); if ((owner.applicationInfo.flags&ApplicationInfo.FLAG_HEAVY_WEIGHT) != 0) { if ((owner.applicationInfo.flags&ApplicationInfo.CANT_SAVE_STATE) != 0) { // A heavy-weight application can not have services in its main process // We can do direct compare because we intern all strings. if (s.info.processName == owner.packageName) { Loading core/res/res/values/attrs_manifest.xml +9 −7 Original line number Diff line number Diff line Loading @@ -749,15 +749,17 @@ <attr name="restoreNeedsApplication" /> <attr name="restoreAnyVersion" /> <attr name="neverEncrypt" /> <!-- Declare that this is a heavy-weight application. This kind of application is not able to save and restore its state on demand, so can not participate in the normal activity lifecycle. It will <!-- Declare that this applicationn can't participate in the normal state save/restore mechanism. Since it is not able to save and restore its state on demand, it can not participate in the normal activity lifecycle. It will not be killed while in the background; the user must explicitly quit it. Only one such app can be running at a time; if the user tries to launch a second heavy-weight app, they will be prompted to quit the first before doing so. While a heavy-weight application is running, the user will be informed of this. --> <attr name="heavyWeight" format="boolean" /> tries to launch a second such app, they will be prompted to quit the first before doing so. While the application is running, the user will be informed of this. @hide --> <attr name="cantSaveState" format="boolean" /> </declare-styleable> <!-- The <code>permission</code> tag declares a security permission that can be Loading core/res/res/values/public.xml +1 −1 Original line number Diff line number Diff line Loading @@ -1250,7 +1250,7 @@ <eat-comment /> <public type="attr" name="logo" id="0x010102be" /> <public type="attr" name="xlargeScreens" id="0x010102bf" /> <public type="attr" name="heavyWeight" id="0x010102c0" /> <public type="attr" name="cantSaveState" id="0x010102c0" /> <public type="attr" name="immersive" id="0x010102c1" /> <public-padding type="attr" name="kraken_resource_pad" end="0x01010300" /> Loading Loading
core/java/android/app/Activity.java +2 −0 Original line number Diff line number Diff line Loading @@ -4100,6 +4100,7 @@ public class Activity extends ContextThemeWrapper * {@link #setImmersive}. * * @see android.content.pm.ActivityInfo#FLAG_IMMERSIVE * @hide */ public boolean isImmersive() { try { Loading @@ -4122,6 +4123,7 @@ public class Activity extends ContextThemeWrapper * * @see #isImmersive * @see android.content.pm.ActivityInfo#FLAG_IMMERSIVE * @hide */ public void setImmersive(boolean i) { try { Loading
core/java/android/content/pm/ApplicationInfo.java +13 −11 Original line number Diff line number Diff line Loading @@ -272,17 +272,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { */ public static final int FLAG_SUPPORTS_XLARGE_SCREENS = 1<<19; /** * Value for {@link #flags}: set to <code>true</code> if the application * has reported that it is heavy-weight, and thus can not participate in * the normal application lifecycle. * * <p>Comes from the * {@link android.R.styleable#AndroidManifestApplication_heavyWeight android:heavyWeight} * attribute of the <application> tag. */ public static final int FLAG_HEAVY_WEIGHT = 1<<20; /** * Value for {@link #flags}: this is true if the application has set * its android:neverEncrypt to true, false otherwise. It is used to specify Loading @@ -309,6 +298,19 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { */ public static final int FLAG_NATIVE_DEBUGGABLE = 1<<28; /** * Value for {@link #flags}: set to <code>true</code> if the application * has reported that it is heavy-weight, and thus can not participate in * the normal application lifecycle. * * <p>Comes from the * {@link android.R.styleable#AndroidManifestApplication_heavyWeight android:heavyWeight} * attribute of the <application> tag. * * {@hide} */ public static final int CANT_SAVE_STATE = 1<<27; /** * Flags associated with the application. Any combination of * {@link #FLAG_SYSTEM}, {@link #FLAG_DEBUGGABLE}, {@link #FLAG_HAS_CODE}, Loading
core/java/android/content/pm/PackageParser.java +14 −12 Original line number Diff line number Diff line Loading @@ -1607,15 +1607,17 @@ public class PackageParser { ai.enabled = sa.getBoolean( com.android.internal.R.styleable.AndroidManifestApplication_enabled, true); if (false) { if (sa.getBoolean( com.android.internal.R.styleable.AndroidManifestApplication_heavyWeight, com.android.internal.R.styleable.AndroidManifestApplication_cantSaveState, false)) { ai.flags |= ApplicationInfo.FLAG_HEAVY_WEIGHT; ai.flags |= ApplicationInfo.CANT_SAVE_STATE; // A heavy-weight application can not be in a custom process. // We can do direct compare because we intern all strings. if (ai.processName != null && ai.processName != ai.packageName) { outError[0] = "Heavy-weight applications can not use custom processes"; outError[0] = "cantSaveState applications can not use custom processes"; } } } } Loading Loading @@ -1921,7 +1923,7 @@ public class PackageParser { sa.recycle(); if (receiver && (owner.applicationInfo.flags&ApplicationInfo.FLAG_HEAVY_WEIGHT) != 0) { if (receiver && (owner.applicationInfo.flags&ApplicationInfo.CANT_SAVE_STATE) != 0) { // A heavy-weight application can not have receives in its main process // We can do direct compare because we intern all strings. if (a.info.processName == owner.packageName) { Loading Loading @@ -2211,7 +2213,7 @@ public class PackageParser { sa.recycle(); if ((owner.applicationInfo.flags&ApplicationInfo.FLAG_HEAVY_WEIGHT) != 0) { if ((owner.applicationInfo.flags&ApplicationInfo.CANT_SAVE_STATE) != 0) { // A heavy-weight application can not have providers in its main process // We can do direct compare because we intern all strings. if (p.info.processName == owner.packageName) { Loading Loading @@ -2452,7 +2454,7 @@ public class PackageParser { sa.recycle(); if ((owner.applicationInfo.flags&ApplicationInfo.FLAG_HEAVY_WEIGHT) != 0) { if ((owner.applicationInfo.flags&ApplicationInfo.CANT_SAVE_STATE) != 0) { // A heavy-weight application can not have services in its main process // We can do direct compare because we intern all strings. if (s.info.processName == owner.packageName) { Loading
core/res/res/values/attrs_manifest.xml +9 −7 Original line number Diff line number Diff line Loading @@ -749,15 +749,17 @@ <attr name="restoreNeedsApplication" /> <attr name="restoreAnyVersion" /> <attr name="neverEncrypt" /> <!-- Declare that this is a heavy-weight application. This kind of application is not able to save and restore its state on demand, so can not participate in the normal activity lifecycle. It will <!-- Declare that this applicationn can't participate in the normal state save/restore mechanism. Since it is not able to save and restore its state on demand, it can not participate in the normal activity lifecycle. It will not be killed while in the background; the user must explicitly quit it. Only one such app can be running at a time; if the user tries to launch a second heavy-weight app, they will be prompted to quit the first before doing so. While a heavy-weight application is running, the user will be informed of this. --> <attr name="heavyWeight" format="boolean" /> tries to launch a second such app, they will be prompted to quit the first before doing so. While the application is running, the user will be informed of this. @hide --> <attr name="cantSaveState" format="boolean" /> </declare-styleable> <!-- The <code>permission</code> tag declares a security permission that can be Loading
core/res/res/values/public.xml +1 −1 Original line number Diff line number Diff line Loading @@ -1250,7 +1250,7 @@ <eat-comment /> <public type="attr" name="logo" id="0x010102be" /> <public type="attr" name="xlargeScreens" id="0x010102bf" /> <public type="attr" name="heavyWeight" id="0x010102c0" /> <public type="attr" name="cantSaveState" id="0x010102c0" /> <public type="attr" name="immersive" id="0x010102c1" /> <public-padding type="attr" name="kraken_resource_pad" end="0x01010300" /> Loading