Merge "Null checking window before starting dream" into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
3ca388e8de
@@ -1409,6 +1409,10 @@ public class DreamService extends Service implements Window.Callback {
|
|||||||
// Request the DreamOverlay be told to dream with dream's window
|
// Request the DreamOverlay be told to dream with dream's window
|
||||||
// parameters once the window has been attached.
|
// parameters once the window has been attached.
|
||||||
mDreamStartOverlayConsumer = overlay -> {
|
mDreamStartOverlayConsumer = overlay -> {
|
||||||
|
if (mWindow == null) {
|
||||||
|
Slog.d(TAG, "mWindow is null");
|
||||||
|
return;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
overlay.startDream(mWindow.getAttributes(), mOverlayCallback,
|
overlay.startDream(mWindow.getAttributes(), mOverlayCallback,
|
||||||
mDreamComponent.flattenToString(),
|
mDreamComponent.flattenToString(),
|
||||||
|
|||||||
Reference in New Issue
Block a user