summaryrefslogtreecommitdiffstats
path: root/core/java/android
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/app/Activity.java2
-rw-r--r--core/java/android/content/pm/ApplicationInfo.java24
-rw-r--r--core/java/android/content/pm/PackageParser.java26
3 files changed, 29 insertions, 23 deletions
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index ed5af91..a3a8f09 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -3748,6 +3748,7 @@ public class Activity extends ContextThemeWrapper
* {@link #setImmersive}.
*
* @see android.content.pm.ActivityInfo#FLAG_IMMERSIVE
+ * @hide
*/
public boolean isImmersive() {
try {
@@ -3770,6 +3771,7 @@ public class Activity extends ContextThemeWrapper
*
* @see #isImmersive
* @see android.content.pm.ActivityInfo#FLAG_IMMERSIVE
+ * @hide
*/
public void setImmersive(boolean i) {
try {
diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java
index 244d126..c812f36 100644
--- a/core/java/android/content/pm/ApplicationInfo.java
+++ b/core/java/android/content/pm/ApplicationInfo.java
@@ -273,17 +273,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 &lt;application&gt; 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
* that this package specifically "opts-out" of a secured file system solution,
@@ -310,6 +299,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 &lt;application&gt; 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},
* {@link #FLAG_PERSISTENT}, {@link #FLAG_FACTORY_TEST}, and
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index 47e668d..2a39dc0 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -1601,15 +1601,17 @@ public class PackageParser {
ai.enabled = sa.getBoolean(
com.android.internal.R.styleable.AndroidManifestApplication_enabled, true);
- if (sa.getBoolean(
- com.android.internal.R.styleable.AndroidManifestApplication_heavyWeight,
- false)) {
- ai.flags |= ApplicationInfo.FLAG_HEAVY_WEIGHT;
-
- // 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";
+ if (false) {
+ if (sa.getBoolean(
+ com.android.internal.R.styleable.AndroidManifestApplication_cantSaveState,
+ false)) {
+ 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] = "cantSaveState applications can not use custom processes";
+ }
}
}
}
@@ -1907,7 +1909,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) {
@@ -2197,7 +2199,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) {
@@ -2438,7 +2440,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) {