Loading libs/WindowManager/Shell/src/com/android/wm/shell/back/BackAnimationController.java +6 −1 Original line number Diff line number Diff line Loading @@ -120,7 +120,7 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont @ShellMainThread private final Handler mHandler; /** True when a back gesture is ongoing */ private boolean mBackGestureStarted = false; @VisibleForTesting public boolean mBackGestureStarted = false; /** Tracks if an uninterruptible animation is in progress */ private boolean mPostCommitAnimationInProgress = false; Loading Loading @@ -511,6 +511,11 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont ProtoLog.d(WM_SHELL_BACK_PREVIEW, "Ignoring MotionEvent because two gestures are already being queued."); return; } else if (mBackGestureStarted && mCurrentTracker.isInInitialState() && mQueuedTracker.isInInitialState()) { ProtoLog.e(WM_SHELL_BACK_PREVIEW, "Both touch trackers in initial state and mBackGestureStarted=true"); mBackGestureStarted = false; } if (keyAction == MotionEvent.ACTION_DOWN) { Loading libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/back/BackAnimationControllerTest.java +8 −0 Original line number Diff line number Diff line Loading @@ -776,6 +776,14 @@ public class BackAnimationControllerTest extends ShellTestCase { verify(mergeCallback, never()).onTransitionFinished(any()); } @Test public void testBackAnimationControllersRecoversFromBadState() throws RemoteException { // put controller into bad state (initial state but mBackGestureStarted=true) mController.mBackGestureStarted = true; verifySystemBackBehavior(BackNavigationInfo.TYPE_CROSS_ACTIVITY, mDefaultCrossActivityBackAnimation.getRunner()); } private RemoteAnimationTarget[] createAppAnimationTargets(int openTaskId, int closeTaskId) { final RemoteAnimationTarget openT = createSingleAnimationTarget(openTaskId, RemoteAnimationTarget.MODE_OPENING); Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/back/BackAnimationController.java +6 −1 Original line number Diff line number Diff line Loading @@ -120,7 +120,7 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont @ShellMainThread private final Handler mHandler; /** True when a back gesture is ongoing */ private boolean mBackGestureStarted = false; @VisibleForTesting public boolean mBackGestureStarted = false; /** Tracks if an uninterruptible animation is in progress */ private boolean mPostCommitAnimationInProgress = false; Loading Loading @@ -511,6 +511,11 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont ProtoLog.d(WM_SHELL_BACK_PREVIEW, "Ignoring MotionEvent because two gestures are already being queued."); return; } else if (mBackGestureStarted && mCurrentTracker.isInInitialState() && mQueuedTracker.isInInitialState()) { ProtoLog.e(WM_SHELL_BACK_PREVIEW, "Both touch trackers in initial state and mBackGestureStarted=true"); mBackGestureStarted = false; } if (keyAction == MotionEvent.ACTION_DOWN) { Loading
libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/back/BackAnimationControllerTest.java +8 −0 Original line number Diff line number Diff line Loading @@ -776,6 +776,14 @@ public class BackAnimationControllerTest extends ShellTestCase { verify(mergeCallback, never()).onTransitionFinished(any()); } @Test public void testBackAnimationControllersRecoversFromBadState() throws RemoteException { // put controller into bad state (initial state but mBackGestureStarted=true) mController.mBackGestureStarted = true; verifySystemBackBehavior(BackNavigationInfo.TYPE_CROSS_ACTIVITY, mDefaultCrossActivityBackAnimation.getRunner()); } private RemoteAnimationTarget[] createAppAnimationTargets(int openTaskId, int closeTaskId) { final RemoteAnimationTarget openT = createSingleAnimationTarget(openTaskId, RemoteAnimationTarget.MODE_OPENING); Loading