Messaging: Meet Play memory/R8 rules, ship Q icon, and polish home chrome
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -128,6 +128,18 @@ public class BugleApplication extends Application implements UncaughtExceptionHa
|
||||
Trace.endSection();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTrimMemory(final int level) {
|
||||
super.onTrimMemory(level);
|
||||
if (level < TRIM_MEMORY_UI_HIDDEN) {
|
||||
return;
|
||||
}
|
||||
if (LogUtil.isLoggable(TAG, LogUtil.DEBUG)) {
|
||||
LogUtil.d(TAG, "BugleApplication.onTrimMemory " + level);
|
||||
}
|
||||
reclaimCachedBitmaps();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLowMemory() {
|
||||
super.onLowMemory();
|
||||
@@ -135,7 +147,14 @@ public class BugleApplication extends Application implements UncaughtExceptionHa
|
||||
if (LogUtil.isLoggable(TAG, LogUtil.DEBUG)) {
|
||||
LogUtil.d(TAG, "BugleApplication.onLowMemory");
|
||||
}
|
||||
Factory.get().reclaimMemory();
|
||||
reclaimCachedBitmaps();
|
||||
}
|
||||
|
||||
private static void reclaimCachedBitmaps() {
|
||||
final Factory factory = Factory.get();
|
||||
if (factory != null) {
|
||||
factory.reclaimMemory();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user