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

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

View File

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