diff options
| author | Dianne Hackborn <hackbod@google.com> | 2010-06-10 17:50:20 -0700 |
|---|---|---|
| committer | Dianne Hackborn <hackbod@google.com> | 2010-06-11 10:39:11 -0700 |
| commit | 32907cfb38bda2d3c052cf5139c5b592678fedbb (patch) | |
| tree | 78b2cb1f1ec2897628531bad2be0c90ecc53468f /core/java/android/app/ActivityManager.java | |
| parent | e577e87a2d80890190f14edc4a5caf70d7c566bf (diff) | |
Adjust activity manager process OOM adj.
Modify OOM adj classes a bit, to take into account the new
heavy weight app type, and give "foreground services" their
own category to have a bettery chance to manager them when
things go wrong.
Also add some new code to battery stats to keep a history
of changes to the battery level.
Change-Id: I29f5ab6938777e1a7eafd7d8c38b5e564cc9f96a
Diffstat (limited to 'core/java/android/app/ActivityManager.java')
| -rw-r--r-- | core/java/android/app/ActivityManager.java | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java index 793b9d2861c1..7f95bf5d4b5b 100644 --- a/core/java/android/app/ActivityManager.java +++ b/core/java/android/app/ActivityManager.java @@ -726,16 +726,24 @@ public class ActivityManager { public static final int IMPORTANCE_FOREGROUND = 100; /** - * Constant for {@link #importance}: this process is running a - * heavy-weight application and thus should not be killed. + * Constant for {@link #importance}: this process is running something + * that is actively visible to the user, though not in the immediate + * foreground. */ - public static final int IMPORTANCE_HEAVY_WEIGHT = 150; + public static final int IMPORTANCE_VISIBLE = 200; /** * Constant for {@link #importance}: this process is running something - * that is considered to be actively visible to the user. + * that is considered to be actively perceptible to the user. An + * example would be an application performing background music playback. */ - public static final int IMPORTANCE_VISIBLE = 200; + public static final int IMPORTANCE_PERCEPTIBLE = 130; + + /** + * Constant for {@link #importance}: this process is running a + * heavy-weight application and thus should not be killed. + */ + public static final int IMPORTANCE_HEAVY_WEIGHT = 170; /** * Constant for {@link #importance}: this process is contains services |
