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

Commit ee9bb25a authored by Adam Cohen's avatar Adam Cohen Committed by Android Git Automerger
Browse files

am 230719c7: am 640cf0ab: am 1e0f6faf: Merge "Clean up some flashy jank (issue...

am 230719c7: am 640cf0ab: am 1e0f6faf: Merge "Clean up some flashy jank (issue 7454766)" into jb-mr1-lockscreen-dev

* commit '230719c7':
  Clean up some flashy jank (issue 7454766)
parents 462222fc 230719c7
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) {