Fixes autoadvance on find sensor page for fingerprint.
OnStop gets called after an activity behind it on the stack is resumed when the user pressed the back button on the navigation bar. Because of this, we need to disable the cancelEnrollment call inside onBackPressed instead of onStop so that on the find sensor page, the auto next advance on pressing the fingerprint sensor will still work. bug:27151472 Change-Id: I1e440f1f7cd91c0711dd31b8bf65a567d4d39f8b
This commit is contained in:
@@ -168,15 +168,30 @@ public class FingerprintEnrollEnrolling extends FingerprintEnrollBase
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
if (mSidecar != null) {
|
||||
mSidecar.setListener(null);
|
||||
}
|
||||
stopIconAnimation();
|
||||
if (!isChangingConfigurations()) {
|
||||
if (mSidecar != null) {
|
||||
mSidecar.cancelEnrollment();
|
||||
getFragmentManager().beginTransaction().remove(mSidecar).commit();
|
||||
}
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
if (mSidecar != null) {
|
||||
mSidecar.setListener(null);
|
||||
mSidecar.cancelEnrollment();
|
||||
getFragmentManager().beginTransaction().remove(mSidecar).commit();
|
||||
mSidecar = null;
|
||||
}
|
||||
super.onBackPressed();
|
||||
}
|
||||
|
||||
private void animateProgress(int progress) {
|
||||
if (mProgressAnim != null) {
|
||||
mProgressAnim.cancel();
|
||||
|
Reference in New Issue
Block a user