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

Change-Id: I8c89cbf67d648878c71c92574ce89090fc2de6bd
This commit is contained in:
Riddle Hsu
2020-05-07 04:59:50 +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();
}
}
});
}