Loading core/res/res/values/config.xml +43 −2 Original line number Diff line number Diff line Loading @@ -5204,6 +5204,15 @@ the format [System DeviceState]:[WM Jetpack Posture], for example: "0:1". --> <string-array name="config_device_state_postures" translatable="false" /> <!-- Which Surface rotations are considered as tabletop posture (horizontal hinge) when the device is half-folded. Other half-folded postures will be assumed to be book (vertical hinge) mode. Units: degrees; valid values: 0, 90, 180, 270. --> <integer-array name="config_deviceTabletopRotations" /> <!-- This flag indicates that a display with fold-state FLAT should always be considered as having a separating hinge. --> <bool name="config_isDisplayHingeAlwaysSeparating">false</bool> <!-- Aspect ratio of letterboxing for fixed orientation. Values <= 1.0 will be ignored. Note: Activity min/max aspect ratio restrictions will still be respected. Therefore this override can control the maximum screen area that can be occupied by Loading Loading @@ -5252,14 +5261,26 @@ <!-- Horizontal position of a center of the letterboxed app window. 0 corresponds to the left side of the screen and 1 to the right side. If given value < 0 or > 1, it is ignored and central position is used (0.5). --> or > 1 it is ignored and for non-book mode central position is used (0.5); for book mode left is used (0.0). --> <item name="config_letterboxHorizontalPositionMultiplier" format="float" type="dimen">0.5</item> <!-- Vertical position of a center of the letterboxed app window. 0 corresponds to the upper side of the screen and 1 to the lower side. If given value < 0 or > 1, it is ignored and central position is used (0.5). --> or > 1 it is ignored and for non-tabletop mode central position is used (0.5); for tabletop mode top (0.0) is used. --> <item name="config_letterboxVerticalPositionMultiplier" format="float" type="dimen">0.0</item> <!-- Horizontal position of a center of the letterboxed app window when in book mode. 0 corresponds to the left side of the screen and 1 to the right side. If given value < 0 or > 1, it is ignored and left position is used (0.0). --> <item name="config_letterboxBookModePositionMultiplier" format="float" type="dimen">0.0</item> <!-- Vertical position of a center of the letterboxed app window when in tabletop mode. 0 corresponds to the upper side of the screen and 1 to the lower side. If given value < 0 or > 1, it is ignored and top position is used (0.0). --> <item name="config_letterboxTabletopModePositionMultiplier" format="float" type="dimen">0.0</item> <!-- Whether horizontal reachability repositioning is allowed for letterboxed fullscreen apps. --> <bool name="config_letterboxIsHorizontalReachabilityEnabled">false</bool> Loading Loading @@ -5287,6 +5308,26 @@ If given value is outside of this range, the option 1 (center) is assummed. --> <integer name="config_letterboxDefaultPositionForVerticalReachability">1</integer> <!-- Default horizontal position of the letterboxed app window when reachability is enabled and an app is fullscreen in landscape device orientation and in book mode. When reachability is enabled, the position can change between left, center and right. This config defines the default one: - Option 0 - Left. - Option 1 - Center. - Option 2 - Right. If given value is outside of this range, the option 0 (left) is assummed. --> <integer name="config_letterboxDefaultPositionForBookModeReachability">0</integer> <!-- Default vertical position of the letterboxed app window when reachability is enabled and an app is fullscreen in portrait device orientation and in tabletop mode. When reachability is enabled, the position can change between top, center and bottom. This config defines the default one: - Option 0 - Top. - Option 1 - Center. - Option 2 - Bottom. If given value is outside of this range, the option 0 (top) is assummed. --> <integer name="config_letterboxDefaultPositionForTabletopModeReachability">0</integer> <!-- Whether displaying letterbox education is enabled for letterboxed fullscreen apps. --> <bool name="config_letterboxIsEducationEnabled">false</bool> Loading core/res/res/values/symbols.xml +6 −0 Original line number Diff line number Diff line Loading @@ -4435,6 +4435,8 @@ <java-symbol type="array" name="config_keep_warming_services" /> <java-symbol type="string" name="config_display_features" /> <java-symbol type="array" name="config_device_state_postures" /> <java-symbol type="array" name="config_deviceTabletopRotations" /> <java-symbol type="bool" name="config_isDisplayHingeAlwaysSeparating" /> <java-symbol type="dimen" name="controls_thumbnail_image_max_height" /> <java-symbol type="dimen" name="controls_thumbnail_image_max_width" /> Loading @@ -4447,10 +4449,14 @@ <java-symbol type="color" name="config_letterboxBackgroundColor" /> <java-symbol type="dimen" name="config_letterboxHorizontalPositionMultiplier" /> <java-symbol type="dimen" name="config_letterboxVerticalPositionMultiplier" /> <java-symbol type="dimen" name="config_letterboxBookModePositionMultiplier" /> <java-symbol type="dimen" name="config_letterboxTabletopModePositionMultiplier" /> <java-symbol type="bool" name="config_letterboxIsHorizontalReachabilityEnabled" /> <java-symbol type="bool" name="config_letterboxIsVerticalReachabilityEnabled" /> <java-symbol type="integer" name="config_letterboxDefaultPositionForHorizontalReachability" /> <java-symbol type="integer" name="config_letterboxDefaultPositionForVerticalReachability" /> <java-symbol type="integer" name="config_letterboxDefaultPositionForBookModeReachability" /> <java-symbol type="integer" name="config_letterboxDefaultPositionForTabletopModeReachability" /> <java-symbol type="bool" name="config_letterboxIsEducationEnabled" /> <java-symbol type="dimen" name="config_letterboxDefaultMinAspectRatioForUnresizableApps" /> <java-symbol type="bool" name="config_letterboxIsSplitScreenAspectRatioForUnresizableAppsEnabled" /> Loading data/etc/services.core.protolog.json +12 −0 Original line number Diff line number Diff line Loading @@ -1525,6 +1525,12 @@ "group": "WM_DEBUG_FOCUS_LIGHT", "at": "com\/android\/server\/wm\/DisplayContent.java" }, "-637815408": { "message": "Invalid surface rotation angle in config_deviceTabletopRotations: %d", "level": "ERROR", "group": "WM_DEBUG_ORIENTATION", "at": "com\/android\/server\/wm\/DisplayRotation.java" }, "-636553602": { "message": "commitVisibility: %s: visible=%b visibleRequested=%b, isInTransition=%b, runningAnimation=%b, caller=%s", "level": "VERBOSE", Loading Loading @@ -3193,6 +3199,12 @@ "group": "WM_DEBUG_STATES", "at": "com\/android\/server\/wm\/TaskFragment.java" }, "939638078": { "message": "config_deviceTabletopRotations is not defined. Half-fold letterboxing will work inconsistently.", "level": "WARN", "group": "WM_DEBUG_ORIENTATION", "at": "com\/android\/server\/wm\/DisplayRotation.java" }, "948208142": { "message": "Setting Activity.mLauncherTaskBehind to true. Activity=%s", "level": "DEBUG", Loading proto/src/windowmanager.proto +4 −0 Original line number Diff line number Diff line Loading @@ -68,4 +68,8 @@ message LetterboxProto { LetterboxHorizontalReachability letterbox_position_for_horizontal_reachability = 1; // Represents the current vertical position for the letterboxed activity LetterboxVerticalReachability letterbox_position_for_vertical_reachability = 2; // Represents the current horizontal position for the letterboxed activity in book mode LetterboxHorizontalReachability letterbox_position_for_book_mode_reachability = 3; // Represents the current vertical position for the letterboxed activity in tabletop mode LetterboxVerticalReachability letterbox_position_for_tabletop_mode_reachability = 4; } No newline at end of file services/core/java/com/android/server/wm/ActivityRecord.java +5 −7 Original line number Diff line number Diff line Loading @@ -8149,7 +8149,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A } /** * Adjusts position of resolved bounds if they doesn't fill the parent using gravity * Adjusts position of resolved bounds if they don't fill the parent using gravity * requested in the config or via an ADB command. For more context see {@link * LetterboxUiController#getHorizontalPositionMultiplier(Configuration)} and * {@link LetterboxUiController#getVerticalPositionMultiplier(Configuration)} Loading @@ -8168,8 +8168,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A int offsetX = 0; if (parentBounds.width() != screenResolvedBounds.width()) { if (screenResolvedBounds.width() <= parentAppBounds.width()) { float positionMultiplier = mLetterboxUiController.getHorizontalPositionMultiplier( float positionMultiplier = mLetterboxUiController.getHorizontalPositionMultiplier( newParentConfiguration); offsetX = (int) Math.ceil((parentAppBounds.width() - screenResolvedBounds.width()) * positionMultiplier); Loading @@ -8180,8 +8179,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A int offsetY = 0; if (parentBounds.height() != screenResolvedBounds.height()) { if (screenResolvedBounds.height() <= parentAppBounds.height()) { float positionMultiplier = mLetterboxUiController.getVerticalPositionMultiplier( float positionMultiplier = mLetterboxUiController.getVerticalPositionMultiplier( newParentConfiguration); offsetY = (int) Math.ceil((parentAppBounds.height() - screenResolvedBounds.height()) * positionMultiplier); Loading Loading
core/res/res/values/config.xml +43 −2 Original line number Diff line number Diff line Loading @@ -5204,6 +5204,15 @@ the format [System DeviceState]:[WM Jetpack Posture], for example: "0:1". --> <string-array name="config_device_state_postures" translatable="false" /> <!-- Which Surface rotations are considered as tabletop posture (horizontal hinge) when the device is half-folded. Other half-folded postures will be assumed to be book (vertical hinge) mode. Units: degrees; valid values: 0, 90, 180, 270. --> <integer-array name="config_deviceTabletopRotations" /> <!-- This flag indicates that a display with fold-state FLAT should always be considered as having a separating hinge. --> <bool name="config_isDisplayHingeAlwaysSeparating">false</bool> <!-- Aspect ratio of letterboxing for fixed orientation. Values <= 1.0 will be ignored. Note: Activity min/max aspect ratio restrictions will still be respected. Therefore this override can control the maximum screen area that can be occupied by Loading Loading @@ -5252,14 +5261,26 @@ <!-- Horizontal position of a center of the letterboxed app window. 0 corresponds to the left side of the screen and 1 to the right side. If given value < 0 or > 1, it is ignored and central position is used (0.5). --> or > 1 it is ignored and for non-book mode central position is used (0.5); for book mode left is used (0.0). --> <item name="config_letterboxHorizontalPositionMultiplier" format="float" type="dimen">0.5</item> <!-- Vertical position of a center of the letterboxed app window. 0 corresponds to the upper side of the screen and 1 to the lower side. If given value < 0 or > 1, it is ignored and central position is used (0.5). --> or > 1 it is ignored and for non-tabletop mode central position is used (0.5); for tabletop mode top (0.0) is used. --> <item name="config_letterboxVerticalPositionMultiplier" format="float" type="dimen">0.0</item> <!-- Horizontal position of a center of the letterboxed app window when in book mode. 0 corresponds to the left side of the screen and 1 to the right side. If given value < 0 or > 1, it is ignored and left position is used (0.0). --> <item name="config_letterboxBookModePositionMultiplier" format="float" type="dimen">0.0</item> <!-- Vertical position of a center of the letterboxed app window when in tabletop mode. 0 corresponds to the upper side of the screen and 1 to the lower side. If given value < 0 or > 1, it is ignored and top position is used (0.0). --> <item name="config_letterboxTabletopModePositionMultiplier" format="float" type="dimen">0.0</item> <!-- Whether horizontal reachability repositioning is allowed for letterboxed fullscreen apps. --> <bool name="config_letterboxIsHorizontalReachabilityEnabled">false</bool> Loading Loading @@ -5287,6 +5308,26 @@ If given value is outside of this range, the option 1 (center) is assummed. --> <integer name="config_letterboxDefaultPositionForVerticalReachability">1</integer> <!-- Default horizontal position of the letterboxed app window when reachability is enabled and an app is fullscreen in landscape device orientation and in book mode. When reachability is enabled, the position can change between left, center and right. This config defines the default one: - Option 0 - Left. - Option 1 - Center. - Option 2 - Right. If given value is outside of this range, the option 0 (left) is assummed. --> <integer name="config_letterboxDefaultPositionForBookModeReachability">0</integer> <!-- Default vertical position of the letterboxed app window when reachability is enabled and an app is fullscreen in portrait device orientation and in tabletop mode. When reachability is enabled, the position can change between top, center and bottom. This config defines the default one: - Option 0 - Top. - Option 1 - Center. - Option 2 - Bottom. If given value is outside of this range, the option 0 (top) is assummed. --> <integer name="config_letterboxDefaultPositionForTabletopModeReachability">0</integer> <!-- Whether displaying letterbox education is enabled for letterboxed fullscreen apps. --> <bool name="config_letterboxIsEducationEnabled">false</bool> Loading
core/res/res/values/symbols.xml +6 −0 Original line number Diff line number Diff line Loading @@ -4435,6 +4435,8 @@ <java-symbol type="array" name="config_keep_warming_services" /> <java-symbol type="string" name="config_display_features" /> <java-symbol type="array" name="config_device_state_postures" /> <java-symbol type="array" name="config_deviceTabletopRotations" /> <java-symbol type="bool" name="config_isDisplayHingeAlwaysSeparating" /> <java-symbol type="dimen" name="controls_thumbnail_image_max_height" /> <java-symbol type="dimen" name="controls_thumbnail_image_max_width" /> Loading @@ -4447,10 +4449,14 @@ <java-symbol type="color" name="config_letterboxBackgroundColor" /> <java-symbol type="dimen" name="config_letterboxHorizontalPositionMultiplier" /> <java-symbol type="dimen" name="config_letterboxVerticalPositionMultiplier" /> <java-symbol type="dimen" name="config_letterboxBookModePositionMultiplier" /> <java-symbol type="dimen" name="config_letterboxTabletopModePositionMultiplier" /> <java-symbol type="bool" name="config_letterboxIsHorizontalReachabilityEnabled" /> <java-symbol type="bool" name="config_letterboxIsVerticalReachabilityEnabled" /> <java-symbol type="integer" name="config_letterboxDefaultPositionForHorizontalReachability" /> <java-symbol type="integer" name="config_letterboxDefaultPositionForVerticalReachability" /> <java-symbol type="integer" name="config_letterboxDefaultPositionForBookModeReachability" /> <java-symbol type="integer" name="config_letterboxDefaultPositionForTabletopModeReachability" /> <java-symbol type="bool" name="config_letterboxIsEducationEnabled" /> <java-symbol type="dimen" name="config_letterboxDefaultMinAspectRatioForUnresizableApps" /> <java-symbol type="bool" name="config_letterboxIsSplitScreenAspectRatioForUnresizableAppsEnabled" /> Loading
data/etc/services.core.protolog.json +12 −0 Original line number Diff line number Diff line Loading @@ -1525,6 +1525,12 @@ "group": "WM_DEBUG_FOCUS_LIGHT", "at": "com\/android\/server\/wm\/DisplayContent.java" }, "-637815408": { "message": "Invalid surface rotation angle in config_deviceTabletopRotations: %d", "level": "ERROR", "group": "WM_DEBUG_ORIENTATION", "at": "com\/android\/server\/wm\/DisplayRotation.java" }, "-636553602": { "message": "commitVisibility: %s: visible=%b visibleRequested=%b, isInTransition=%b, runningAnimation=%b, caller=%s", "level": "VERBOSE", Loading Loading @@ -3193,6 +3199,12 @@ "group": "WM_DEBUG_STATES", "at": "com\/android\/server\/wm\/TaskFragment.java" }, "939638078": { "message": "config_deviceTabletopRotations is not defined. Half-fold letterboxing will work inconsistently.", "level": "WARN", "group": "WM_DEBUG_ORIENTATION", "at": "com\/android\/server\/wm\/DisplayRotation.java" }, "948208142": { "message": "Setting Activity.mLauncherTaskBehind to true. Activity=%s", "level": "DEBUG", Loading
proto/src/windowmanager.proto +4 −0 Original line number Diff line number Diff line Loading @@ -68,4 +68,8 @@ message LetterboxProto { LetterboxHorizontalReachability letterbox_position_for_horizontal_reachability = 1; // Represents the current vertical position for the letterboxed activity LetterboxVerticalReachability letterbox_position_for_vertical_reachability = 2; // Represents the current horizontal position for the letterboxed activity in book mode LetterboxHorizontalReachability letterbox_position_for_book_mode_reachability = 3; // Represents the current vertical position for the letterboxed activity in tabletop mode LetterboxVerticalReachability letterbox_position_for_tabletop_mode_reachability = 4; } No newline at end of file
services/core/java/com/android/server/wm/ActivityRecord.java +5 −7 Original line number Diff line number Diff line Loading @@ -8149,7 +8149,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A } /** * Adjusts position of resolved bounds if they doesn't fill the parent using gravity * Adjusts position of resolved bounds if they don't fill the parent using gravity * requested in the config or via an ADB command. For more context see {@link * LetterboxUiController#getHorizontalPositionMultiplier(Configuration)} and * {@link LetterboxUiController#getVerticalPositionMultiplier(Configuration)} Loading @@ -8168,8 +8168,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A int offsetX = 0; if (parentBounds.width() != screenResolvedBounds.width()) { if (screenResolvedBounds.width() <= parentAppBounds.width()) { float positionMultiplier = mLetterboxUiController.getHorizontalPositionMultiplier( float positionMultiplier = mLetterboxUiController.getHorizontalPositionMultiplier( newParentConfiguration); offsetX = (int) Math.ceil((parentAppBounds.width() - screenResolvedBounds.width()) * positionMultiplier); Loading @@ -8180,8 +8179,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A int offsetY = 0; if (parentBounds.height() != screenResolvedBounds.height()) { if (screenResolvedBounds.height() <= parentAppBounds.height()) { float positionMultiplier = mLetterboxUiController.getVerticalPositionMultiplier( float positionMultiplier = mLetterboxUiController.getVerticalPositionMultiplier( newParentConfiguration); offsetY = (int) Math.ceil((parentAppBounds.height() - screenResolvedBounds.height()) * positionMultiplier); Loading