These are not ready to be exposed. Also rename them to be better.
Change-Id: I7c234144497084b7769f8c46761b7d74d1c583d5
diff --git a/api/current.xml b/api/current.xml
index f7a5954..3d91a7e 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -21704,17 +21704,6 @@
visibility="public"
>
</field>
-<field name="FLAG_HEAVY_WEIGHT"
- type="int"
- transient="false"
- volatile="false"
- value="1"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
<field name="IMPORTANCE_BACKGROUND"
type="int"
transient="false"
@@ -21825,16 +21814,6 @@
visibility="public"
>
</field>
-<field name="flags"
- type="int"
- transient="false"
- volatile="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
<field name="importance"
type="int"
transient="false"
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java
index d5741fc..4736404 100644
--- a/core/java/android/app/ActivityManager.java
+++ b/core/java/android/app/ActivityManager.java
@@ -755,14 +755,17 @@
public String pkgList[];
/**
- * Constant for {@link #flags}: this is a heavy-weight process,
- * meaning it will not be killed while in the background.
+ * Constant for {@link #flags}: this is an app that is unable to
+ * correctly save its state when going to the background,
+ * so it can not be killed while in the background.
+ * @hide
*/
- public static final int FLAG_HEAVY_WEIGHT = 1<<0;
+ public static final int FLAG_CANT_SAVE_STATE = 1<<0;
/**
* Flags of information. May be any of
- * {@link #FLAG_HEAVY_WEIGHT}.
+ * {@link #FLAG_CANT_SAVE_STATE}.
+ * @hide
*/
public int flags;
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index 30dc5ea..89a1627 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -6801,7 +6801,7 @@
app.pid, app.getPackageList());
currApp.uid = app.info.uid;
if (mHeavyWeightProcess == app) {
- currApp.flags |= ActivityManager.RunningAppProcessInfo.FLAG_HEAVY_WEIGHT;
+ currApp.flags |= ActivityManager.RunningAppProcessInfo.FLAG_CANT_SAVE_STATE;
}
int adj = app.curAdj;
if (adj >= EMPTY_APP_ADJ) {