Merge "Update preference to set password field" into pi-dev

This commit is contained in:
TreeHugger Robot
2018-04-17 22:58:54 +00:00
committed by Android (Google) Code Review
4 changed files with 20 additions and 2 deletions

View File

@@ -74,7 +74,7 @@ public class ValidatedEditTextPreference extends CustomEditTextPreference {
editText.removeTextChangedListener(mTextWatcher);
if (mIsPassword) {
editText.setInputType(
InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD);
editText.setMaxLines(1);
}
editText.addTextChangedListener(mTextWatcher);

View File

@@ -55,6 +55,7 @@ public class WifiTetherPasswordPreferenceController extends WifiTetherBasePrefer
mPassword = generateRandomPassword();
}
((ValidatedEditTextPreference) mPreference).setValidator(this);
((ValidatedEditTextPreference) mPreference).setIsPassword(true);
((ValidatedEditTextPreference) mPreference).setIsSummaryPassword(true);
updatePasswordDisplay((EditTextPreference) mPreference);
}