Having problems understanding how getpackagemanager() is derived from getactivity() kotlin
I was looking through some docs when I stumbled upon this line of code
if (activity?.packageManager?.resolveActivity(intent, 0) != null) {
startActivity(intent)
}
I was puzzled as I can't seem to find packageManager as a method in the activity class, how did the activity instance use the dot operator with packagemanager if it is not one of the Activity class properties?
Upon further digging, the packageManager method can be found in the ContextWrapper class, any idea how this works?...