Null checking window before starting dream
With window being null we get null exception when trying to get attributes to properly start dream Test: atest DreamServiceTest Bug: b/271179864 Change-Id: I3136b620383a0c609a8260cc7b0e9b7f6e6422c1
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user