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

Commit d1b6398d authored by Jian Jin's avatar Jian Jin
Browse files

Bugfix: PIN keyguard is clipped in Car

  Car is a multi-user system.  There's a cancel button on the Keyguard
  that allows the user to cancel the Keyguard to go back to user
  switcher.  Because different user may have different security mode,
  the container must be resized when the security mode changes.  The fix
  is to destroy the old bouncer view on cancel.

  Screenshot of clipped view: https://screenshot.googleplex.com/0VWdDtrLkAr

Fix: 79202566
Test: In the head unit
Change-Id: Ife33c53785ed96778f08c8f5886885e2b9d29749
parent d51bbc5f
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -28,4 +28,15 @@ public class CarStatusBarKeyguardViewManager extends StatusBarKeyguardViewManage
        CarStatusBar statusBar = (CarStatusBar) mStatusBar;
        statusBar.setNavBarVisibility(navBarVisible ? View.VISIBLE : View.GONE);
    }

    /**
     * Car is a multi-user system.  There's a cancel button on the bouncer that allows the user to
     * go back to the user switcher and select another user.  Different user may have different
     * security mode which requires bouncer container to be resized.  For this reason, the bouncer
     * view is destroyed on cancel.
     */
    @Override
    protected boolean shouldDestroyViewOnReset() {
        return true;
    }
}
+5 −1
Original line number Diff line number Diff line
@@ -206,13 +206,17 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
        } else {
            mStatusBar.showKeyguard();
            if (hideBouncerWhenShowing) {
                hideBouncer(false /* destroyView */);
                hideBouncer(shouldDestroyViewOnReset() /* destroyView */);
                mBouncer.prepare();
            }
        }
        updateStates();
    }

    protected boolean shouldDestroyViewOnReset() {
        return false;
    }

    private void hideBouncer(boolean destroyView) {
        mBouncer.hide(destroyView);
        cancelPendingWakeupAction();