diff options
author | jorgegil@google.com <jorgegil@google.com> | 2020-11-06 16:15:25 -0800 |
---|---|---|
committer | jorgegil@google.com <jorgegil@google.com> | 2020-11-10 10:11:33 -0800 |
commit | a61e9fec041e93c9dd1d4a9a80649ee506e592f7 (patch) | |
tree | 5c5e309163bc402eb6fdd59455b9843f6184bfa4 /rs/java/android/renderscript/ProgramFragmentFixedFunction.java | |
parent | 32026d51a17455ef449a67bf75d7990bf118380a (diff) |
Refactor getDestinationBounds into more readable methods
getDestinationBounds(Rect) was only being used to calculate
the "entry" bounds (e.g. onTaskAppeared, swipeToHome) and
all its callers were passing in null.
getDestinationBounds(Rect, boolean) had only one caller,
onTaskInfoChanged, who did pass the current bounds in to
be adjusted to the aspect ratio.
Instead of having overloaded methods and complex logic to
know whether to calculate default bounds or use the provided
bounds, the method is now split into two methods that better
represent what they're calculating:
1. getEntryDestinationBounds, no arguments, calculates either
default or reentry bounds
2. getAdjustedDestinationBounds, takes in the current bounds
and the new aspect ratio, simply adjusts the bounds to the
aspect ratio.
Bug: 169373982
Test: atest com.android.wm.shell.pip
Change-Id: Ie8adda458fc5a56b9d78245c663dbc54b8525378
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions