Merge "WindowInsetsController: make available after addView" into rvc-dev am: 1cd9750aa4 am: 1e672d552d am: 9978475dff

Change-Id: Id39f0cd3411becf06b9fccb8cd09e48874cda2c9
This commit is contained in:
Adrian Roos
2020-04-30 16:18:43 +00:00
committed by Automerger Merge Worker

View File

@@ -11519,6 +11519,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
ViewParent parent = getParent();
if (parent instanceof View) {
return ((View) parent).getWindowInsetsController();
} else if (parent instanceof ViewRootImpl) {
// Between WindowManager.addView() and the first traversal AttachInfo isn't set yet.
return ((ViewRootImpl) parent).getInsetsController();
}
return null;
}