OSDN Git Service

Display Cutout: Fix ActionBarOverlayLayout to properly dispatch cutout
authorAdrian Roos <roosa@google.com>
Wed, 22 Nov 2017 13:21:01 +0000 (14:21 +0100)
committerAdrian Roos <roosa@google.com>
Fri, 18 May 2018 20:58:38 +0000 (20:58 +0000)
commitf7b7426d81c5365473d00362cf158aa5ae35cee3
treef4aac2d79f7e3cff23ecba7d384e7475ee572d36
parent6d0842154bb063632f937ef360557af281b6c2cb
Display Cutout: Fix ActionBarOverlayLayout to properly dispatch cutout

ActionBarOverlayLayout used to drop WindowInsets, extract the content insets
as a rect, and then dispatch a modified rect to the content view; this because
there was no way to retarget the WindowInsets to the content view, and the
WindowInsets were not truly immutable. That means however, that other kinds of
insets than the content insets do not get dispatched, such as the display cutout.

To fix this, we add APIs to inset WindowInsets, make them immutable. Note that
a similar change is needed for the support lib.

Bug: 79733300
Test: atest ActionBarOverlayLayoutTest
Change-Id: I6a69d8462163ca5e66fdb53f83def6bc4063f8aa
config/hiddenapi-light-greylist.txt
core/java/android/view/View.java
core/java/android/view/WindowInsets.java
core/java/com/android/internal/policy/DecorView.java
core/java/com/android/internal/widget/ActionBarOverlayLayout.java
core/tests/coretests/src/com/android/internal/widget/ActionBarOverlayLayoutTest.java [new file with mode: 0644]
services/tests/servicestests/src/com/android/server/wm/ScreenDecorWindowTests.java