commit | f1a4549604639e3d9eafc406426ddc252d427b57 | [log] [tgz] |
---|---|---|
author | Adam Powell <adamp@google.com> | Fri Jun 17 14:31:34 2011 -0700 |
committer | Adam Powell <adamp@google.com> | Fri Jun 17 14:31:34 2011 -0700 |
tree | 3127c9b2a14ee0bdbf13b449ed44108b970f8480 | |
parent | 414c4984fdbb03b688bb5c3c76d20100fce3d067 [diff] |
Bug 4726236 - NPE at dispatchRestoreInstanceState Change-Id: Ib7eba6ead85fa4daa8046bbc2d4d3fcc1d4223c3
diff --git a/core/java/com/android/internal/view/menu/ListMenuPresenter.java b/core/java/com/android/internal/view/menu/ListMenuPresenter.java index f8d24a3..cc09927 100644 --- a/core/java/com/android/internal/view/menu/ListMenuPresenter.java +++ b/core/java/com/android/internal/view/menu/ListMenuPresenter.java
@@ -177,7 +177,9 @@ public void restoreHierarchyState(Bundle inState) { SparseArray<Parcelable> viewStates = inState.getSparseParcelableArray(VIEWS_TAG); - ((View) mMenuView).restoreHierarchyState(viewStates); + if (viewStates != null) { + ((View) mMenuView).restoreHierarchyState(viewStates); + } } private class MenuAdapter extends BaseAdapter {