findActivity

Traverses the ContextWrapper chain to find the underlying Activity.

Return

The Activity this context belongs to, or null if no activity is found in the chain (e.g., when called from ApplicationContext, Service, or Compose Previews).