Fix reporting of unchanged keep clear areas
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
Loading
Please register or sign in to comment