What if context is not an Activity? Have you verified that path?
And why not just `mWindow = new ActivityWindowAndroid(xwView.getActivity());`