Revert "Revert^2 "Cancel gestures on launcher destroy""

This reverts commit 377eb40985.

Reason for revert: failing tests
Fixes: 266606727
Fixes: 266621449

Change-Id: I61094be02fb73c5ad65ee65be5ed93a3364f37ef
This commit is contained in:
Schneider Victor-tulias
2023-01-25 18:21:08 +00:00
parent 68f5667338
commit ece659d11a
6 changed files with 8 additions and 66 deletions
@@ -51,7 +51,6 @@ import static com.android.quickstep.GestureState.STATE_RECENTS_SCROLLING_FINISHE
import static com.android.quickstep.MultiStateCallback.DEBUG_STATES;
import static com.android.quickstep.util.ActiveGestureErrorDetector.GestureEvent.CANCEL_RECENTS_ANIMATION;
import static com.android.quickstep.util.ActiveGestureErrorDetector.GestureEvent.EXPECTING_TASK_APPEARED;
import static com.android.quickstep.util.ActiveGestureErrorDetector.GestureEvent.LAUNCHER_DESTROYED;
import static com.android.quickstep.util.ActiveGestureErrorDetector.GestureEvent.ON_SETTLED_ON_END_TARGET;
import static com.android.quickstep.views.RecentsView.UPDATE_SYSUI_FLAGS_THRESHOLD;
import static com.android.systemui.shared.system.ActivityManagerWrapper.CLOSE_SYSTEM_WINDOWS_REASON_RECENTS;
@@ -183,7 +182,6 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
if (mActivity != activity) {
return;
}
handleActivityDestroyed();
mRecentsView = null;
mActivity = null;
}
@@ -464,7 +462,6 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
if (mStateCallback.hasStates(STATE_HANDLER_INVALIDATED)) {
return false;
}
mStateCallback.resumeCallbacks();
T createdActivity = mActivityInterface.getCreatedActivity();
if (createdActivity != null) {
@@ -534,15 +531,6 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
return true;
}
private void handleActivityDestroyed() {
ActiveGestureLog.INSTANCE.addLog("Launcher activity destroyed", LAUNCHER_DESTROYED);
if (mActivityInterface.shouldCancelGestureOnDestroy()) {
onGestureCancelled();
} else {
mStateCallback.pauseCallbacks();
}
}
/**
* Return true if the window should be translated horizontally if the recents view scrolls
*/