am f0c53e66: am bdac9e0f: Merge "Fix 3005526: Properly update StatusView from Password/PIN unlock" into honeycomb
* commit 'f0c53e66997bf781fb52f76e58aa0928fd8b64eb': Fix 3005526: Properly update StatusView from Password/PIN unlock
This commit is contained in:
@@ -135,9 +135,12 @@ public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen
|
||||
// numeric keys.
|
||||
if (mIsAlpha) {
|
||||
mPasswordEntry.setKeyListener(TextKeyListener.getInstance());
|
||||
mStatusView.setHelpMessage(R.string.keyguard_password_enter_password_code,
|
||||
StatusView.LOCK_ICON);
|
||||
} else {
|
||||
mPasswordEntry.setKeyListener(DigitsKeyListener.getInstance());
|
||||
mStatusView.setInstructionText(R.string.keyguard_password_enter_pin_password_code);
|
||||
mStatusView.setHelpMessage(R.string.keyguard_password_enter_pin_code,
|
||||
StatusView.LOCK_ICON);
|
||||
}
|
||||
|
||||
mKeyboardHelper.setVibratePattern(mLockPatternUtils.isTactileFeedbackEnabled() ?
|
||||
@@ -151,6 +154,11 @@ public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen
|
||||
mStatusView.setCarrierText(LockScreen.getCarrierString(
|
||||
mUpdateMonitor.getTelephonyPlmn(),
|
||||
mUpdateMonitor.getTelephonySpn()));
|
||||
|
||||
mUpdateMonitor.registerInfoCallback(this);
|
||||
//mUpdateMonitor.registerSimStateCallback(this);
|
||||
|
||||
resetStatusInfo();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -204,6 +212,7 @@ public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen
|
||||
if (mLockPatternUtils.checkPassword(entry)) {
|
||||
mCallback.keyguardDone(true);
|
||||
mCallback.reportSuccessfulUnlockAttempt();
|
||||
mStatusView.setInstructionText(null);
|
||||
} else if (entry.length() > MINIMUM_PASSWORD_LENGTH_BEFORE_REPORT ) {
|
||||
// to avoid accidental lockout, only count attempts that are long enough to be a
|
||||
// real password. This may require some tweaking.
|
||||
@@ -316,11 +325,8 @@ public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen
|
||||
}
|
||||
|
||||
private void resetStatusInfo() {
|
||||
if(mIsAlpha) {
|
||||
mStatusView.setInstructionText(R.string.keyguard_password_enter_password_code);
|
||||
} else {
|
||||
mStatusView.setInstructionText(R.string.keyguard_password_enter_pin_password_code);
|
||||
}
|
||||
mStatusView.setInstructionText(null);
|
||||
mStatusView.updateStatusLines(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -125,13 +125,13 @@ class StatusView {
|
||||
void setInstructionText(int stringId) {
|
||||
mStatus1.setText(stringId);
|
||||
mStatus1.setCompoundDrawablesWithIntrinsicBounds(LOCK_ICON, 0, 0, 0);
|
||||
mStatus1.setVisibility(View.VISIBLE);
|
||||
mStatus1.setVisibility(stringId != 0 ? View.VISIBLE : View.INVISIBLE);
|
||||
}
|
||||
|
||||
void setInstructionText(String string) {
|
||||
mStatus1.setText(string);
|
||||
mStatus1.setCompoundDrawablesWithIntrinsicBounds(LOCK_ICON, 0, 0, 0);
|
||||
mStatus1.setVisibility(View.VISIBLE);
|
||||
mStatus1.setVisibility(TextUtils.isEmpty(string) ? View.INVISIBLE : View.VISIBLE);
|
||||
}
|
||||
|
||||
void setCarrierText(int stringId) {
|
||||
@@ -177,11 +177,10 @@ class StatusView {
|
||||
}
|
||||
|
||||
// Update Status1
|
||||
if (mInstructions != null) {
|
||||
if (!TextUtils.isEmpty(mInstructions)) {
|
||||
// Instructions only
|
||||
final int resId = TextUtils.isEmpty(mInstructions) ? 0 : LOCK_ICON;
|
||||
mStatus1.setText(mInstructions);
|
||||
mStatus1.setCompoundDrawablesWithIntrinsicBounds(resId, 0, 0, 0);
|
||||
mStatus1.setCompoundDrawablesWithIntrinsicBounds(LOCK_ICON, 0, 0, 0);
|
||||
mStatus1.setVisibility(View.VISIBLE);
|
||||
} else if (mShowingBatteryInfo) {
|
||||
// Battery status
|
||||
|
||||
Reference in New Issue
Block a user