Fix ContextImpl Cannot Be Cast to Activity
`Context` is a capability family, not another name for `Activity`. Find the failing cast, decide whether the operation truly needs a UI owner, and change the API contract instead of swapping context methods until the crash disappears.