From d36ebe03c997cc034ba85d06e1fa0da8df047794 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Fri, 31 Aug 2012 17:42:42 -0700 Subject: [PATCH] Keyguard bug fixes Bug:7088530 Lockscreen falsely states "Wrong PIN" Bug:7091531 Owner name no longer shown on slide to unlock screen, Nakasi Bug:7091131 When entering a SIM PIN, focus is not put onto the pin entry box Change-Id: I5c7e957083b25a3445804ea092d962163d187fa1 --- .../keyguard_screen_status_land.xml | 2 +- .../keyguard_screen_status_port.xml | 2 +- core/res/res/layout/keyguard_navigation.xml | 11 ++++++----- core/res/res/layout/keyguard_status_view.xml | 15 +++++++++++++-- core/res/res/values/public.xml | 2 +- .../impl/keyguard/KeyguardPasswordView.java | 6 ++---- .../policy/impl/keyguard/KeyguardSimPinView.java | 2 -- .../impl/keyguard/KeyguardStatusViewManager.java | 2 +- .../KeyguardStatusViewManager.java | 2 +- 9 files changed, 26 insertions(+), 18 deletions(-) diff --git a/core/res/res/layout-sw600dp/keyguard_screen_status_land.xml b/core/res/res/layout-sw600dp/keyguard_screen_status_land.xml index df999f044999c..c6ddd1bd2f2ba 100644 --- a/core/res/res/layout-sw600dp/keyguard_screen_status_land.xml +++ b/core/res/res/layout-sw600dp/keyguard_screen_status_land.xml @@ -109,7 +109,7 @@ /> - + + + - + diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardPasswordView.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardPasswordView.java index 693856110c258..b2ce73e642063 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardPasswordView.java +++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardPasswordView.java @@ -256,12 +256,10 @@ public class KeyguardPasswordView extends LinearLayout private void verifyPasswordAndUnlock() { String entry = mPasswordEntry.getText().toString(); - boolean wrongPassword = true; if (mLockPatternUtils.checkPassword(entry)) { mCallback.reportSuccessfulUnlockAttempt(); KeyStore.getInstance().password(entry); mCallback.dismiss(true); - wrongPassword = false; } 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. @@ -271,9 +269,9 @@ public class KeyguardPasswordView extends LinearLayout long deadline = mLockPatternUtils.setLockoutAttemptDeadline(); handleAttemptLockout(deadline); } + mNavigationManager.setMessage( + mIsAlpha ? R.string.kg_wrong_password : R.string.kg_wrong_pin); } - mNavigationManager.setMessage(wrongPassword ? - (mIsAlpha ? R.string.kg_wrong_password : R.string.kg_wrong_pin) : 0); mPasswordEntry.setText(""); } diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardSimPinView.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardSimPinView.java index 294ea5ca8fe5a..4861b781070e0 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardSimPinView.java +++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardSimPinView.java @@ -91,8 +91,6 @@ public class KeyguardSimPinView extends LinearLayout } }); } - - setFocusableInTouchMode(true); reset(); } diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardStatusViewManager.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardStatusViewManager.java index 06ed88a7794b0..20fad0b9997ca 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardStatusViewManager.java +++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardStatusViewManager.java @@ -119,7 +119,7 @@ class KeyguardStatusViewManager { mDateView = (TextView) findViewById(R.id.date); mStatus1View = (TextView) findViewById(R.id.status1); mAlarmStatusView = (TextView) findViewById(R.id.alarm_status); - mOwnerInfoView = (TextView) findViewById(R.id.propertyOf); + mOwnerInfoView = (TextView) findViewById(R.id.owner_info); mDigitalClock = (DigitalClock) findViewById(R.id.time); // Registering this callback immediately updates the battery state, among other things. diff --git a/policy/src/com/android/internal/policy/impl/keyguard_obsolete/KeyguardStatusViewManager.java b/policy/src/com/android/internal/policy/impl/keyguard_obsolete/KeyguardStatusViewManager.java index 409f87bf5f639..b6ffde0b8e69e 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard_obsolete/KeyguardStatusViewManager.java +++ b/policy/src/com/android/internal/policy/impl/keyguard_obsolete/KeyguardStatusViewManager.java @@ -179,7 +179,7 @@ class KeyguardStatusViewManager implements OnClickListener { mDateView = (TextView) findViewById(R.id.date); mStatus1View = (TextView) findViewById(R.id.status1); mAlarmStatusView = (TextView) findViewById(R.id.alarm_status); - mOwnerInfoView = (TextView) findViewById(R.id.propertyOf); + mOwnerInfoView = (TextView) findViewById(R.id.owner_info); mTransportView = (TransportControlView) findViewById(R.id.transport); mEmergencyCallButton = (Button) findViewById(R.id.emergencyCallButton); mEmergencyCallButtonEnabledInScreen = emergencyButtonEnabledInScreen;