Merge "Fixes testResumedWhenRecreatedFromInNonFocusedStack" into rvc-dev

This commit is contained in:
Hongwei Wang
2020-05-08 00:24:02 +00:00
committed by Android (Google) Code Review

View File

@@ -1160,11 +1160,17 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
} else { } else {
mLastReportedMultiWindowMode = inMultiWindowMode; mLastReportedMultiWindowMode = inMultiWindowMode;
computeConfigurationAfterMultiWindowModeChange(); computeConfigurationAfterMultiWindowModeChange();
// If the activity is in stopping or stopped state, for instance, it's in the
// split screen task and not the top one, the last configuration it should keep
// is the one before multi-window mode change.
final ActivityState state = getState();
if (state != STOPPED && state != STOPPING) {
ensureActivityConfiguration(0 /* globalChanges */, PRESERVE_WINDOWS, ensureActivityConfiguration(0 /* globalChanges */, PRESERVE_WINDOWS,
true /* ignoreVisibility */); true /* ignoreVisibility */);
} }
} }
} }
}
void updatePictureInPictureMode(Rect targetStackBounds, boolean forceUpdate) { void updatePictureInPictureMode(Rect targetStackBounds, boolean forceUpdate) {
if (task == null || task.getStack() == null || !attachedToProcess()) { if (task == null || task.getStack() == null || !attachedToProcess()) {