Fix issue #5713576: Home redraws after returning from app on Nexus S 4G
Turn of destroying of activities during memory trimming. Change-Id: Ibea415c13fca4f67f56adefe81a1495f5f9ad273
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user