diff options
author | Dianne Hackborn <hackbod@google.com> | 2011-07-13 19:33:41 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2011-07-14 10:39:39 -0700 |
commit | ce86ba86df61de8b34b226a4eb6c23ec33e866e0 (patch) | |
tree | bd6a8d599da38dd78c28f82cf0575b4294ff7199 /core/java/android/content/ComponentCallbacks.java | |
parent | f7537bccb2b2ca2fa6c0205c4b24acd0836c0006 (diff) | |
download | frameworks_base-ce86ba86df61de8b34b226a4eb6c23ec33e866e0.zip frameworks_base-ce86ba86df61de8b34b226a4eb6c23ec33e866e0.tar.gz frameworks_base-ce86ba86df61de8b34b226a4eb6c23ec33e866e0.tar.bz2 |
Improve handling of low memory.
Now classify background processes into a set of bins of how much
memory they should try to clear. The last bin also involves
destroying all activities in that process.
Removed the old code for the simulator that is no longer needed
(yay). The debugging features it had are now integrated into the
regular oom adj code.
Small fixes to load average service.
Change-Id: Ic8df401714b188c73b50dbc8f8e6345b58f1f3a0
Diffstat (limited to 'core/java/android/content/ComponentCallbacks.java')
-rw-r--r-- | core/java/android/content/ComponentCallbacks.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/java/android/content/ComponentCallbacks.java b/core/java/android/content/ComponentCallbacks.java index dad60b0..92b98fd 100644 --- a/core/java/android/content/ComponentCallbacks.java +++ b/core/java/android/content/ComponentCallbacks.java @@ -51,4 +51,16 @@ public interface ComponentCallbacks { * The system will perform a gc for you after returning from this method. */ void onLowMemory(); + + /** @hide */ + static final int TRIM_MEMORY_COMPLETE = 80; + + /** @hide */ + static final int TRIM_MEMORY_MODERATE = 60; + + /** @hide */ + static final int TRIM_MEMORY_BACKGROUND = 40; + + /** @hide */ + static final int TRIM_MEMORY_INVISIBLE = 20; } |