Merge "Do not stop dream service if dream activity is relaunching" into rvc-dev am: b76f9472df am: 4dfd3dcd3a

Change-Id: Ica2a8b1cc55c88ba705e0213180f175da87e274b
This commit is contained in:
Riddle Hsu
2020-05-07 05:17:26 +00:00
committed by Automerger Merge Worker

View File

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