From ab6f11f47f8842c8c0baccf9a171ffee5a09e490 Mon Sep 17 00:00:00 2001 From: "edgar.huang" Date: Thu, 31 Aug 2017 11:22:25 +0800 Subject: [PATCH] Settings is crashed high probability when doing follow steps Enter into the fingerprint list screen and delete and identification of operation at the same time, when the item of the fingerprint verification was deleted, highlighting the item to be deleted, just so NullPointerException occurred. Test: manual - enrolling a fingerprint and do above steps. --- src/com/android/settings/fingerprint/FingerprintSettings.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/settings/fingerprint/FingerprintSettings.java b/src/com/android/settings/fingerprint/FingerprintSettings.java index 64ce901926..607d28cdd7 100644 --- a/src/com/android/settings/fingerprint/FingerprintSettings.java +++ b/src/com/android/settings/fingerprint/FingerprintSettings.java @@ -558,7 +558,7 @@ public class FingerprintSettings extends SubSettings { String prefName = genKey(fpId); FingerprintPreference fpref = (FingerprintPreference) findPreference(prefName); final Drawable highlight = getHighlightDrawable(); - if (highlight != null) { + if (highlight != null && fpref != null) { final View view = fpref.getView(); final int centerX = view.getWidth() / 2; final int centerY = view.getHeight() / 2; -- 2.11.0