Add call to (new) Canvas.freeCaches() in response to low-memory
This is in conjunction with removing a similar call made by the browser.
Now it will be centralized, and the browser's call site will be removed.
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 09862d2..3bd76a6 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -3496,6 +3496,9 @@
int sqliteReleased = SQLiteDatabase.releaseMemory();
EventLog.writeEvent(SQLITE_MEM_RELEASED_EVENT_LOG_TAG, sqliteReleased);
}
+
+ // Ask graphics to free up as much as possible (font/image caches)
+ Canvas.freeCaches();
BinderInternal.forceGc("mem");
}