Bulletproof CredentialStorage state handling
As noted by the class javadoc, CredentialStorage has seen the number of cases to cope with grow. This change tries to address those cases. src/com/android/settings/CredentialStorage.java Added ChooseLockSettingsHelper.EXTRA_KEY_PASSWORD to coordinate additional producer and consumer. constant declaration here, since its used by callers of ChooseLockSettingsHelper.launchConfirmationActivity src/com/android/settings/ChooseLockSettingsHelper.java old producer src/com/android/settings/ConfirmLockPassword.java new producer (CredentialStorage wants passwords and patterns) src/com/android/settings/ConfirmLockPattern.java new consumer src/com/android/settings/CredentialStorage.java old consumer src/com/android/settings/CryptKeeperSettings.java Made class final and removed protected from method to make it clear ChooseLockSettingsHelper is not to be used by subclassing. src/com/android/settings/ChooseLockSettingsHelper.java Change-Id: Ib2d65398fe44573168a6267a0376c3b0388b16c8
This commit is contained in:
@@ -176,7 +176,7 @@ public class CryptKeeperSettings extends Fragment {
|
||||
// If the user entered a valid keyguard trace, present the final
|
||||
// confirmation prompt; otherwise, go back to the initial state.
|
||||
if (resultCode == Activity.RESULT_OK && data != null) {
|
||||
String password = data.getStringExtra("password");
|
||||
String password = data.getStringExtra(ChooseLockSettingsHelper.EXTRA_KEY_PASSWORD);
|
||||
if (!TextUtils.isEmpty(password)) {
|
||||
showFinalConfirmation(password);
|
||||
}
|
||||
|
Reference in New Issue
Block a user