Merge "Reset view flipper alpha to 1." into tm-qpr-dev am: c9ef5a90ba

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21074610

Change-Id: Id734534dcef57e478f1f7a1fbfa031d6c77bc36a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Aaron Liu
2023-01-25 02:59:48 +00:00
committed by Automerger Merge Worker

View File

@@ -235,14 +235,6 @@ public class KeyguardSecurityContainer extends ConstraintLayout {
}
updateChildren(0 /* translationY */, 1f /* alpha */);
}
private void updateChildren(int translationY, float alpha) {
for (int i = 0; i < KeyguardSecurityContainer.this.getChildCount(); ++i) {
View child = KeyguardSecurityContainer.this.getChildAt(i);
child.setTranslationY(translationY);
child.setAlpha(alpha);
}
}
};
private final OnBackAnimationCallback mBackCallback = new OnBackAnimationCallback() {
@@ -594,6 +586,7 @@ public class KeyguardSecurityContainer extends ConstraintLayout {
* This will run when the bouncer shows in all cases except when the user drags the bouncer up.
*/
public void startAppearAnimation(SecurityMode securityMode) {
updateChildren(0 /* translationY */, 1f /* alpha */);
mViewMode.startAppearAnimation(securityMode);
}
@@ -777,6 +770,14 @@ public class KeyguardSecurityContainer extends ConstraintLayout {
setScaleY(scale);
}
private void updateChildren(int translationY, float alpha) {
for (int i = 0; i < getChildCount(); ++i) {
View child = getChildAt(i);
child.setTranslationY(translationY);
child.setAlpha(alpha);
}
}
/**
* Enscapsulates the differences between bouncer modes for the container.
*/