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:
@@ -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();
|
||||||
|
Reference in New Issue
Block a user