summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authord34d <clark@cyngn.com>2015-09-02 15:54:17 -0700
committerClark Scheff <clark@cyngn.com>2015-10-27 18:27:49 -0700
commit0deb5c80ed989741b08b00228d5967ecae4af93c (patch)
treef3ebfd45c0c188a7ac7744701974c567efedc9b9
parentfd17e095c6048867d37019e43cf56973e197ea19 (diff)
downloadframeworks_base-0deb5c80ed989741b08b00228d5967ecae4af93c.zip
frameworks_base-0deb5c80ed989741b08b00228d5967ecae4af93c.tar.gz
frameworks_base-0deb5c80ed989741b08b00228d5967ecae4af93c.tar.bz2
Keyguard: Remove bouncer when re-registering status bar
When changing themes we restart the keyguard which causes the StatusBarKeyguardViewManager to recreate the bouncer without first removing the old bouncer. This would cause a user to not be able to correctly enter their pin since the wrong PasswordTextView would be found via findViewById(). This patch removes the bouncer view if mBouncer is non-null when registering the status bar. Change-Id: I392502bb648f04016d0b39fbf337054ff4ca3a89
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java1
2 files changed, 2 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
index e9b2c61..d6be80e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
@@ -182,7 +182,7 @@ public class KeyguardBouncer {
mRoot.setSystemUiVisibility(View.STATUS_BAR_DISABLE_HOME);
}
- private void removeView() {
+ void removeView() {
if (mRoot != null && mRoot.getParent() == mContainer) {
mContainer.removeView(mRoot);
mRoot = null;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
index a83fd8f..735b604 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
@@ -91,6 +91,7 @@ public class StatusBarKeyguardViewManager {
mContainer = container;
mStatusBarWindowManager = statusBarWindowManager;
mScrimController = scrimController;
+ if (mBouncer != null) mBouncer.removeView();
mBouncer = new KeyguardBouncer(mContext, mViewMediatorCallback, mLockPatternUtils,
mStatusBarWindowManager, container);
}