Set burn-in offsets to 0 if darkAmount=0

Fixes: 230461243
Test: manual
Change-Id: I53b023a31c3fa6d53629051a75efcf95a75147e6
This commit is contained in:
Beverly
2022-04-26 13:27:34 +00:00
parent b49c8b3a3a
commit acd8594fde

View File

@@ -127,17 +127,19 @@ public class UdfpsKeyguardView extends UdfpsAnimationView {
mBurnInProgress = MathUtils.lerp(0f, getBurnInProgressOffset(), darkAmountForAnimation);
if (mAnimatingBetweenAodAndLockscreen && !mPauseAuth) {
mLockScreenFp.setTranslationX(mBurnInOffsetX);
mLockScreenFp.setTranslationY(mBurnInOffsetY);
mBgProtection.setAlpha(1f - mInterpolatedDarkAmount);
mLockScreenFp.setAlpha(1f - mInterpolatedDarkAmount);
} else if (mInterpolatedDarkAmount == 0f) {
mLockScreenFp.setTranslationX(0);
mLockScreenFp.setTranslationY(0);
mBgProtection.setAlpha(mAlpha / 255f);
mLockScreenFp.setAlpha(mAlpha / 255f);
} else {
mBgProtection.setAlpha(0f);
mLockScreenFp.setAlpha(0f);
}
mLockScreenFp.setTranslationX(mBurnInOffsetX);
mLockScreenFp.setTranslationY(mBurnInOffsetY);
mLockScreenFp.setProgress(1f - mInterpolatedDarkAmount);
mAodFp.setTranslationX(mBurnInOffsetX);