After setting up Android Studio, I tried to find out how few of the methods work but I can see that Activity class have got a lot of errors.
// Gives: cannot resolve symbol 'CallSuper'
// Gives: cannot resolve method 'trackActivity(android.app.Activity)'
private final Object mInstanceTracker = StrictMode.trackActivity(this);
// Gives: cannot resolve symbol 'MainThread'
// **312 errors in android.app.Activity, 579 in android.view.View**
Being precise, those aren't errors in the source code for
Activity/View it's just that :
android.annotation.CallSuperin it's classpath.
This is because the SDK is subset of the actual Android platform. The SDK shipped to the developers a.k.a Public API utilizes a lot of platform features a.k.a. Internal APIs, hence you can't find them in your SDK 24 classpath.
So why are all these portions hidden from developers?
It's kept hidden from developers because most of its implementation varies from device to device, plus they wouldn't be required in 99.99% cases (metaphorical figure not actual stats). You might want to have a look here.