Send trim memory to trim icon cache when stopped

- Workaround for b/78520668

Bug: 76162466

Change-Id: I2c225c59484984a671186415cb1eb19161f57ba6
This commit is contained in:
Winson Chung 2018-04-24 13:02:10 -07:00
parent 406c08727e
commit dea51350d6
2 changed files with 10 additions and 0 deletions

View File

@ -225,6 +225,14 @@ public class RecentsActivity extends BaseDraggingActivity {
mFallbackRecentsView.resetTaskVisuals();
}
@Override
protected void onStop() {
super.onStop();
// Workaround for b/78520668, explicitly trim memory once UI is hidden
UiFactory.onTrimMemory(this, TRIM_MEMORY_UI_HIDDEN);
}
@Override
public void onTrimMemory(int level) {
super.onTrimMemory(level);

View File

@ -737,6 +737,8 @@ public class Launcher extends BaseDraggingActivity
NotificationListener.removeNotificationsChangedListener();
getStateManager().moveToRestState();
// Workaround for b/78520668, explicitly trim memory once UI is hidden
UiFactory.onTrimMemory(this, TRIM_MEMORY_UI_HIDDEN);
}
@Override