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
diff --git a/quickstep/src/com/android/quickstep/RecentsActivity.java b/quickstep/src/com/android/quickstep/RecentsActivity.java
index 6075294..59cd639 100644
--- a/quickstep/src/com/android/quickstep/RecentsActivity.java
+++ b/quickstep/src/com/android/quickstep/RecentsActivity.java
@@ -362,6 +362,14 @@
}
@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();
AccessibilityManagerCompat.sendStateEventToTest(getBaseContext(), OVERVIEW_STATE_ORDINAL);