Merge "[Toast] Fix the NPE in isPersonalTab()." into tm-dev

This commit is contained in:
Becky Qiu
2022-05-09 18:24:49 +00:00
committed by Android (Google) Code Review

View File

@@ -437,8 +437,12 @@ public abstract class BaseAllAppsContainerView<T extends Context & ActivityConte
if (showTabs == mUsingTabs && !force) {
return;
}
// replaceRVcontainer() needs to use both mUsingTabs value to remove the old view AND
// showTabs value to create new view. Hence the mUsingTabs new value assignment MUST happen
// after this call.
replaceRVContainer(showTabs);
mUsingTabs = showTabs;
replaceRVContainer(mUsingTabs);
mAllAppsStore.unregisterIconContainer(mAH.get(AdapterHolder.MAIN).mRecyclerView);
mAllAppsStore.unregisterIconContainer(mAH.get(AdapterHolder.WORK).mRecyclerView);