Loading policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewStateManager.java +7 −2 Original line number Diff line number Diff line Loading @@ -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); } Loading Loading @@ -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()) { Loading @@ -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)); } } Loading policy/src/com/android/internal/policy/impl/keyguard/KeyguardWidgetFrame.java +14 −2 Original line number Diff line number Diff line Loading @@ -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) { Loading @@ -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) { Loading Loading
policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewStateManager.java +7 −2 Original line number Diff line number Diff line Loading @@ -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); } Loading Loading @@ -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()) { Loading @@ -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)); } } Loading
policy/src/com/android/internal/policy/impl/keyguard/KeyguardWidgetFrame.java +14 −2 Original line number Diff line number Diff line Loading @@ -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) { Loading @@ -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) { Loading