Merge "Bugfix: PIN keyguard is clipped in Car" into pi-dev

This commit is contained in:
Jian Jin
2018-05-22 04:43:21 +00:00
committed by Android (Google) Code Review
2 changed files with 16 additions and 1 deletions

View File

@@ -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;
}
}

View File

@@ -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();