Loading quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsController.java +3 −2 Original line number Diff line number Diff line Loading @@ -89,7 +89,8 @@ public final class TaskbarAllAppsController { mAppsModelFlags = flags; mPackageUserKeytoUidMap = map; if (mAppsView != null) { mAppsView.getAppsStore().setApps(mApps, mAppsModelFlags, mPackageUserKeytoUidMap); mAppsView.getAppsStore().setApps( mApps, mAppsModelFlags, mPackageUserKeytoUidMap, false); } } Loading Loading @@ -190,7 +191,7 @@ public final class TaskbarAllAppsController { viewController.show(animate); mAppsView = mOverlayContext.getAppsView(); mAppsView.getAppsStore().setApps(mApps, mAppsModelFlags, mPackageUserKeytoUidMap); mAppsView.getAppsStore().setApps(mApps, mAppsModelFlags, mPackageUserKeytoUidMap, false); mAppsView.getFloatingHeaderView() .findFixedRowByType(PredictionRowView.class) .setPredictedApps(mPredictedApps); Loading src/com/android/launcher3/allapps/AllAppsStore.java +14 −2 Original line number Diff line number Diff line Loading @@ -81,18 +81,30 @@ public class AllAppsStore<T extends Context & ActivityContext> { mContext = context; } /** * Calling {@link #setApps(AppInfo[], int, Map, boolean)} with shouldPreinflate set to * {@code true}. This method should be called in launcher (not for taskbar). */ public void setApps(@Nullable AppInfo[] apps, int flags, Map<PackageUserKey, Integer> map) { setApps(apps, flags, map, /* shouldPreinflate= */ true); } /** * Sets the current set of apps and sets mapping for {@link PackageUserKey} to Uid for * the current set of apps. * * <p> Note that shouldPreinflate param should be set to {@code false} for taskbar, because this * method is too late to preinflate all apps, as user will open all apps in the same frame. */ public void setApps(@Nullable AppInfo[] apps, int flags, Map<PackageUserKey, Integer> map) { public void setApps(@Nullable AppInfo[] apps, int flags, Map<PackageUserKey, Integer> map, boolean shouldPreinflate) { mApps = apps == null ? EMPTY_ARRAY : apps; mModelFlags = flags; notifyUpdate(); mPackageUserKeytoUidMap = map; // Preinflate all apps RV when apps has changed, which can happen after unlocking screen, // rotating screen, or downloading/upgrading apps. if (ENABLE_ALL_APPS_RV_PREINFLATION.get()) { if (shouldPreinflate && ENABLE_ALL_APPS_RV_PREINFLATION.get()) { mAllAppsRecyclerViewPool.preInflateAllAppsViewHolders(mContext); } } Loading Loading
quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsController.java +3 −2 Original line number Diff line number Diff line Loading @@ -89,7 +89,8 @@ public final class TaskbarAllAppsController { mAppsModelFlags = flags; mPackageUserKeytoUidMap = map; if (mAppsView != null) { mAppsView.getAppsStore().setApps(mApps, mAppsModelFlags, mPackageUserKeytoUidMap); mAppsView.getAppsStore().setApps( mApps, mAppsModelFlags, mPackageUserKeytoUidMap, false); } } Loading Loading @@ -190,7 +191,7 @@ public final class TaskbarAllAppsController { viewController.show(animate); mAppsView = mOverlayContext.getAppsView(); mAppsView.getAppsStore().setApps(mApps, mAppsModelFlags, mPackageUserKeytoUidMap); mAppsView.getAppsStore().setApps(mApps, mAppsModelFlags, mPackageUserKeytoUidMap, false); mAppsView.getFloatingHeaderView() .findFixedRowByType(PredictionRowView.class) .setPredictedApps(mPredictedApps); Loading
src/com/android/launcher3/allapps/AllAppsStore.java +14 −2 Original line number Diff line number Diff line Loading @@ -81,18 +81,30 @@ public class AllAppsStore<T extends Context & ActivityContext> { mContext = context; } /** * Calling {@link #setApps(AppInfo[], int, Map, boolean)} with shouldPreinflate set to * {@code true}. This method should be called in launcher (not for taskbar). */ public void setApps(@Nullable AppInfo[] apps, int flags, Map<PackageUserKey, Integer> map) { setApps(apps, flags, map, /* shouldPreinflate= */ true); } /** * Sets the current set of apps and sets mapping for {@link PackageUserKey} to Uid for * the current set of apps. * * <p> Note that shouldPreinflate param should be set to {@code false} for taskbar, because this * method is too late to preinflate all apps, as user will open all apps in the same frame. */ public void setApps(@Nullable AppInfo[] apps, int flags, Map<PackageUserKey, Integer> map) { public void setApps(@Nullable AppInfo[] apps, int flags, Map<PackageUserKey, Integer> map, boolean shouldPreinflate) { mApps = apps == null ? EMPTY_ARRAY : apps; mModelFlags = flags; notifyUpdate(); mPackageUserKeytoUidMap = map; // Preinflate all apps RV when apps has changed, which can happen after unlocking screen, // rotating screen, or downloading/upgrading apps. if (ENABLE_ALL_APPS_RV_PREINFLATION.get()) { if (shouldPreinflate && ENABLE_ALL_APPS_RV_PREINFLATION.get()) { mAllAppsRecyclerViewPool.preInflateAllAppsViewHolders(mContext); } } Loading