Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0deb5c80 authored by d34d's avatar d34d Committed by Clark Scheff
Browse files

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
parent fd17e095
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −0
Original line number Diff line number Diff line
@@ -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);
    }