Context can be `Activity`,`Application`, `Service` and etc. Basically the components of Android Applications, as well as `ContextWrapper` which is create by `CreatePackageContext()`.
In most times, we won't care which type it is, we really need is package of the `Context`.But `Window` related stuff is an exception. So here it needs to make sure the `Context` is an `Activty`.