Limit fixed orientation letterbox to split screen and fullscreen on task level.
Before ag/13575049 moved fixed orientation letterbox to activity level, it was allowed only for tasks in fullscreen or split screen windowing modes. After refactoring, the same condition was checked for activity windowing mode which isn't the same. This causes bugs for apps that use PiP mode so moving back to gating fixed orientation letterbox with task windowing mode check. Fix: 181767614 Fix: 184078928 Test: atest SizeCompatTests and repro steps in both bugs. Change-Id: I3004f29aa1ba66f9c46d55ed0fe197210c9d4da8
This commit is contained in:
@@ -6928,12 +6928,16 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
||||
newParentConfiguration = mTmpConfig;
|
||||
}
|
||||
|
||||
final int windowingMode = getWindowingMode();
|
||||
// Can't use resolvedConfig.windowConfiguration.getWindowingMode() because it can be
|
||||
// different from windowing mode of the task (PiP) during transition from fullscreen to PiP
|
||||
// and back which can cause visible issues (see b/184078928).
|
||||
final int parentWindowingMode =
|
||||
newParentConfiguration.windowConfiguration.getWindowingMode();
|
||||
// TODO(b/181207944): Consider removing the if condition and always run
|
||||
// resolveFixedOrientationConfiguration() since this should be applied for all cases.
|
||||
if (isSplitScreenWindowingMode(windowingMode)
|
||||
|| windowingMode == WINDOWING_MODE_MULTI_WINDOW
|
||||
|| windowingMode == WINDOWING_MODE_FULLSCREEN) {
|
||||
if (isSplitScreenWindowingMode(parentWindowingMode)
|
||||
|| parentWindowingMode == WINDOWING_MODE_MULTI_WINDOW
|
||||
|| parentWindowingMode == WINDOWING_MODE_FULLSCREEN) {
|
||||
resolveFixedOrientationConfiguration(newParentConfiguration);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user