summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Dianne Hackborn <hackbod@google.com> 2011-12-05 18:05:31 -0800
committer Dianne Hackborn <hackbod@google.com> 2011-12-05 19:00:42 -0800
commit77eaaf04c6d73a6cc2f09bf6573babb578d27ae7 (patch)
treeead9891d281f78f1dd6e61e338f90d3bed9b3d20
parent003c15d72ccd3856d5abfe6d66a2a40d0eca85bc (diff)
Fix issue #5713576: Home redraws after returning from app on Nexus S 4G
Turn of destroying of activities during memory trimming. Change-Id: Ibea415c13fca4f67f56adefe81a1495f5f9ad273
-rw-r--r--services/java/com/android/server/am/ActivityManagerService.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index a4d321dadb1e..df58e83186ac 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -14419,10 +14419,16 @@ public final class ActivityManagerService extends ActivityManagerNative
app.thread.scheduleTrimMemory(curLevel);
} catch (RemoteException e) {
}
- if (curLevel >= ComponentCallbacks2.TRIM_MEMORY_COMPLETE) {
- // For these apps we will also finish their activities
- // to help them free memory.
- mMainStack.destroyActivitiesLocked(app, false, "trim");
+ if (false) {
+ // For now we won't do this; our memory trimming seems
+ // to be good enough at this point that destroying
+ // activities causes more harm than good.
+ if (curLevel >= ComponentCallbacks2.TRIM_MEMORY_COMPLETE
+ && app != mHomeProcess && app != mPreviousProcess) {
+ // For these apps we will also finish their activities
+ // to help them free memory.
+ mMainStack.destroyActivitiesLocked(app, false, "trim");
+ }
}
}
app.trimMemoryLevel = curLevel;