Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Diego, currently computeCurrentWindowMetrics
requires a @UiContext
and will crash if the provided context cannot be unwrapped to an Activity
or InputMethodService
.
For views that are created without a UiContext, such as in a robolectric test, or when inflated using the applicationContext (for example to be added to window manager directly with WM#addView), should computeCurrentWindowMetrics implement some fallback behavior (such as size of the ViewRootImpl, or default display size)? If not then consumers of this API will need to define their own fallbacks which will lead to inconsistency
Description
AmbientWindowManager provides information about the current window. Due to the historical context, this can be misleading. Rename AmbientWindowManager to AmbientWindowInfo