Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 46b8b553 authored by Andy Mast's avatar Andy Mast Committed by Gerrit Code Review
Browse files

Fingerprint: Cancel timeout if user leaves enrollment

Also added safety check on null activity just in case.

Repro Steps:
1. Settings > Lockscreen > Manage fingerprints
2. Click "add new fingerprint"
3. Click "found it!"
4. Push back button on device.

After a few seconds of no input, the NPE would occur.

Change-Id: Ida0392262f9e95eea7a9f8df08737e419483a965
Issue-Id: SAMBAR-201
parent ceef03d4
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -317,6 +317,7 @@ public class EnrollFingerprint extends SettingsActivity
                mFpM.cancel();
            }
            mFpM.stopListening();
            cancelEnrollmentStepTimeout();
            super.onDestroy();
        }

@@ -375,6 +376,11 @@ public class EnrollFingerprint extends SettingsActivity
            mTitle.setText(stage.titleMessage);
            mInstructions.setText(stage.instructionMessage);
            mInfoGraphic.setImageResource(stage.infoGraphic);
            EnrollFingerprint activity = getEnrollmentActivity();
            if (activity == null) {
                // Activity is gone, nothiing to update here.
                return;
            }
            final SetupWizardNavBar setupBar = getEnrollmentActivity().getSetupBar();

            if (stage.backMode.enabled) {