summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Miller <jaggies@google.com>2010-04-12 19:25:15 -0700
committerJim Miller <jaggies@google.com>2010-04-12 19:26:07 -0700
commit1f69ba64dbf495cb841d8c726fa2368c01620291 (patch)
tree567d0dff3547f6cbbbb532d07c3ccee504d5e086
parentb0d3a2371f92d19d01aa2ca8e4f382738273f2dd (diff)
downloadbase-1f69ba64dbf495cb841d8c726fa2368c01620291.tar.gz
Fix 2572446: Also watch keyboard changes in PIN/Password unlock. DO NOT MERGE
The PIN/Password unlock screen was monitoring orientation changes. However, while docked, this isn't useful since orientation remains fixed. This change makes PasswordUnlockScreen also looks for changes to config.hardKeyboardHidden. Tested: WVGA device while docked and opening/closing the keyboard. Change-Id: Ida6a4cdd3abcbcab7e2fe8450a25c0dc36765f04
-rw-r--r--phone/com/android/internal/policy/impl/PasswordUnlockScreen.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/phone/com/android/internal/policy/impl/PasswordUnlockScreen.java b/phone/com/android/internal/policy/impl/PasswordUnlockScreen.java
index a0e4f93..39f2917 100644
--- a/phone/com/android/internal/policy/impl/PasswordUnlockScreen.java
+++ b/phone/com/android/internal/policy/impl/PasswordUnlockScreen.java
@@ -60,7 +60,7 @@ public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen
private PasswordEntryKeyboardHelper mKeyboardHelper;
private int mCreationOrientation;
- private int mKeyboardHidden;
+ private int mCreationHardKeyboardHidden;
private CountDownTimer mCountdownTimer;
private TextView mTitle;
@@ -73,7 +73,7 @@ public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen
KeyguardScreenCallback callback) {
super(context);
- mKeyboardHidden = configuration.hardKeyboardHidden;
+ mCreationHardKeyboardHidden = configuration.hardKeyboardHidden;
mCreationOrientation = configuration.orientation;
mUpdateMonitor = updateMonitor;
mCallback = callback;
@@ -102,7 +102,7 @@ public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen
mKeyboardHelper.setKeyboardMode(isAlpha ? PasswordEntryKeyboardHelper.KEYBOARD_MODE_ALPHA
: PasswordEntryKeyboardHelper.KEYBOARD_MODE_NUMERIC);
- mKeyboardView.setVisibility(mKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO
+ mKeyboardView.setVisibility(mCreationHardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO
? View.INVISIBLE : View.VISIBLE);
mPasswordEntry.requestFocus();
@@ -213,8 +213,10 @@ public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
- if (getResources().getConfiguration().orientation != mCreationOrientation) {
- mCallback.recreateMe(getResources().getConfiguration());
+ Configuration config = getResources().getConfiguration();
+ if (config.orientation != mCreationOrientation
+ || config.hardKeyboardHidden != mCreationHardKeyboardHidden) {
+ mCallback.recreateMe(config);
}
}
@@ -222,7 +224,8 @@ public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen
@Override
protected void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
- if (newConfig.orientation != mCreationOrientation) {
+ if (newConfig.orientation != mCreationOrientation
+ || newConfig.hardKeyboardHidden != mCreationHardKeyboardHidden) {
mCallback.recreateMe(newConfig);
}
}