Loading core/java/android/view/InsetsAnimationControlCallbacks.java +3 −1 Original line number Original line Diff line number Diff line Loading @@ -40,8 +40,10 @@ public interface InsetsAnimationControlCallbacks { /** /** * Schedule the apply by posting the animation callback. * Schedule the apply by posting the animation callback. * * @param runner The runner that requested applying insets */ */ void scheduleApplyChangeInsets(); void scheduleApplyChangeInsets(InsetsAnimationControlRunner runner); /** /** * Finish the final steps after the animation. * Finish the final steps after the animation. Loading core/java/android/view/InsetsAnimationControlImpl.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -156,7 +156,7 @@ public class InsetsAnimationControlImpl implements WindowInsetsAnimationControll mPendingFraction = sanitize(fraction); mPendingFraction = sanitize(fraction); mPendingInsets = sanitize(insets); mPendingInsets = sanitize(insets); mPendingAlpha = sanitize(alpha); mPendingAlpha = sanitize(alpha); mController.scheduleApplyChangeInsets(); mController.scheduleApplyChangeInsets(this); } } @VisibleForTesting @VisibleForTesting Loading core/java/android/view/InsetsAnimationThreadControlRunner.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -54,7 +54,7 @@ public class InsetsAnimationThreadControlRunner implements InsetsAnimationContro } } @Override @Override public void scheduleApplyChangeInsets() { public void scheduleApplyChangeInsets(InsetsAnimationControlRunner runner) { mControl.applyChangeInsets(mState); mControl.applyChangeInsets(mState); } } Loading core/java/android/view/InsetsController.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -1076,8 +1076,8 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation @VisibleForTesting @VisibleForTesting @Override @Override public void scheduleApplyChangeInsets() { public void scheduleApplyChangeInsets(InsetsAnimationControlRunner runner) { if (mStartingAnimation) { if (mStartingAnimation || runner.getAnimationType() == ANIMATION_TYPE_USER) { mAnimCallback.run(); mAnimCallback.run(); mAnimCallbackScheduled = false; mAnimCallbackScheduled = false; return; return; Loading core/tests/coretests/src/android/view/InsetsAnimationControlImplTest.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -229,7 +229,7 @@ public class InsetsAnimationControlImplTest { doAnswer(invocation -> { doAnswer(invocation -> { mController.applyChangeInsets(mInsetsState); mController.applyChangeInsets(mInsetsState); return null; return null; }).when(mMockController).scheduleApplyChangeInsets(); }).when(mMockController).scheduleApplyChangeInsets(any()); mController.finish(true /* shown */); mController.finish(true /* shown */); assertEquals(Insets.of(0, 100, 100, 0), mController.getCurrentInsets()); assertEquals(Insets.of(0, 100, 100, 0), mController.getCurrentInsets()); verify(mMockController).notifyFinished(eq(mController), eq(true /* shown */)); verify(mMockController).notifyFinished(eq(mController), eq(true /* shown */)); Loading Loading
core/java/android/view/InsetsAnimationControlCallbacks.java +3 −1 Original line number Original line Diff line number Diff line Loading @@ -40,8 +40,10 @@ public interface InsetsAnimationControlCallbacks { /** /** * Schedule the apply by posting the animation callback. * Schedule the apply by posting the animation callback. * * @param runner The runner that requested applying insets */ */ void scheduleApplyChangeInsets(); void scheduleApplyChangeInsets(InsetsAnimationControlRunner runner); /** /** * Finish the final steps after the animation. * Finish the final steps after the animation. Loading
core/java/android/view/InsetsAnimationControlImpl.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -156,7 +156,7 @@ public class InsetsAnimationControlImpl implements WindowInsetsAnimationControll mPendingFraction = sanitize(fraction); mPendingFraction = sanitize(fraction); mPendingInsets = sanitize(insets); mPendingInsets = sanitize(insets); mPendingAlpha = sanitize(alpha); mPendingAlpha = sanitize(alpha); mController.scheduleApplyChangeInsets(); mController.scheduleApplyChangeInsets(this); } } @VisibleForTesting @VisibleForTesting Loading
core/java/android/view/InsetsAnimationThreadControlRunner.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -54,7 +54,7 @@ public class InsetsAnimationThreadControlRunner implements InsetsAnimationContro } } @Override @Override public void scheduleApplyChangeInsets() { public void scheduleApplyChangeInsets(InsetsAnimationControlRunner runner) { mControl.applyChangeInsets(mState); mControl.applyChangeInsets(mState); } } Loading
core/java/android/view/InsetsController.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -1076,8 +1076,8 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation @VisibleForTesting @VisibleForTesting @Override @Override public void scheduleApplyChangeInsets() { public void scheduleApplyChangeInsets(InsetsAnimationControlRunner runner) { if (mStartingAnimation) { if (mStartingAnimation || runner.getAnimationType() == ANIMATION_TYPE_USER) { mAnimCallback.run(); mAnimCallback.run(); mAnimCallbackScheduled = false; mAnimCallbackScheduled = false; return; return; Loading
core/tests/coretests/src/android/view/InsetsAnimationControlImplTest.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -229,7 +229,7 @@ public class InsetsAnimationControlImplTest { doAnswer(invocation -> { doAnswer(invocation -> { mController.applyChangeInsets(mInsetsState); mController.applyChangeInsets(mInsetsState); return null; return null; }).when(mMockController).scheduleApplyChangeInsets(); }).when(mMockController).scheduleApplyChangeInsets(any()); mController.finish(true /* shown */); mController.finish(true /* shown */); assertEquals(Insets.of(0, 100, 100, 0), mController.getCurrentInsets()); assertEquals(Insets.of(0, 100, 100, 0), mController.getCurrentInsets()); verify(mMockController).notifyFinished(eq(mController), eq(true /* shown */)); verify(mMockController).notifyFinished(eq(mController), eq(true /* shown */)); Loading