diff options
author | Dianne Hackborn <hackbod@google.com> | 2011-08-07 16:24:18 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2011-08-07 20:20:56 -0700 |
commit | 7d608423b721e0153f37bfd5eba78fcd2489562d (patch) | |
tree | 1844ef30b7a4e467a39858ab5ffc7575c4f536d3 /core/java/android/app/ActivityManager.java | |
parent | 8868f9797c39e5fc7c9612fbb69d53f34f03f6a2 (diff) | |
download | frameworks_base-7d608423b721e0153f37bfd5eba78fcd2489562d.zip frameworks_base-7d608423b721e0153f37bfd5eba78fcd2489562d.tar.gz frameworks_base-7d608423b721e0153f37bfd5eba78fcd2489562d.tar.bz2 |
Move OOM kernel settings to activity manager.
The activity manager now take care of plugging the correct settings
into the OOM killer in the kernel. This is a lot cleaner because
it is really central to how the activity manager works, and nobody
else cares about them.
Taking advantage of this, the activity manager computes what it
thinks are appropriate OOM levels based on the RAM and display
size of the device.
Also a small optization to the package manager to keep a binding
to the package install helper for a bit after done using it, to
avoid thrashing on it.
And some new APIs that are now needed by Settings.
Change-Id: I2b2d379194445d8305bde331c19bde91c8f24751
Diffstat (limited to 'core/java/android/app/ActivityManager.java')
-rw-r--r-- | core/java/android/app/ActivityManager.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java index d207a0a..f7e5cf1 100644 --- a/core/java/android/app/ActivityManager.java +++ b/core/java/android/app/ActivityManager.java @@ -864,6 +864,15 @@ public class ActivityManager { */ public boolean lowMemory; + /** @hide */ + public long hiddenAppThreshold; + /** @hide */ + public long secondaryServerThreshold; + /** @hide */ + public long visibleAppThreshold; + /** @hide */ + public long foregroundAppThreshold; + public MemoryInfo() { } @@ -875,12 +884,20 @@ public class ActivityManager { dest.writeLong(availMem); dest.writeLong(threshold); dest.writeInt(lowMemory ? 1 : 0); + dest.writeLong(hiddenAppThreshold); + dest.writeLong(secondaryServerThreshold); + dest.writeLong(visibleAppThreshold); + dest.writeLong(foregroundAppThreshold); } public void readFromParcel(Parcel source) { availMem = source.readLong(); threshold = source.readLong(); lowMemory = source.readInt() != 0; + hiddenAppThreshold = source.readLong(); + secondaryServerThreshold = source.readLong(); + visibleAppThreshold = source.readLong(); + foregroundAppThreshold = source.readLong(); } public static final Creator<MemoryInfo> CREATOR |