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
This commit is contained in:
Danielle Millett
2012-06-14 11:59:10 -04:00
parent 149e352454
commit cfe8c4b0cd

View File

@@ -446,7 +446,9 @@ public class SecuritySettings extends SettingsPreferenceFragment
resultCode == Activity.RESULT_OK) { resultCode == Activity.RESULT_OK) {
final LockPatternUtils lockPatternUtils = mChooseLockSettingsHelper.utils(); final LockPatternUtils lockPatternUtils = mChooseLockSettingsHelper.utils();
lockPatternUtils.setBiometricWeakLivelinessEnabled(false); 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; return;
} }
createPreferenceHierarchy(); createPreferenceHierarchy();