Remove PASSWORD_QUALITY_MANAGED from CarTrustAgentUnlockDialogHelper
Bug: 140231719 Test: Manually on IHU Change-Id: I5e848ca3183f624158dc192159f57aaa9d27a89c
This commit is contained in:
@@ -192,23 +192,28 @@ class CarTrustAgentUnlockDialogHelper extends BroadcastReceiver{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set button text based on security lock type
|
// Set button text based on screen lock type
|
||||||
private void setButtonText() {
|
private void setButtonText() {
|
||||||
LockPatternUtils lockPatternUtils = new LockPatternUtils(mContext);
|
LockPatternUtils lockPatternUtils = new LockPatternUtils(mContext);
|
||||||
int passwordQuality = lockPatternUtils.getActivePasswordQuality(mUid);
|
int passwordQuality = lockPatternUtils.getActivePasswordQuality(mUid);
|
||||||
switch (passwordQuality) {
|
switch (passwordQuality) {
|
||||||
// PIN
|
// PIN
|
||||||
|
case DevicePolicyManager.PASSWORD_QUALITY_NUMERIC:
|
||||||
case DevicePolicyManager.PASSWORD_QUALITY_NUMERIC_COMPLEX:
|
case DevicePolicyManager.PASSWORD_QUALITY_NUMERIC_COMPLEX:
|
||||||
|
mButton.setText(R.string.unlock_dialog_button_text_pin);
|
||||||
|
break;
|
||||||
// Pattern
|
// Pattern
|
||||||
case DevicePolicyManager.PASSWORD_QUALITY_SOMETHING:
|
case DevicePolicyManager.PASSWORD_QUALITY_SOMETHING:
|
||||||
mButton.setText(R.string.unlock_dialog_button_text_pattern);
|
mButton.setText(R.string.unlock_dialog_button_text_pattern);
|
||||||
break;
|
break;
|
||||||
// Password
|
// Password
|
||||||
case DevicePolicyManager.PASSWORD_QUALITY_MANAGED:
|
case DevicePolicyManager.PASSWORD_QUALITY_ALPHABETIC:
|
||||||
|
case DevicePolicyManager.PASSWORD_QUALITY_ALPHANUMERIC:
|
||||||
|
case DevicePolicyManager.PASSWORD_QUALITY_COMPLEX:
|
||||||
mButton.setText(R.string.unlock_dialog_button_text_password);
|
mButton.setText(R.string.unlock_dialog_button_text_password);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Log.e(TAG, "Encountered unexpected security type when attempting to set "
|
Log.e(TAG, "Encountered unexpected screen lock type when attempting to set "
|
||||||
+ "button text:" + passwordQuality);
|
+ "button text:" + passwordQuality);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user