Merge "Fix NPE inside dispatchRestoreInstanceState" into sc-dev

This commit is contained in:
TreeHugger Robot
2021-07-02 18:46:30 +00:00
committed by Android (Google) Code Review
@@ -188,11 +188,11 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
Bundle state = (Bundle) sparseArray.get(R.id.work_tab_state_id, null);
if (state != null) {
int currentPage = state.getInt(BUNDLE_KEY_CURRENT_PAGE, 0);
if (currentPage != 0) {
if (currentPage != 0 && mViewPager != null) {
mViewPager.setCurrentPage(currentPage);
rebindAdapters(true);
} else {
mSearchUiManager.resetSearch();
reset(true);
}
}