From cfe8c4b0cd0325e4cb7a33c2a5a2936d932108a8 Mon Sep 17 00:00:00 2001 From: Danielle Millett Date: Thu, 14 Jun 2012 11:59:10 -0400 Subject: [PATCH] Fix 6654057: Fixing crash if device is rotated during confirm password In onActivityResult, mBiometricWeakLiveliness can be null if the device was rotated during confirm password. To fix this, the line accessing mBiometricWeakLiveliness can safely be removed. It's unnecessary because when onActivityResult finishes, onResume is always called when it displays the security settings again. Since onResume sets the checkmark value based on the stored value in lockPatternUtils, the check mark will always show the correct value when settings is displayed. Change-Id: Idba9ae1d829911a9581bb6678c4d1f3b44784c63 --- src/com/android/settings/SecuritySettings.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/android/settings/SecuritySettings.java b/src/com/android/settings/SecuritySettings.java index a12da3e1db7..74cc753c4aa 100644 --- a/src/com/android/settings/SecuritySettings.java +++ b/src/com/android/settings/SecuritySettings.java @@ -446,7 +446,9 @@ public class SecuritySettings extends SettingsPreferenceFragment resultCode == Activity.RESULT_OK) { final LockPatternUtils lockPatternUtils = mChooseLockSettingsHelper.utils(); lockPatternUtils.setBiometricWeakLivelinessEnabled(false); - mBiometricWeakLiveliness.setChecked(false); + // Setting the mBiometricWeakLiveliness checked value to false is handled when onResume + // is called by grabbing the value from lockPatternUtils. We can't set it here + // because mBiometricWeakLiveliness could be null return; } createPreferenceHierarchy();