Finish the recents animation when the phone goes to sleep
Fixes: 169988381
Test: manual
Change-Id: I62527ef46009a1417e67637c512b3a2fc005bcd6
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 5896f5a..e5190fd 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -1346,14 +1346,7 @@
private final BroadcastReceiver mScreenOffReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
- // Reset AllApps to its initial state only if we are not in the middle of
- // processing a multi-step drop
- if (mPendingRequestArgs == null) {
- if (!isInState(NORMAL)) {
- onUiChangedWhileSleeping();
- }
- mStateManager.goToState(NORMAL);
- }
+ onScreenOff();
}
};
@@ -1923,6 +1916,17 @@
}
}
+ protected void onScreenOff() {
+ // Reset AllApps to its initial state only if we are not in the middle of
+ // processing a multi-step drop
+ if (mPendingRequestArgs == null) {
+ if (!isInState(NORMAL)) {
+ onUiChangedWhileSleeping();
+ }
+ mStateManager.goToState(NORMAL);
+ }
+ }
+
@TargetApi(Build.VERSION_CODES.M)
@Override
protected boolean onErrorStartingShortcut(Intent intent, ItemInfo info) {