summaryrefslogtreecommitdiff
path: root/libs/hwui/FrameInfoVisualizer.cpp
diff options
context:
space:
mode:
author Riddle Hsu <riddlehsu@google.com> 2024-07-24 12:27:52 +0000
committer Riddle Hsu <riddlehsu@google.com> 2024-08-06 07:13:33 +0000
commit56c4d530f30af3d8271b2f0d58319022676c6262 (patch)
tree06917eb3fea1cd9dd30fe9b1e4fb00880fb1f419 /libs/hwui/FrameInfoVisualizer.cpp
parentaa96091053edb7c0a6eb6168899e643657d98439 (diff)
Do not apply transparent policy if orientation is respected
On device with config_letterboxIsEnabledForTranslucentActivities=true, the translucent activity will inherit the configuration of opaque activity in the same task. But if the orientation of activity can affect display, i.e. ignore-orientation is not set (such as outer screen of foldable device), then ideally the behavior should be similar to regular phone. This change makes that it is possible to switch between inherit and non-inherit at runtime. The TransparentPolicy is still initialized if AppCompatConfiguration#isTranslucentLetterboxingEnabled is true. But its configuration override policy will be no-op if the translucent activity can affect display orientation. And once the display becomes ignoring requested orientation, the policy can still apply the override from the existed info. That allows the scenario: On folded screen, a task contains a top portrait translucent activity. And the bottom activity is visible with fixed landscape orientation. After switching to unfold display, the translucent activity will follow the bottom activity's bounds and orientation. Bug: 278097747 Flag: com.android.window.flags.respect_non_top_visible_fixed_orientation Test: atest TransparentPolicyTest# \ testNotRunStrategyToTranslucentActivitiesIfRespectOrientation Change-Id: Id9861c908420961efb945e36fb50a13ea4de7e8f
Diffstat (limited to 'libs/hwui/FrameInfoVisualizer.cpp')
0 files changed, 0 insertions, 0 deletions