diff options
| author | Dianne Hackborn <hackbod@google.com> | 2011-01-15 11:50:52 -0800 |
|---|---|---|
| committer | Dianne Hackborn <hackbod@google.com> | 2011-01-16 12:08:38 -0800 |
| commit | 3b81bc18bb661c02ad8074c39dab16644c1e65d0 (patch) | |
| tree | 5bce0dd90fa01b40f640cec103d47eb7de85d882 /core/java/android/app | |
| parent | a032c90189d9ac28b65af4fe5f8b34f182441335 (diff) | |
| download | frameworks_base-3b81bc18bb661c02ad8074c39dab16644c1e65d0.zip frameworks_base-3b81bc18bb661c02ad8074c39dab16644c1e65d0.tar.gz frameworks_base-3b81bc18bb661c02ad8074c39dab16644c1e65d0.tar.bz2 | |
Add manifest API to request a large heap.
You can now do android:largeHeap="true" on an application.
Doesn't yet do anything, waiting for Dalvik API.
Also tweak package parsing so that the SDK API level is set in the
configuration, allowing manifest resource value selection based on
that.
Change-Id: I6e035f9702a97b055416743b88f83a22ba4a9584
Diffstat (limited to 'core/java/android/app')
| -rw-r--r-- | core/java/android/app/ActivityManager.java | 3 | ||||
| -rw-r--r-- | core/java/android/app/ActivityThread.java | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java index 44db50f..4eae14b 100644 --- a/core/java/android/app/ActivityManager.java +++ b/core/java/android/app/ActivityManager.java @@ -77,6 +77,9 @@ public class ActivityManager { * This may be the same size as {@link #getMemoryClass()} on memory * constrained devices, or it may be significantly larger on devices with * a large amount of available RAM. + * + * <p>The is the size of the application's Dalvik heap if it has + * specified <code>android:largeHeap="true"</code> in its manifest. */ public int getLargeMemoryClass() { return staticGetLargeMemoryClass(); diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index cc94aa0..db046ef 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -45,7 +45,6 @@ import android.graphics.Canvas; import android.net.IConnectivityManager; import android.net.Proxy; import android.net.ProxyProperties; -import android.os.Build; import android.os.Bundle; import android.os.Debug; import android.os.Handler; @@ -3463,6 +3462,10 @@ public final class ActivityThread { mInstrumentation = new Instrumentation(); } + if ((data.appInfo.flags&ApplicationInfo.FLAG_LARGE_HEAP) != 0) { + // XXX bump up Dalvik's heap. + } + // If the app is being launched for full backup or restore, bring it up in // a restricted environment with the base application class. Application app = data.info.makeApplication(data.restrictedBackupMode, null); @@ -3471,7 +3474,7 @@ public final class ActivityThread { List<ProviderInfo> providers = data.providers; if (providers != null) { installContentProviders(app, providers); - // For process that contain content providers, we want to + // For process that contains content providers, we want to // ensure that the JIT is enabled "at some point". mH.sendEmptyMessageDelayed(H.ENABLE_JIT, 10*1000); } |
