diff --git a/CleanSpec.mk b/CleanSpec.mk index 1acb620bee2d8..337b30f0843a2 100644 --- a/CleanSpec.mk +++ b/CleanSpec.mk @@ -89,6 +89,7 @@ $(call add-clean-step, rm -rf $(OUT_DIR)/target/target/common/obj/APPS/Music2_in $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/nfc/INdefTag.java) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libstagefright_aacdec_intermediates) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libstagefright_mp3dec_intermediates) +$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop) # ************************************************ # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST diff --git a/build/phone-hdpi-512-dalvik-heap.mk b/build/phone-hdpi-512-dalvik-heap.mk index a7f9d326e5a07..630cf035a7419 100644 --- a/build/phone-hdpi-512-dalvik-heap.mk +++ b/build/phone-hdpi-512-dalvik-heap.mk @@ -19,4 +19,5 @@ PRODUCT_PROPERTY_OVERRIDES += \ dalvik.vm.heapstartsize=5m \ - dalvik.vm.heapsize=32m + dalvik.vm.growthlimit=32m \ + dalvik.vm.heapsize=128m diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java index d5aa9619962c8..133a7d04003fb 100644 --- a/core/java/android/app/ActivityManager.java +++ b/core/java/android/app/ActivityManager.java @@ -64,8 +64,11 @@ public class ActivityManager { static public int staticGetMemoryClass() { // Really brain dead right now -- just take this from the configured // vm heap size, and assume it is in megabytes and thus ends with "m". - String vmHeapSize = SystemProperties.get("dalvik.vm.smallheapsize", "16m"); - return Integer.parseInt(vmHeapSize.substring(0, vmHeapSize.length()-1)); + String vmHeapSize = SystemProperties.get("dalvik.vm.growthlimit", ""); + if (vmHeapSize != null && !"".equals(vmHeapSize)) { + return Integer.parseInt(vmHeapSize.substring(0, vmHeapSize.length()-1)); + } + return staticGetLargeMemoryClass(); } /** diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index db046ef735974..7cf60f99efbd2 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -3463,7 +3463,7 @@ public final class ActivityThread { } if ((data.appInfo.flags&ApplicationInfo.FLAG_LARGE_HEAP) != 0) { - // XXX bump up Dalvik's heap. + dalvik.system.VMRuntime.getRuntime().clearGrowthLimit(); } // If the app is being launched for full backup or restore, bring it up in