Skip to content
Commit 4fb1e911 authored by Evan Rosky's avatar Evan Rosky
Browse files

Clean-up some out-dated layout shenanigans

Task.isFullscreen was checking for empty bounds, this wasn't
accounting for the (new) difference between being FULLSCREEN
(by policy) and actually filling the screen. This resulted in
certain checks not working properly (eg. letterbox surface
layout). isFullscreen has been removed and the callers now
check for what they care about.

useCurrentBounds is effectively dead-code now. It was
originally to deal with multi-user cases to prevent docked
stack of one user influencing the size of another user's
stacks. Nowadays, mode changes through the configuration
hierarchy handles these adjustments and falling-back on
displayBounds won't be appropriate in nested situations.

getAnimationBounds was basically trying to duplicate the
logic already performed by the hierarchy configuration
update. Specifically, looking at the mode and picking
which bounds to use. This is redundant and was actually
causing problems because new policies handled in the
hierarchy weren't being reproduced faithfully here. However,
due to letterbox, we can't use AppWindowToken bounds
directly. So for now we just use task (instead of stack)
for a representation of "the window" that also works
for freeform.

Letterbox layout was only being calculated relative to the
task. For fixed-orientation letterbox, this doesn't work
because the task itself needs to be letterboxed. For now,
this CL hard-codes an additional level (stack) and unions
that for the "letterbox fill region". We should probably
replace this with a recursive solution, but there's
currently still some issues that might require moving this
stuff around anyways.

Bug: 124626708
Test: launch a portrait-only app into fullscreen on a
      landscape-only display.
      atest AppWindowTokenTests WindowFrameTests
Change-Id: I1375c1988fbc8460802f30acee2207289fdb18e7
parent ec9488c1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment