diff options
author | Bill Lin <lbill@google.com> | 2020-07-08 16:21:18 +0800 |
---|---|---|
committer | Bill Lin <lbill@google.com> | 2020-07-13 18:04:42 +0800 |
commit | 72779ac93606032d4d608089e4bbcdc6a0d3330f (patch) | |
tree | 01819065c6906296808a385b8ddd00e319419d6b /rs/java/android/renderscript/ProgramStore.java | |
parent | d7912748cccd48540eab65547cad4c727587dccd (diff) |
Fix offset bounds cut off display cutout region
Root cause :
Previous refactoring OneHandedDisplayAreaOrganizer and count on
mDisplayLayout.getStableBounds() for the rotated bounds, however
the bounds was cut off the safe inset(DisplayCutout) region.
Solution :
a. Do not count on DisplayLayout.getStableBounds() API
b. handling bounds by Surface.ROTATION_{N} with below
Rotate policy: 0 <-> 90, 0 <-> 270, 180 <-> 90, 180 <-> 270
| fromRotation | toRotation | rotateBounds |
-------------------------------------------------
| ROTATION_0 | ROTATION_90 | True |
| ROTATION_0 | ROTATION_270 | True |
| ROTATION_180 | ROTATION_90 | True |
| ROTATION_180 | ROTATION_270 | True |
| ROTATION_90 | ROTATION_0 | True |
| ROTATION_90 | ROTATION_180 | True |
| ROTATION_270 | ROTATION_0 | True |
| ROTATION_270 | ROTATION_180 | True |
| Others | False |
c. Reset bounds while register and unregister DisplayAreaOrganizer
Test: atest com.android.systemui.onehanded
Test: atest SystemUITests
Test: atest OneHandedDisplayAreaOrganizerTest
Bug: 160763351
Change-Id: I458edfe77c45320cd0d5b6dba2397b7229bcb048
Diffstat (limited to 'rs/java/android/renderscript/ProgramStore.java')
0 files changed, 0 insertions, 0 deletions