Merge "Do not stop dream service if dream activity is relaunching" into rvc-dev

This commit is contained in:
Riddle Hsu
2020-05-07 04:51:38 +00:00
committed by Android (Google) Code Review

View File

@@ -1075,9 +1075,13 @@ public class DreamService extends Service implements Window.Callback {
@Override @Override
public void onViewDetachedFromWindow(View v) { public void onViewDetachedFromWindow(View v) {
if (mActivity == null || !mActivity.isChangingConfigurations()) {
// Only stop the dream if the view is not detached by relaunching
// activity for configuration changes.
mActivity = null; mActivity = null;
finish(); finish();
} }
}
}); });
} }