Loading quickstep/src/com/android/quickstep/RecentsAnimationController.java +12 −19 Original line number Diff line number Diff line Loading @@ -29,7 +29,6 @@ import android.view.KeyEvent; import android.view.MotionEvent; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.UiThread; import com.android.launcher3.util.Preconditions; Loading Loading @@ -58,8 +57,7 @@ public class RecentsAnimationController { private boolean mUseLauncherSysBarFlags = false; private boolean mSplitScreenMinimized = false; private boolean mTouchInProgress; private boolean mFinishPending; private @Nullable Runnable mFinishPendingCallback; private boolean mDisableInputProxyPending; public RecentsAnimationController(RecentsAnimationControllerCompat controller, boolean allowMinimizeSplitScreen, Loading Loading @@ -138,12 +136,12 @@ public class RecentsAnimationController { @UiThread public void finishAnimationToHome() { finishAndClear(true /* toRecents */, null, false /* sendUserLeaveHint */); finishAndDisableInputProxy(true /* toRecents */, null, false /* sendUserLeaveHint */); } @UiThread public void finishAnimationToApp() { finishAndClear(false /* toRecents */, null, false /* sendUserLeaveHint */); finishAndDisableInputProxy(false /* toRecents */, null, false /* sendUserLeaveHint */); } /** See {@link #finish(boolean, Runnable, boolean)} */ Loading @@ -162,19 +160,16 @@ public class RecentsAnimationController { @UiThread public void finish(boolean toRecents, Runnable onFinishComplete, boolean sendUserLeaveHint) { Preconditions.assertUIThread(); if (!toRecents) { finishAndClear(false, onFinishComplete, sendUserLeaveHint); } else { if (mTouchInProgress) { mFinishPending = true; mFinishPendingCallback = onFinishComplete; if (toRecents && mTouchInProgress) { // Finish the controller as requested, but don't disable input proxy yet. mDisableInputProxyPending = true; finishController(toRecents, onFinishComplete, sendUserLeaveHint); } else { finishAndClear(true, onFinishComplete, sendUserLeaveHint); } finishAndDisableInputProxy(toRecents, onFinishComplete, sendUserLeaveHint); } } private void finishAndClear(boolean toRecents, Runnable onFinishComplete, private void finishAndDisableInputProxy(boolean toRecents, Runnable onFinishComplete, boolean sendUserLeaveHint) { disableInputProxy(); finishController(toRecents, onFinishComplete, sendUserLeaveHint); Loading Loading @@ -262,11 +257,9 @@ public class RecentsAnimationController { } else if (action == ACTION_CANCEL || action == ACTION_UP) { // Finish any pending actions mTouchInProgress = false; if (mFinishPending) { mFinishPending = false; finishAndClear(true /* toRecents */, mFinishPendingCallback, false /* sendUserLeaveHint */); mFinishPendingCallback = null; if (mDisableInputProxyPending) { mDisableInputProxyPending = false; disableInputProxy(); } } if (mInputConsumer != null) { Loading Loading
quickstep/src/com/android/quickstep/RecentsAnimationController.java +12 −19 Original line number Diff line number Diff line Loading @@ -29,7 +29,6 @@ import android.view.KeyEvent; import android.view.MotionEvent; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.UiThread; import com.android.launcher3.util.Preconditions; Loading Loading @@ -58,8 +57,7 @@ public class RecentsAnimationController { private boolean mUseLauncherSysBarFlags = false; private boolean mSplitScreenMinimized = false; private boolean mTouchInProgress; private boolean mFinishPending; private @Nullable Runnable mFinishPendingCallback; private boolean mDisableInputProxyPending; public RecentsAnimationController(RecentsAnimationControllerCompat controller, boolean allowMinimizeSplitScreen, Loading Loading @@ -138,12 +136,12 @@ public class RecentsAnimationController { @UiThread public void finishAnimationToHome() { finishAndClear(true /* toRecents */, null, false /* sendUserLeaveHint */); finishAndDisableInputProxy(true /* toRecents */, null, false /* sendUserLeaveHint */); } @UiThread public void finishAnimationToApp() { finishAndClear(false /* toRecents */, null, false /* sendUserLeaveHint */); finishAndDisableInputProxy(false /* toRecents */, null, false /* sendUserLeaveHint */); } /** See {@link #finish(boolean, Runnable, boolean)} */ Loading @@ -162,19 +160,16 @@ public class RecentsAnimationController { @UiThread public void finish(boolean toRecents, Runnable onFinishComplete, boolean sendUserLeaveHint) { Preconditions.assertUIThread(); if (!toRecents) { finishAndClear(false, onFinishComplete, sendUserLeaveHint); } else { if (mTouchInProgress) { mFinishPending = true; mFinishPendingCallback = onFinishComplete; if (toRecents && mTouchInProgress) { // Finish the controller as requested, but don't disable input proxy yet. mDisableInputProxyPending = true; finishController(toRecents, onFinishComplete, sendUserLeaveHint); } else { finishAndClear(true, onFinishComplete, sendUserLeaveHint); } finishAndDisableInputProxy(toRecents, onFinishComplete, sendUserLeaveHint); } } private void finishAndClear(boolean toRecents, Runnable onFinishComplete, private void finishAndDisableInputProxy(boolean toRecents, Runnable onFinishComplete, boolean sendUserLeaveHint) { disableInputProxy(); finishController(toRecents, onFinishComplete, sendUserLeaveHint); Loading Loading @@ -262,11 +257,9 @@ public class RecentsAnimationController { } else if (action == ACTION_CANCEL || action == ACTION_UP) { // Finish any pending actions mTouchInProgress = false; if (mFinishPending) { mFinishPending = false; finishAndClear(true /* toRecents */, mFinishPendingCallback, false /* sendUserLeaveHint */); mFinishPendingCallback = null; if (mDisableInputProxyPending) { mDisableInputProxyPending = false; disableInputProxy(); } } if (mInputConsumer != null) { Loading