Fix issues with SUW on fingerprint devices
Fixes the following issues related to fingerprint/face in Setup Wizard: - Ensures super.onStop() is called by all enrollment-related Activities Test: Proceed through Setup Wizard on factory reset Pixel 3 XL Before: Periodic crash dialogs and stuck on fingerprint enrollment After: Able to proceed through wizard and enroll fingerprint normally Bug: 147325159 Change-Id: I76eb8c944140aa68f78eaea3702f440102b779c6
This commit is contained in:
@@ -60,6 +60,8 @@ public abstract class BiometricsEnrollEnrolling extends BiometricEnrollBase
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onStop() {
|
protected void onStop() {
|
||||||
|
super.onStop();
|
||||||
|
|
||||||
if (mSidecar != null) {
|
if (mSidecar != null) {
|
||||||
mSidecar.setListener(null);
|
mSidecar.setListener(null);
|
||||||
}
|
}
|
||||||
@@ -77,6 +79,12 @@ public abstract class BiometricsEnrollEnrolling extends BiometricEnrollBase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean shouldFinishWhenBackgrounded() {
|
||||||
|
// Prevent super.onStop() from finishing, since we handle this in our onStop().
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBackPressed() {
|
public void onBackPressed() {
|
||||||
if (mSidecar != null) {
|
if (mSidecar != null) {
|
||||||
|
@@ -217,13 +217,15 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
|
|||||||
|
|
||||||
private void stopIconAnimation() {
|
private void stopIconAnimation() {
|
||||||
mAnimationCancelled = true;
|
mAnimationCancelled = true;
|
||||||
mIconAnimationDrawable.stop();
|
if (mIconAnimationDrawable != null) {
|
||||||
|
mIconAnimationDrawable.stop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onStop() {
|
protected void onStop() {
|
||||||
stopIconAnimation();
|
|
||||||
super.onStop();
|
super.onStop();
|
||||||
|
stopIconAnimation();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void animateProgress(int progress) {
|
private void animateProgress(int progress) {
|
||||||
|
@@ -115,10 +115,10 @@ public class FingerprintEnrollFindSensor extends BiometricEnrollBase {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onStop() {
|
protected void onStop() {
|
||||||
|
super.onStop();
|
||||||
if (mAnimation != null) {
|
if (mAnimation != null) {
|
||||||
mAnimation.pauseAnimation();
|
mAnimation.pauseAnimation();
|
||||||
}
|
}
|
||||||
super.onStop();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user