Fix the animation in the “How to set up Face Unlock” page can’t

be paused or hidden.

Handling the Lottie onClick event to pause/resume the animation.

Flag: EXEMPT bug-fix

Bug: 378585895

Test: local build and verify to pause / resume lottie animation.
Change-Id: I36ff303dcdb994fb5ad9d90957d9a3e8534c3634
This commit is contained in:
Jason Chang
2025-02-20 06:45:42 +00:00
parent d171e3e12d
commit 90802728ae

View File

@@ -128,6 +128,16 @@ public class FaceEnrollEducation extends BiometricEnrollBase {
mIllustrationLottie.setAnimation(R.raw.face_education_lottie);
mIllustrationLottie.setVisibility(View.VISIBLE);
mIllustrationLottie.playAnimation();
mIllustrationLottie.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (mIllustrationLottie.isAnimating()) {
mIllustrationLottie.pauseAnimation();
} else {
mIllustrationLottie.resumeAnimation();
}
}
});
}
mFooterBarMixin = getLayout().getMixin(FooterBarMixin.class);