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

Commit d5a3c537 authored by Jim Miller's avatar Jim Miller
Browse files

Don't crash if we get a onRemove() callback from Fingerprint

Before this fix, it was possible to get a callback after the activity
finishes.  This just ensures the operation is a no-op.

Fixes bug 37106041

Test: remove all but last fingerprint and hit back while rotating; check that
Settings doesn't crash.

Change-Id: I99df4f7c06e345d1ed6041a75606b0cc43edb300
parent b26584cf
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -360,6 +360,8 @@ public class FingerprintSettings extends SubSettings {
        }

        private void updateAddPreference() {
            if (getActivity() == null) return; // Activity went away

            /* Disable preference if too many fingerprints added */
            final int max = getContext().getResources().getInteger(
                    com.android.internal.R.integer.config_fingerprintMaxTemplatesPerUser);