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

Commit 1e0f6faf authored by Adam Cohen's avatar Adam Cohen Committed by Android (Google) Code Review
Browse files

Merge "Clean up some flashy jank (issue 7454766)" into jb-mr1-lockscreen-dev

parents 70c2f873 44dc1413
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -220,6 +220,11 @@ public class KeyguardViewStateManager implements
                    mKeyguardWidgetPager.setWidgetToResetOnPageFadeOut(mPageListeningToSlider);
                }
            }
            if (frame.isSmall()) {
                // This is to make sure that if the scroller animation gets cut off midway
                // that the frame doesn't stay in a partial down position.
                frame.setFrameHeight(frame.getSmallFrameHeight());
            }
            if (scrollState != SlidingChallengeLayout.SCROLL_STATE_FADING) {
                frame.hideFrame(this);
            }
@@ -250,7 +255,7 @@ public class KeyguardViewStateManager implements
                if (!frame.isSmall()) {
                    // We need to fetch the final page, in case the pages are in motion.
                    mPageListeningToSlider = mKeyguardWidgetPager.getNextPage();
                    frame.shrinkWidget();
                    frame.shrinkWidget(false);
                }
            } else {
                if (!frame.isSmall()) {
@@ -269,7 +274,7 @@ public class KeyguardViewStateManager implements
    public void onScrollPositionChanged(float scrollPosition, int challengeTop) {
        mChallengeTop = challengeTop;
        KeyguardWidgetFrame frame = mKeyguardWidgetPager.getWidgetPageAt(mPageListeningToSlider);
        if (frame != null && !mKeyguardWidgetPager.isPageMoving()) {
        if (frame != null && mLastScrollState != SlidingChallengeLayout.SCROLL_STATE_FADING) {
            frame.adjustFrame(getChallengeTopRelativeToFrame(frame, mChallengeTop));
        }
    }
+14 −2
Original line number Diff line number Diff line
@@ -329,6 +329,7 @@ public class KeyguardWidgetFrame extends FrameLayout {

    public void setMaxChallengeTop(int top) {
        boolean dirty = mMaxChallengeTop != top;
        mMaxChallengeTop = top;
        mSmallWidgetHeight = top - getPaddingTop();
        mSmallFrameHeight = top + getPaddingBottom();
        if (dirty && mIsSmall) {
@@ -348,11 +349,22 @@ public class KeyguardWidgetFrame extends FrameLayout {
        setFrameHeight(frameHeight);
    }

    public void shrinkWidget() {
    public void shrinkWidget(boolean alsoShrinkFrame) {
        mIsSmall = true;
        setWidgetHeight(mSmallWidgetHeight);

        if (alsoShrinkFrame) {
            setFrameHeight(mSmallFrameHeight);
        }
    }

    public int getSmallFrameHeight() {
        return mSmallFrameHeight;
    }

    public void shrinkWidget() {
        shrinkWidget(true);
    }

    public void setWidgetLockedSmall(boolean locked) {
        if (locked) {