diff options
author | Adam Powell <adamp@google.com> | 2011-06-17 14:31:34 -0700 |
---|---|---|
committer | Adam Powell <adamp@google.com> | 2011-06-17 14:31:34 -0700 |
commit | f1a4549604639e3d9eafc406426ddc252d427b57 (patch) | |
tree | 3127c9b2a14ee0bdbf13b449ed44108b970f8480 | |
parent | 414c4984fdbb03b688bb5c3c76d20100fce3d067 (diff) | |
download | frameworks_base-f1a4549604639e3d9eafc406426ddc252d427b57.zip frameworks_base-f1a4549604639e3d9eafc406426ddc252d427b57.tar.gz frameworks_base-f1a4549604639e3d9eafc406426ddc252d427b57.tar.bz2 |
Bug 4726236 - NPE at dispatchRestoreInstanceState
Change-Id: Ib7eba6ead85fa4daa8046bbc2d4d3fcc1d4223c3
-rw-r--r-- | core/java/com/android/internal/view/menu/ListMenuPresenter.java | 4 |
1 files changed, 3 insertions, 1 deletions
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 class ListMenuPresenter implements MenuPresenter, AdapterView.OnItemClick 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 { |