Merge "Log a warning when action bar view states cannot be restored." into jb-dev

This commit is contained in:
Adam Powell
2012-05-17 19:35:00 -07:00
committed by Android (Google) Code Review

View File

@@ -1630,7 +1630,12 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
if (mActionBar != null) {
SparseArray<Parcelable> actionBarStates =
savedInstanceState.getSparseParcelableArray(ACTION_BAR_TAG);
mActionBar.restoreHierarchyState(actionBarStates);
if (actionBarStates != null) {
mActionBar.restoreHierarchyState(actionBarStates);
} else {
Log.w(TAG, "Missing saved instance states for action bar views! " +
"State will not be restored.");
}
}
}