Merge "Fix locked second screen on boot" into rvc-dev am: 2455e98420 am: 09960b9491

Change-Id: Iadfebdd7092e36899b10e268652cb0ee748f37ee
This commit is contained in:
Chris Li
2020-03-31 16:33:31 +00:00
committed by Automerger Merge Worker

View File

@@ -126,12 +126,14 @@ public class KeyguardDisplayManager {
final int displayId = display.getDisplayId();
Presentation presentation = mPresentations.get(displayId);
if (presentation == null) {
presentation = new KeyguardPresentation(mContext, display, mInjectableInflater);
presentation.setOnDismissListener(dialog -> {
if (null != mPresentations.get(displayId)) {
final Presentation newPresentation =
new KeyguardPresentation(mContext, display, mInjectableInflater);
newPresentation.setOnDismissListener(dialog -> {
if (newPresentation.equals(mPresentations.get(displayId))) {
mPresentations.remove(displayId);
}
});
presentation = newPresentation;
try {
presentation.show();
} catch (WindowManager.InvalidDisplayException ex) {