Merge "Make DreamService detach on DreamActivity onDestroy" into udc-dev am: 10104fccfc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21610512 Change-Id: I6a71a8dd0f576a971c56594423cacddab01a8d5e Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -70,7 +70,7 @@ public class DreamActivity extends Activity {
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
if (mCallback != null && !isFinishing()) {
|
||||
if (mCallback != null) {
|
||||
mCallback.onActivityDestroyed();
|
||||
}
|
||||
|
||||
|
||||
@@ -1588,7 +1588,8 @@ public class DreamService extends Service implements Window.Callback {
|
||||
// If DreamActivity is destroyed, wake up from Dream.
|
||||
void onActivityDestroyed() {
|
||||
mActivity = null;
|
||||
onDestroy();
|
||||
mWindow = null;
|
||||
detach();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user