Fix bug where memory trim was not being delivered with correct level.
Also improve how we handle services, keeping track of whether they showed
UI and if so putting them immediately on the LRU list.
Change-Id: I816834668722fc67071863acdb4a7f427a982a08
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index f6cd866..8be8bb8 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -954,7 +954,7 @@
}
public void scheduleTrimMemory(int level) {
- queueOrSendMessage(H.TRIM_MEMORY, level);
+ queueOrSendMessage(H.TRIM_MEMORY, null, level);
}
}
@@ -1184,8 +1184,10 @@
break;
case UPDATE_PACKAGE_COMPATIBILITY_INFO:
handleUpdatePackageCompatibilityInfo((UpdateCompatibilityData)msg.obj);
+ break;
case TRIM_MEMORY:
handleTrimMemory(msg.arg1);
+ break;
}
if (DEBUG_MESSAGES) Slog.v(TAG, "<<< done: " + msg.what);
}