Merge "Fixes testResumedWhenRecreatedFromInNonFocusedStack" into rvc-dev am: 0a79590d2b am: 473c24f9d4 am: 56348f9b17

Change-Id: Ibaa13c083ec296b34945fa1ffcbe3b896474862f
This commit is contained in:
Hongwei Wang
2020-05-08 01:19:48 +00:00
committed by Automerger Merge Worker

View File

@@ -1160,8 +1160,14 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
} else {
mLastReportedMultiWindowMode = inMultiWindowMode;
computeConfigurationAfterMultiWindowModeChange();
ensureActivityConfiguration(0 /* globalChanges */, PRESERVE_WINDOWS,
true /* ignoreVisibility */);
// 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,
true /* ignoreVisibility */);
}
}
}
}