am 9d9251c8: am 847d677f: am 3c40675f: Merge "Fix potential NPE when saving fragment state."

* commit '9d9251c8caee4a847b630653204bb205a1fbed09':
  Fix potential NPE when saving fragment state.
This commit is contained in:
Dianne Hackborn
2012-04-23 21:49:40 -07:00
committed by Android Git Automerger

View File

@@ -1538,6 +1538,9 @@ final class FragmentManagerImpl extends FragmentManager {
FragmentManagerImpl.VIEW_STATE_TAG, f.mSavedViewState);
}
if (!f.mUserVisibleHint) {
if (result == null) {
result = new Bundle();
}
// Only add this if it's not the default value
result.putBoolean(FragmentManagerImpl.USER_VISIBLE_HINT_TAG, f.mUserVisibleHint);
}