Dismiss recents when device goes to sleep

Dismiss recents automatically after lock and unlock the device, otherwise recents screen becomes non-responsive for 3P Launchers.

Bug: 319365581
Change-Id: I6571f25cf311ca586f6d9c9e1228f1addcbed1f1
Flag: EXEMPT bugfix.
Test: FallbackRecentsTest
This commit is contained in:
Jordan Silva
2024-12-04 18:37:47 +00:00
parent 9fdf9efdd2
commit aed3b14abc
@@ -361,6 +361,14 @@ public final class RecentsActivity extends StatefulActivity<RecentsState> implem
this, LAUNCHER_ACTIVITY_STOPPED_MESSAGE);
}
@Override
public void onUiChangedWhileSleeping() {
super.onUiChangedWhileSleeping();
// Dismiss recents and navigate to home if the device goes to sleep
// while in recents.
startHome();
}
@Override
protected void onResume() {
super.onResume();