diff --git a/src/com/android/settings/dashboard/DashboardAdapter.java b/src/com/android/settings/dashboard/DashboardAdapter.java index b49bb7b4459..b161c4151e1 100644 --- a/src/com/android/settings/dashboard/DashboardAdapter.java +++ b/src/com/android/settings/dashboard/DashboardAdapter.java @@ -53,6 +53,8 @@ public class DashboardAdapter extends RecyclerView.Adapter getSuggestions() { @@ -149,10 +155,8 @@ public class DashboardAdapter extends RecyclerView.Adapter conditions) { - if (!Objects.equals(mConditions, conditions)) { - mConditions = conditions; - recountItems(); - } + mConditions = conditions; + recountItems(); } public boolean isShowingAll() { @@ -441,9 +445,16 @@ public class DashboardAdapter extends RecyclerView.Adapter(mSuggestions)); - outState.putParcelableArrayList(STATE_CATEGORY_LIST, - new ArrayList(mCategories)); + if (mSuggestions != null) { + outState.putParcelableArrayList(STATE_SUGGESTION_LIST, + new ArrayList(mSuggestions)); + } + if (mCategories != null) { + outState.putParcelableArrayList(STATE_CATEGORY_LIST, + new ArrayList(mCategories)); + } + outState.putBoolean(STATE_IS_SHOWING_ALL, mIsShowingAll); + outState.putInt(STATE_SUGGESTION_MODE, mSuggestionMode); } private static class IconCache {