Fix NPE inside dispatchRestoreInstanceState

Bug: 192559704
Test: manual
Change-Id: I212518ac4a7feddd8e87f4be601332ea62e99313
This commit is contained in:
Hyunyoung Song
2021-07-01 23:26:57 -07:00
parent 679f8bb9ca
commit 9804c0472e

View File

@@ -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);
}
}