diff options
Diffstat (limited to 'core/java/android/view/View.java')
| -rw-r--r-- | core/java/android/view/View.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 085a3f2..4f2d4a6 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -6564,6 +6564,19 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } /** + * Provide original WindowInsets that are dispatched to the view hierarchy. The insets are + * only available if the view is attached. + * + * @return WindowInsets from the top of the view hierarchy or null if View is detached + */ + public WindowInsets getRootWindowInsets() { + if (mAttachInfo != null) { + return mAttachInfo.mViewRootImpl.getWindowInsets(false /* forceConstruct */); + } + return null; + } + + /** * @hide Compute the insets that should be consumed by this view and the ones * that should propagate to those under it. */ |
