summaryrefslogtreecommitdiff
path: root/core/java/android/view/ViewRootRectTracker.java
Commit message (Collapse)AuthorAgeFilesLines
* Fix reporting of unchanged keep clear areasRobert Horvath2022-05-101-3/+30
| | | | | | | | | | | | | | | | | | | | ViewRootRectTracker#computeChangedRects returns all tracked Rects if there are changes to the Rects since the last call to that method, or null if there aren't. When ViewRootImpl checked for changed Rects, if only one of either set of restricted or unrestricted keep clear rects changed, then #computeChangedRects returned null for the other, which was subsequently reported as an empty list. If there were keep clear rects previously reported, this would mistakenly clear them. This change separates the check for changes and retrieving the list of latest Rects. If either set of Rects has changed, now it's always the latest Rects that get reported. Bug: 231532058 Test: Manual with app with restricted & unrestricted keep clear areas Test: atest KeepClearRectsTests Change-Id: Ida51420d0f0e7935a5dc9f3eab902857927c33f5
* Add keep clear rects APIGalia Peycheva2022-01-221-0/+165
This allows the app to set views as keep-clear areas, which the system will avoid laying out floating windows over, like Pip or Bubbles. Bug: 209577354 Bug: 209578131 Test: atest CtsWindowManagerDeviceTestCases:KeepClearRectTests Change-Id: I02f72376b709c0534bd678b7ce66cd95cab41832