am 8ac67e62: Merge "Fix flash caused by frame resize code" into klp-dev
* commit '8ac67e62818137c2c3b8a81b795432beb112e29c': Fix flash caused by frame resize code
This commit is contained in:
@@ -39,7 +39,7 @@ public interface ChallengeLayout {
|
|||||||
*
|
*
|
||||||
* @param b true to show, false to hide
|
* @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.
|
* 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) {
|
public void fadeOutSecurity(int duration) {
|
||||||
((View) mKeyguardSecurityContainer).animate().alpha(0f).setDuration(duration)
|
((View) mKeyguardSecurityContainer).animate().alpha(0f).setDuration(duration)
|
||||||
.setListener(mPauseListener).start();
|
.setListener(mPauseListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void fadeInSecurity(int duration) {
|
public void fadeInSecurity(int duration) {
|
||||||
((View) mKeyguardSecurityContainer).animate().alpha(1f).setDuration(duration)
|
((View) mKeyguardSecurityContainer).animate().alpha(1f).setDuration(duration)
|
||||||
.setListener(mResumeListener).start();
|
.setListener(mResumeListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onPageBeginMoving() {
|
public void onPageBeginMoving() {
|
||||||
if (mChallengeLayout.isChallengeOverlapping() &&
|
if (mChallengeLayout.isChallengeOverlapping() &&
|
||||||
mChallengeLayout instanceof SlidingChallengeLayout) {
|
mChallengeLayout instanceof SlidingChallengeLayout) {
|
||||||
SlidingChallengeLayout scl = (SlidingChallengeLayout) mChallengeLayout;
|
SlidingChallengeLayout scl = (SlidingChallengeLayout) mChallengeLayout;
|
||||||
if (!mKeyguardWidgetPager.isWarping()) {
|
scl.fadeOutChallenge();
|
||||||
scl.fadeOutChallenge();
|
|
||||||
}
|
|
||||||
mPageIndexOnPageBeginMoving = mKeyguardWidgetPager.getCurrentPage();
|
mPageIndexOnPageBeginMoving = mKeyguardWidgetPager.getCurrentPage();
|
||||||
}
|
}
|
||||||
// We use mAppWidgetToShow to show a particular widget after you add it--
|
// 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;
|
boolean isCameraPage = newPage instanceof CameraWidgetFrame;
|
||||||
SlidingChallengeLayout scl = (SlidingChallengeLayout) mChallengeLayout;
|
SlidingChallengeLayout scl = (SlidingChallengeLayout) mChallengeLayout;
|
||||||
scl.setChallengeInteractive(!isCameraPage);
|
scl.setChallengeInteractive(!isCameraPage);
|
||||||
if (isCameraPage) {
|
|
||||||
scl.fadeOutChallenge();
|
|
||||||
}
|
|
||||||
final int currentFlags = mKeyguardWidgetPager.getSystemUiVisibility();
|
final int currentFlags = mKeyguardWidgetPager.getSystemUiVisibility();
|
||||||
final int newFlags = isCameraPage ? (currentFlags | View.STATUS_BAR_DISABLE_SEARCH)
|
final int newFlags = isCameraPage ? (currentFlags | View.STATUS_BAR_DISABLE_SEARCH)
|
||||||
: (currentFlags & ~View.STATUS_BAR_DISABLE_SEARCH);
|
: (currentFlags & ~View.STATUS_BAR_DISABLE_SEARCH);
|
||||||
@@ -197,7 +192,7 @@ public class KeyguardViewStateManager implements
|
|||||||
boolean challengeOverlapping = mChallengeLayout.isChallengeOverlapping();
|
boolean challengeOverlapping = mChallengeLayout.isChallengeOverlapping();
|
||||||
if (challengeOverlapping && !newCurPage.isSmall()
|
if (challengeOverlapping && !newCurPage.isSmall()
|
||||||
&& mPageListeningToSlider != newPageIndex) {
|
&& mPageListeningToSlider != newPageIndex) {
|
||||||
newCurPage.shrinkWidget();
|
newCurPage.shrinkWidget(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -375,10 +375,6 @@ public class KeyguardWidgetFrame extends FrameLayout {
|
|||||||
return mSmallFrameHeight;
|
return mSmallFrameHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void shrinkWidget() {
|
|
||||||
shrinkWidget(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setWidgetLockedSmall(boolean locked) {
|
public void setWidgetLockedSmall(boolean locked) {
|
||||||
if (locked) {
|
if (locked) {
|
||||||
setWidgetHeight(mSmallWidgetHeight);
|
setWidgetHeight(mSmallWidgetHeight);
|
||||||
|
|||||||
@@ -194,7 +194,9 @@ public class KeyguardWidgetPager extends PagedView implements PagedView.PageSwit
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPageEndWarp() {
|
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();
|
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
|
// 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.
|
// that the widget on the current page is small.
|
||||||
if (challengeShowing && i == mCurrentPage && !mHasMeasure) {
|
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) {
|
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) {
|
if (abortAnimation) {
|
||||||
// We're done with the animation and moving to a new page. Let the scroller
|
// We're done with the animation and moving to a new page. Let the scroller
|
||||||
// take over the animation.
|
// take over the animation.
|
||||||
|
|||||||
Reference in New Issue
Block a user