diff options
| author | Robert Carr <racarr@google.com> | 2021-04-14 10:05:58 -0700 |
|---|---|---|
| committer | Robert Carr <racarr@google.com> | 2021-04-20 15:38:26 -0700 |
| commit | 354c56590e75c4f47531c1195fccc4cd6f49364c (patch) | |
| tree | c6c7125dc04020e1db88b1d5d1575f347448c91c /core/java/android/view/View.java | |
| parent | 6b23dfbd0b92083098a5eb23eb23ccfeeee72741 (diff) | |
View: Expose gatherTransparentRegion
Recently exposed ViewRoot API requires requestTransparentRegion for
many of the use cases we want to support. requestTransparentRegion is
already public API, however the documentation and definition is a little
confusing and arguably it shouldn't do anything unless we also implement
gatherTransparentRegion. gatherTransparentRegion is already made public
through SurfaceView, and so exposing it properly on View seems like
a non disruptive option.
Bug: 179647628
Test: android.view.cts.ViewRootSyncTest
Change-Id: I72fb2744bc03cdd26d64547dbebeb12751a33a2a
Diffstat (limited to 'core/java/android/view/View.java')
| -rw-r--r-- | core/java/android/view/View.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index bed5eea2d199..afba492ba192 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -26115,7 +26115,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } /** - * This is used by the RootView to perform an optimization when + * This is used by the ViewRoot to perform an optimization when * the view hierarchy contains one or several SurfaceView. * SurfaceView is always considered transparent, but its children are not, * therefore all View objects remove themselves from the global transparent @@ -26127,10 +26127,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * point is opaque, regardless of the transparent region; returns false * if it is possible for underlying windows to be seen behind the view. * - * {@hide} */ - @UnsupportedAppUsage - public boolean gatherTransparentRegion(Region region) { + public boolean gatherTransparentRegion(@Nullable Region region) { final AttachInfo attachInfo = mAttachInfo; if (region != null && attachInfo != null) { final int pflags = mPrivateFlags; |
