Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 31d25e9e authored by Mariia Sandrikova's avatar Mariia Sandrikova
Browse files

Letterbox positioning (1/4): Consolidate activity and task letterboxing

Now letterboxing can happen on both task (fixed orientation) and activity (size compat or aspect ratio restrictions) levels. This change consolidates them to prevent future changes for letterbox positioning from being split between Task and ActivityRecord.

Main changes:
- Move Task#computeLetterboxBounds to ActivityRecord#resolveFixedOrientationConfiguration that is called from ActivityRecord#resolveOverrideConfiguration.
- Since fixed orientation letterboxing is no longer included in parent (task) bounds of the activity, account for fixed orientation letterbox bounds in size compat methods that relies on that.
- Replace all calls of ActivityRecord#updateCompatDisplayInsets (renamed updateSizeCompatMode) with just one call in ActivityRecord#resolveOverrideConfiguration.
- Refactor ActivityRecord#inSizeCompatMode to use mInSizeCompatModeForBounds pre-calculated in ActivityRecord#resolveSizeCompatModeConfiguration.

Changes planned in next CLs:
(2/4) Consolidate positioning logic in ActivityRecord#positionLetterboxedBounds(...) called from ActivityRecord#resolveOverrideConfiguration after bounds dimensions are computed.
(3/4) Position bounds using gravity specified in config or via ADB commands.
(4/4) Rename WindowManagerService#getTaskLetterboxAspectRatio and all related methods since fixed orientation letterboxing now happens on activity level.

Test: atest WmTests
Bug: 175212232

Change-Id: I8b1f7ac178bef2105c46940ddd3a493c547f0be9
parent e9c691d3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment