Override onTrimMemory to apply trimMemory in AppIconCacheManager

This CL adapts new trimMemory mechanism when device running moderately
low on memory.

Bug: 259630755
Test: manual
Change-Id: I6501b834ce3327f47e911600ac6fe2f09a80e54e
This commit is contained in:
Shen Lin
2022-11-18 16:55:08 +08:00
parent eef6d0cb24
commit d0daff5a6d

View File

@@ -47,8 +47,8 @@ public class SettingsApplication extends Application {
} }
@Override @Override
public void onLowMemory() { public void onTrimMemory(int level) {
super.onLowMemory(); super.onTrimMemory(level);
AppIconCacheManager.getInstance().release(); AppIconCacheManager.getInstance().trimMemory(level);
} }
} }