Loading core/java/android/view/InsetsAnimationControlImpl.java +2 −1 Original line number Diff line number Diff line Loading @@ -122,7 +122,8 @@ public class InsetsAnimationControlImpl implements WindowInsetsAnimationControll mController.scheduleApplyChangeInsets(); } void applyChangeInsets(InsetsState state) { @VisibleForTesting public void applyChangeInsets(InsetsState state) { final Insets offset = Insets.subtract(mShownInsets, mPendingInsets); ArrayList<SurfaceParams> params = new ArrayList<>(); if (offset.left != 0) { Loading core/java/android/view/InsetsController.java +6 −3 Original line number Diff line number Diff line Loading @@ -231,15 +231,18 @@ public class InsetsController implements WindowInsetsController { mState.dump(prefix + " ", pw); } void dispatchAnimationStarted(WindowInsetsAnimationListener.InsetsAnimation animation) { @VisibleForTesting public void dispatchAnimationStarted(WindowInsetsAnimationListener.InsetsAnimation animation) { mViewRoot.mView.dispatchWindowInsetsAnimationStarted(animation); } void dispatchAnimationFinished(WindowInsetsAnimationListener.InsetsAnimation animation) { @VisibleForTesting public void dispatchAnimationFinished(WindowInsetsAnimationListener.InsetsAnimation animation) { mViewRoot.mView.dispatchWindowInsetsAnimationFinished(animation); } void scheduleApplyChangeInsets() { @VisibleForTesting public void scheduleApplyChangeInsets() { if (!mAnimCallbackScheduled) { mViewRoot.mChoreographer.postCallback(Choreographer.CALLBACK_INSETS_ANIMATION, mAnimCallback, null /* token*/); Loading core/tests/coretests/src/android/view/InsetsAnimationControlImplTest.java +1 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,7 @@ public class InsetsAnimationControlImplTest { @Test public void testChangeInsets() { mController.changeInsets(Insets.of(0, 30, 40, 0)); mController.applyChangeInsets(new InsetsState()); assertEquals(Insets.of(0, 30, 40, 0), mController.getCurrentInsets()); ArgumentCaptor<SurfaceParams> captor = ArgumentCaptor.forClass(SurfaceParams.class); Loading Loading
core/java/android/view/InsetsAnimationControlImpl.java +2 −1 Original line number Diff line number Diff line Loading @@ -122,7 +122,8 @@ public class InsetsAnimationControlImpl implements WindowInsetsAnimationControll mController.scheduleApplyChangeInsets(); } void applyChangeInsets(InsetsState state) { @VisibleForTesting public void applyChangeInsets(InsetsState state) { final Insets offset = Insets.subtract(mShownInsets, mPendingInsets); ArrayList<SurfaceParams> params = new ArrayList<>(); if (offset.left != 0) { Loading
core/java/android/view/InsetsController.java +6 −3 Original line number Diff line number Diff line Loading @@ -231,15 +231,18 @@ public class InsetsController implements WindowInsetsController { mState.dump(prefix + " ", pw); } void dispatchAnimationStarted(WindowInsetsAnimationListener.InsetsAnimation animation) { @VisibleForTesting public void dispatchAnimationStarted(WindowInsetsAnimationListener.InsetsAnimation animation) { mViewRoot.mView.dispatchWindowInsetsAnimationStarted(animation); } void dispatchAnimationFinished(WindowInsetsAnimationListener.InsetsAnimation animation) { @VisibleForTesting public void dispatchAnimationFinished(WindowInsetsAnimationListener.InsetsAnimation animation) { mViewRoot.mView.dispatchWindowInsetsAnimationFinished(animation); } void scheduleApplyChangeInsets() { @VisibleForTesting public void scheduleApplyChangeInsets() { if (!mAnimCallbackScheduled) { mViewRoot.mChoreographer.postCallback(Choreographer.CALLBACK_INSETS_ANIMATION, mAnimCallback, null /* token*/); Loading
core/tests/coretests/src/android/view/InsetsAnimationControlImplTest.java +1 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,7 @@ public class InsetsAnimationControlImplTest { @Test public void testChangeInsets() { mController.changeInsets(Insets.of(0, 30, 40, 0)); mController.applyChangeInsets(new InsetsState()); assertEquals(Insets.of(0, 30, 40, 0), mController.getCurrentInsets()); ArgumentCaptor<SurfaceParams> captor = ArgumentCaptor.forClass(SurfaceParams.class); Loading