Merge "Null checking window before starting dream" into tm-qpr-dev

This commit is contained in:
Prince Donkor
2023-03-08 20:30:31 +00:00
committed by Android (Google) Code Review

View File

@@ -1409,6 +1409,10 @@ public class DreamService extends Service implements Window.Callback {
// Request the DreamOverlay be told to dream with dream's window
// parameters once the window has been attached.
mDreamStartOverlayConsumer = overlay -> {
if (mWindow == null) {
Slog.d(TAG, "mWindow is null");
return;
}
try {
overlay.startDream(mWindow.getAttributes(), mOverlayCallback,
mDreamComponent.flattenToString(),