Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 617b3b71 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove getState from InsetsAnimationControlCallbacks"

parents ce826bba 235728ef
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -51,12 +51,6 @@ public interface InsetsAnimationControlCallbacks {
     */
    void notifyFinished(InsetsAnimationControlImpl controller, boolean shown);

    /**
     * Get the description of the insets state.
     * @return {@link InsetsState} for adjusting corresponding {@link InsetsSource}.
     */
    InsetsState getState();

    /**
     * Apply the new params to the surface.
     * @param params The {@link android.view.SyncRtSurfaceTransactionApplier.SurfaceParams} to
+1 −7
Original line number Diff line number Diff line
@@ -191,13 +191,7 @@ public class InsetsAnimationControlImpl implements WindowInsetsAnimationControll
        if (mCancelled) {
            return;
        }
        InsetsState state = new InsetsState(mController.getState());
        for (int i = mControls.size() - 1; i >= 0; i--) {
            InsetsSourceControl control = mControls.valueAt(i);
            state.getSource(control.getType()).setVisible(shown);
        }
        Insets insets = getInsetsFromState(state, mFrame, null /* typeSideMap */);
        setInsetsAndAlpha(insets, 1f /* alpha */, 1f /* fraction */);
        setInsetsAndAlpha(shown ? mShownInsets : mHiddenInsets, 1f /* alpha */, 1f /* fraction */);
        mFinished = true;
        mShownOnFinish = shown;
    }
+0 −2
Original line number Diff line number Diff line
@@ -176,8 +176,6 @@ public class InsetsAnimationControlImplTest {
        when(mMockController.getState()).thenReturn(mInsetsState);
        mController.finish(true /* shown */);
        mController.applyChangeInsets(mInsetsState);
        assertTrue(mInsetsState.getSource(ITYPE_STATUS_BAR).isVisible());
        assertTrue(mInsetsState.getSource(ITYPE_NAVIGATION_BAR).isVisible());
        assertEquals(Insets.of(0, 100, 100, 0), mController.getCurrentInsets());
        verify(mMockController).notifyFinished(eq(mController), eq(true /* shown */));
    }