summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorAdam Powell <adamp@google.com>2012-10-13 01:44:13 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-10-13 01:44:13 -0700
commit85341a76677abcccee757f7982b48b3bec2dcf63 (patch)
tree432e33b08beb8f10bec8b3d15418b75e03120511 /policy
parent211a18e2d6548ffc4657b8199661a1764f1008e0 (diff)
parent70bc9f24ce6098a8c82245ac1ce7721d354ecd3d (diff)
downloadframeworks_base-85341a76677abcccee757f7982b48b3bec2dcf63.zip
frameworks_base-85341a76677abcccee757f7982b48b3bec2dcf63.tar.gz
frameworks_base-85341a76677abcccee757f7982b48b3bec2dcf63.tar.bz2
Merge "Fix keyguard dimensions; IME state for password view; layouts" into jb-mr1-dev
Diffstat (limited to 'policy')
-rw-r--r--policy/src/com/android/internal/policy/impl/keyguard/KeyguardPasswordView.java5
-rw-r--r--policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java12
2 files changed, 15 insertions, 2 deletions
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 5a1c30f..a6e8f5b 100644
--- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardPasswordView.java
+++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardPasswordView.java
@@ -207,12 +207,13 @@ public class KeyguardPasswordView extends LinearLayout
});
}
- // If no icon is visible, reset the left margin on the password field so the text is
+ // If no icon is visible, reset the start margin on the password field so the text is
// still centered.
if (!imeOrDeleteButtonVisible) {
android.view.ViewGroup.LayoutParams params = mPasswordEntry.getLayoutParams();
if (params instanceof MarginLayoutParams) {
- ((MarginLayoutParams)params).leftMargin = 0;
+ final MarginLayoutParams mlp = (MarginLayoutParams) params;
+ mlp.setMarginStart(0);
mPasswordEntry.setLayoutParams(params);
}
}
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java
index 1ec4176..0ad2404 100644
--- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java
+++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java
@@ -210,6 +210,18 @@ public class KeyguardViewManager {
mKeyguardView.setLockPatternUtils(mLockPatternUtils);
mKeyguardView.setViewMediatorCallback(mViewMediatorCallback);
+ // HACK
+ // The keyguard view will have set up window flags in onFinishInflate before we set
+ // the view mediator callback. Make sure it knows the correct IME state.
+ if (mViewMediatorCallback != null) {
+ KeyguardPasswordView kpv = (KeyguardPasswordView) mKeyguardView.findViewById(
+ R.id.keyguard_password_view);
+
+ if (kpv != null) {
+ mViewMediatorCallback.setNeedsInput(kpv.needsInput());
+ }
+ }
+
if (options != null) {
if (options.getBoolean(LockPatternUtils.KEYGUARD_SHOW_USER_SWITCHER)) {
mKeyguardView.goToUserSwitcher();