Merge "Fix flash caused by frame resize code" into klp-dev
This commit is contained in:
@@ -39,7 +39,7 @@ public interface ChallengeLayout {
|
||||
*
|
||||
* @param b true to show, false to hide
|
||||
*/
|
||||
void showChallenge(boolean b);
|
||||
void showChallenge(boolean show);
|
||||
|
||||
/**
|
||||
* Show the bouncer challenge. This may block access to other child views.
|
||||
|
||||
@@ -120,21 +120,19 @@ public class KeyguardViewStateManager implements
|
||||
|
||||
public void fadeOutSecurity(int duration) {
|
||||
((View) mKeyguardSecurityContainer).animate().alpha(0f).setDuration(duration)
|
||||
.setListener(mPauseListener).start();
|
||||
.setListener(mPauseListener);
|
||||
}
|
||||
|
||||
public void fadeInSecurity(int duration) {
|
||||
((View) mKeyguardSecurityContainer).animate().alpha(1f).setDuration(duration)
|
||||
.setListener(mResumeListener).start();
|
||||
.setListener(mResumeListener);
|
||||
}
|
||||
|
||||
public void onPageBeginMoving() {
|
||||
if (mChallengeLayout.isChallengeOverlapping() &&
|
||||
mChallengeLayout instanceof SlidingChallengeLayout) {
|
||||
SlidingChallengeLayout scl = (SlidingChallengeLayout) mChallengeLayout;
|
||||
if (!mKeyguardWidgetPager.isWarping()) {
|
||||
scl.fadeOutChallenge();
|
||||
}
|
||||
scl.fadeOutChallenge();
|
||||
mPageIndexOnPageBeginMoving = mKeyguardWidgetPager.getCurrentPage();
|
||||
}
|
||||
// We use mAppWidgetToShow to show a particular widget after you add it--
|
||||
@@ -158,9 +156,6 @@ public class KeyguardViewStateManager implements
|
||||
boolean isCameraPage = newPage instanceof CameraWidgetFrame;
|
||||
SlidingChallengeLayout scl = (SlidingChallengeLayout) mChallengeLayout;
|
||||
scl.setChallengeInteractive(!isCameraPage);
|
||||
if (isCameraPage) {
|
||||
scl.fadeOutChallenge();
|
||||
}
|
||||
final int currentFlags = mKeyguardWidgetPager.getSystemUiVisibility();
|
||||
final int newFlags = isCameraPage ? (currentFlags | View.STATUS_BAR_DISABLE_SEARCH)
|
||||
: (currentFlags & ~View.STATUS_BAR_DISABLE_SEARCH);
|
||||
@@ -197,7 +192,7 @@ public class KeyguardViewStateManager implements
|
||||
boolean challengeOverlapping = mChallengeLayout.isChallengeOverlapping();
|
||||
if (challengeOverlapping && !newCurPage.isSmall()
|
||||
&& mPageListeningToSlider != newPageIndex) {
|
||||
newCurPage.shrinkWidget();
|
||||
newCurPage.shrinkWidget(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -375,10 +375,6 @@ public class KeyguardWidgetFrame extends FrameLayout {
|
||||
return mSmallFrameHeight;
|
||||
}
|
||||
|
||||
public void shrinkWidget() {
|
||||
shrinkWidget(true);
|
||||
}
|
||||
|
||||
public void setWidgetLockedSmall(boolean locked) {
|
||||
if (locked) {
|
||||
setWidgetHeight(mSmallWidgetHeight);
|
||||
|
||||
@@ -194,7 +194,9 @@ public class KeyguardWidgetPager extends PagedView implements PagedView.PageSwit
|
||||
|
||||
@Override
|
||||
public void onPageEndWarp() {
|
||||
hideOutlinesAndSidePages();
|
||||
// if we're moving to the warp page, then immediately hide the other widgets.
|
||||
int duration = getPageWarpIndex() == getNextPage() ? 0 : -1;
|
||||
animateOutlinesAndSidePages(false, duration);
|
||||
mViewStateManager.onPageEndWarp();
|
||||
}
|
||||
|
||||
@@ -669,7 +671,7 @@ public class KeyguardWidgetPager extends PagedView implements PagedView.PageSwit
|
||||
// On the very first measure pass, if the challenge is showing, we need to make sure
|
||||
// that the widget on the current page is small.
|
||||
if (challengeShowing && i == mCurrentPage && !mHasMeasure) {
|
||||
frame.shrinkWidget();
|
||||
frame.shrinkWidget(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2725,7 +2725,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
|
||||
};
|
||||
|
||||
private void cancelWarpAnimation(String msg, boolean abortAnimation) {
|
||||
if (DEBUG_WARP) Log.v(TAG, "cancelWarpAnimation(" + msg + ")");
|
||||
if (DEBUG_WARP) Log.v(TAG, "cancelWarpAnimation(" + msg + ",abort=" + abortAnimation + ")");
|
||||
if (abortAnimation) {
|
||||
// We're done with the animation and moving to a new page. Let the scroller
|
||||
// take over the animation.
|
||||
|
||||
Reference in New Issue
Block a user