Merge "Unbind from overlay before checking attached." into tm-dev am: d5e4503c74 am: 3788344cc8

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17574386

Change-Id: Id29e0470634af81f6466bb9f489d68cfb07b1e2d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Bryce Lee
2022-04-05 02:50:34 +00:00
committed by Automerger Merge Worker

View File

@@ -1038,14 +1038,14 @@ public class DreamService extends Service implements Window.Callback {
}
mFinished = true;
mOverlayConnection.unbind(this);
if (mDreamToken == null) {
Slog.w(mTag, "Finish was called before the dream was attached.");
stopSelf();
return;
}
mOverlayConnection.unbind(this);
try {
// finishSelf will unbind the dream controller from the dream service. This will
// trigger DreamService.this.onDestroy and DreamService.this will die.