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
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user