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

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

Change-Id: I0e14d94e506e3a4084123d5d7ed179410c0ff716
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:28:26 +00:00
committed by Automerger Merge Worker

View File

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