According to the Android Source code, the Activity.onCreate()
method forwards the saveInstanceState bundle to the activity's fragments. To be more specific, it fetches a parcelable with the "android:fragments" key and forwards this parcelable to the fragments using the FragmentManager.restoreAllStates()
method, which itself restore the state on all fragments.
The Activity.onRestoreInstanceState()
method forwards the bundle to the activity's window. Again it fetches the "android:viewHierarchyState" bundle from the saved instance and forwards it the the window using the Window.restoreHierarchyState()
method.
So to answer your question, if your activity doesn't use Fragments, then indeed calling super.onCreate(null)
won't change anything. But as best practice, I'll advise you to always forward the exact savedInstance bundle (unless you know what you're doing).
Edit : here are the sample source codes I talked about, taken from AOSP v17 :
Activity.java
protected void onCreate(Bundle savedInstanceState) {
// [... some content ellipsed for readability purposes]
if (savedInstanceState != null) {
Parcelable p = savedInstanceState.getParcelable(FRAGMENTS_TAG);
mFragments.restoreAllState(p, mLastNonConfigurationInstances != null
? mLastNonConfigurationInstances.fragments : null);
}
mFragments.dispatchCreate();
getApplication().dispatchActivityCreated(this, savedInstanceState);
mCalled = true;
}
// [...]
protected void onRestoreInstanceState(Bundle savedInstanceState) {
if (mWindow != null) {
Bundle windowState = savedInstanceState.getBundle(WINDOW_HIERARCHY_TAG);
if (windowState != null) {
mWindow.restoreHierarchyState(windowState);
}
}
}