diff options
| author | Stephen Bird <sbird@cyngn.com> | 2015-07-09 16:28:20 -0700 |
|---|---|---|
| committer | Stephen Bird <sbird@cyngn.com> | 2015-07-10 11:47:04 -0700 |
| commit | 383538f8276690ba272d5ff740ad021ad5c95ca8 (patch) | |
| tree | 04d5a947bca410b4297b6885e666475a7842908e | |
| parent | 924bfe5e339c0aa7b62b4a768762f36302f58d21 (diff) | |
| download | android_packages_apps_CMFileManager-383538f8276690ba272d5ff740ad021ad5c95ca8.tar.gz android_packages_apps_CMFileManager-383538f8276690ba272d5ff740ad021ad5c95ca8.tar.bz2 android_packages_apps_CMFileManager-383538f8276690ba272d5ff740ad021ad5c95ca8.zip | |
Secure Storage: Fix unlock button
Change-Id: I852fff76aef4f47bbd6d809c64afcc2f77165553
(cherry picked from commit c2832885bd00d45ac7277930cff68063e1cb4d3a)
| -rwxr-xr-x | src/com/cyanogenmod/filemanager/console/secure/SecureStorageKeyPromptDialog.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/com/cyanogenmod/filemanager/console/secure/SecureStorageKeyPromptDialog.java b/src/com/cyanogenmod/filemanager/console/secure/SecureStorageKeyPromptDialog.java index 73bb3ad4..f2045f8d 100755 --- a/src/com/cyanogenmod/filemanager/console/secure/SecureStorageKeyPromptDialog.java +++ b/src/com/cyanogenmod/filemanager/console/secure/SecureStorageKeyPromptDialog.java @@ -245,19 +245,19 @@ public class SecureStorageKeyPromptDialog boolean validLength = key.length() >= MIN_PASSWORD_LENGTH && (!mResetPassword || (mResetPassword && oldkey.length() >= MIN_PASSWORD_LENGTH)); boolean validEquals = key.equals(repeatKey); - boolean valid = validLength && - (((mNewStorage || mResetPassword) && validEquals) || mDeleteStorage); - mUnlock.setEnabled(valid); if (!validLength) { mValidationMsg.setText(getString(R.string.secure_storage_unlock_validation_length, MIN_PASSWORD_LENGTH)); mValidationMsg.setVisibility(View.VISIBLE); + mUnlock.setEnabled(false); } else if ((mNewStorage || mResetPassword) && !validEquals) { mValidationMsg.setText(R.string.secure_storage_unlock_validation_equals); mValidationMsg.setVisibility(View.VISIBLE); + mUnlock.setEnabled(false); } else { mValidationMsg.setVisibility(View.INVISIBLE); + mUnlock.setEnabled(true); } } |
