Merge "Improve the first frame latency of BP showing" into tm-qpr-dev
This commit is contained in:
@@ -485,45 +485,18 @@ public class AuthContainerView extends LinearLayout
|
|||||||
mContainerState = STATE_SHOWING;
|
mContainerState = STATE_SHOWING;
|
||||||
} else {
|
} else {
|
||||||
mContainerState = STATE_ANIMATING_IN;
|
mContainerState = STATE_ANIMATING_IN;
|
||||||
// The background panel and content are different views since we need to be able to
|
setY(mTranslationY);
|
||||||
// animate them separately in other places.
|
|
||||||
mPanelView.setY(mTranslationY);
|
|
||||||
mBiometricScrollView.setY(mTranslationY);
|
|
||||||
|
|
||||||
setAlpha(0f);
|
setAlpha(0f);
|
||||||
final long animateDuration = mConfig.mSkipAnimation ? 0 : ANIMATION_DURATION_SHOW_MS;
|
final long animateDuration = mConfig.mSkipAnimation ? 0 : ANIMATION_DURATION_SHOW_MS;
|
||||||
postOnAnimation(() -> {
|
postOnAnimation(() -> {
|
||||||
mPanelView.animate()
|
|
||||||
.translationY(0)
|
|
||||||
.setDuration(animateDuration)
|
|
||||||
.setInterpolator(mLinearOutSlowIn)
|
|
||||||
.setListener(getJankListener(mPanelView, SHOW, animateDuration))
|
|
||||||
.withLayer()
|
|
||||||
.withEndAction(this::onDialogAnimatedIn)
|
|
||||||
.start();
|
|
||||||
mBiometricScrollView.animate()
|
|
||||||
.translationY(0)
|
|
||||||
.setDuration(animateDuration)
|
|
||||||
.setInterpolator(mLinearOutSlowIn)
|
|
||||||
.setListener(getJankListener(mBiometricScrollView, SHOW, animateDuration))
|
|
||||||
.withLayer()
|
|
||||||
.start();
|
|
||||||
if (mCredentialView != null && mCredentialView.isAttachedToWindow()) {
|
|
||||||
mCredentialView.setY(mTranslationY);
|
|
||||||
mCredentialView.animate()
|
|
||||||
.translationY(0)
|
|
||||||
.setDuration(animateDuration)
|
|
||||||
.setInterpolator(mLinearOutSlowIn)
|
|
||||||
.setListener(getJankListener(mCredentialView, SHOW, animateDuration))
|
|
||||||
.withLayer()
|
|
||||||
.start();
|
|
||||||
}
|
|
||||||
animate()
|
animate()
|
||||||
.alpha(1f)
|
.alpha(1f)
|
||||||
|
.translationY(0)
|
||||||
.setDuration(animateDuration)
|
.setDuration(animateDuration)
|
||||||
.setInterpolator(mLinearOutSlowIn)
|
.setInterpolator(mLinearOutSlowIn)
|
||||||
.withLayer()
|
.withLayer()
|
||||||
.setListener(getJankListener(this, SHOW, animateDuration))
|
.setListener(getJankListener(this, SHOW, animateDuration))
|
||||||
|
.withEndAction(this::onDialogAnimatedIn)
|
||||||
.start();
|
.start();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -802,32 +775,9 @@ public class AuthContainerView extends LinearLayout
|
|||||||
|
|
||||||
final long animateDuration = mConfig.mSkipAnimation ? 0 : ANIMATION_DURATION_AWAY_MS;
|
final long animateDuration = mConfig.mSkipAnimation ? 0 : ANIMATION_DURATION_AWAY_MS;
|
||||||
postOnAnimation(() -> {
|
postOnAnimation(() -> {
|
||||||
mPanelView.animate()
|
|
||||||
.translationY(mTranslationY)
|
|
||||||
.setDuration(animateDuration)
|
|
||||||
.setInterpolator(mLinearOutSlowIn)
|
|
||||||
.setListener(getJankListener(mPanelView, DISMISS, animateDuration))
|
|
||||||
.withLayer()
|
|
||||||
.withEndAction(endActionRunnable)
|
|
||||||
.start();
|
|
||||||
mBiometricScrollView.animate()
|
|
||||||
.translationY(mTranslationY)
|
|
||||||
.setDuration(animateDuration)
|
|
||||||
.setInterpolator(mLinearOutSlowIn)
|
|
||||||
.setListener(getJankListener(mBiometricScrollView, DISMISS, animateDuration))
|
|
||||||
.withLayer()
|
|
||||||
.start();
|
|
||||||
if (mCredentialView != null && mCredentialView.isAttachedToWindow()) {
|
|
||||||
mCredentialView.animate()
|
|
||||||
.translationY(mTranslationY)
|
|
||||||
.setDuration(animateDuration)
|
|
||||||
.setInterpolator(mLinearOutSlowIn)
|
|
||||||
.setListener(getJankListener(mCredentialView, DISMISS, animateDuration))
|
|
||||||
.withLayer()
|
|
||||||
.start();
|
|
||||||
}
|
|
||||||
animate()
|
animate()
|
||||||
.alpha(0f)
|
.alpha(0f)
|
||||||
|
.translationY(mTranslationY)
|
||||||
.setDuration(animateDuration)
|
.setDuration(animateDuration)
|
||||||
.setInterpolator(mLinearOutSlowIn)
|
.setInterpolator(mLinearOutSlowIn)
|
||||||
.setListener(getJankListener(this, DISMISS, animateDuration))
|
.setListener(getJankListener(this, DISMISS, animateDuration))
|
||||||
@@ -842,6 +792,7 @@ public class AuthContainerView extends LinearLayout
|
|||||||
mWindowManager.updateViewLayout(this, lp);
|
mWindowManager.updateViewLayout(this, lp);
|
||||||
})
|
})
|
||||||
.withLayer()
|
.withLayer()
|
||||||
|
.withEndAction(endActionRunnable)
|
||||||
.start();
|
.start();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user