Loading quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsController.java +7 −5 Original line number Diff line number Diff line Loading @@ -15,8 +15,11 @@ */ package com.android.launcher3.taskbar.allapps; import static com.android.launcher3.model.data.AppInfo.EMPTY_ARRAY; import android.view.View; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.VisibleForTesting; Loading @@ -33,7 +36,6 @@ import java.util.Collections; import java.util.List; import java.util.Map; import java.util.function.Predicate; /** * Handles the all apps overlay window initialization, updates, and its data. * <p> Loading @@ -54,9 +56,9 @@ public final class TaskbarAllAppsController { private @Nullable TaskbarSearchSessionController mSearchSessionController; // Application data models. private AppInfo[] mApps; private @NonNull AppInfo[] mApps = EMPTY_ARRAY; private int mAppsModelFlags; private List<ItemInfo> mPredictedApps; private @NonNull List<ItemInfo> mPredictedApps = Collections.emptyList(); private @Nullable List<ItemInfo> mZeroStateSearchSuggestions; private boolean mDisallowGlobalDrag; private boolean mDisallowLongClick; Loading @@ -82,8 +84,8 @@ public final class TaskbarAllAppsController { } /** Updates the current {@link AppInfo} instances. */ public void setApps(AppInfo[] apps, int flags, Map<PackageUserKey, Integer> map) { mApps = apps; public void setApps(@Nullable AppInfo[] apps, int flags, Map<PackageUserKey, Integer> map) { mApps = apps == null ? EMPTY_ARRAY : apps; mAppsModelFlags = flags; mPackageUserKeytoUidMap = map; if (mAppsView != null) { Loading src/com/android/launcher3/allapps/AllAppsStore.java +3 −3 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ public class AllAppsStore<T extends Context & ActivityContext> { private PackageUserKey mTempKey = new PackageUserKey(null, null); private AppInfo mTempInfo = new AppInfo(); private AppInfo[] mApps = EMPTY_ARRAY; private @NonNull AppInfo[] mApps = EMPTY_ARRAY; private final List<OnUpdateListener> mUpdateListeners = new CopyOnWriteArrayList<>(); private final ArrayList<ViewGroup> mIconContainers = new ArrayList<>(); Loading @@ -85,8 +85,8 @@ public class AllAppsStore<T extends Context & ActivityContext> { * Sets the current set of apps and sets mapping for {@link PackageUserKey} to Uid for * the current set of apps. */ public void setApps(AppInfo[] apps, int flags, Map<PackageUserKey, Integer> map) { mApps = apps; public void setApps(@Nullable AppInfo[] apps, int flags, Map<PackageUserKey, Integer> map) { mApps = apps == null ? EMPTY_ARRAY : apps; mModelFlags = flags; notifyUpdate(); mPackageUserKeytoUidMap = map; Loading Loading
quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsController.java +7 −5 Original line number Diff line number Diff line Loading @@ -15,8 +15,11 @@ */ package com.android.launcher3.taskbar.allapps; import static com.android.launcher3.model.data.AppInfo.EMPTY_ARRAY; import android.view.View; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.VisibleForTesting; Loading @@ -33,7 +36,6 @@ import java.util.Collections; import java.util.List; import java.util.Map; import java.util.function.Predicate; /** * Handles the all apps overlay window initialization, updates, and its data. * <p> Loading @@ -54,9 +56,9 @@ public final class TaskbarAllAppsController { private @Nullable TaskbarSearchSessionController mSearchSessionController; // Application data models. private AppInfo[] mApps; private @NonNull AppInfo[] mApps = EMPTY_ARRAY; private int mAppsModelFlags; private List<ItemInfo> mPredictedApps; private @NonNull List<ItemInfo> mPredictedApps = Collections.emptyList(); private @Nullable List<ItemInfo> mZeroStateSearchSuggestions; private boolean mDisallowGlobalDrag; private boolean mDisallowLongClick; Loading @@ -82,8 +84,8 @@ public final class TaskbarAllAppsController { } /** Updates the current {@link AppInfo} instances. */ public void setApps(AppInfo[] apps, int flags, Map<PackageUserKey, Integer> map) { mApps = apps; public void setApps(@Nullable AppInfo[] apps, int flags, Map<PackageUserKey, Integer> map) { mApps = apps == null ? EMPTY_ARRAY : apps; mAppsModelFlags = flags; mPackageUserKeytoUidMap = map; if (mAppsView != null) { Loading
src/com/android/launcher3/allapps/AllAppsStore.java +3 −3 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ public class AllAppsStore<T extends Context & ActivityContext> { private PackageUserKey mTempKey = new PackageUserKey(null, null); private AppInfo mTempInfo = new AppInfo(); private AppInfo[] mApps = EMPTY_ARRAY; private @NonNull AppInfo[] mApps = EMPTY_ARRAY; private final List<OnUpdateListener> mUpdateListeners = new CopyOnWriteArrayList<>(); private final ArrayList<ViewGroup> mIconContainers = new ArrayList<>(); Loading @@ -85,8 +85,8 @@ public class AllAppsStore<T extends Context & ActivityContext> { * Sets the current set of apps and sets mapping for {@link PackageUserKey} to Uid for * the current set of apps. */ public void setApps(AppInfo[] apps, int flags, Map<PackageUserKey, Integer> map) { mApps = apps; public void setApps(@Nullable AppInfo[] apps, int flags, Map<PackageUserKey, Integer> map) { mApps = apps == null ? EMPTY_ARRAY : apps; mModelFlags = flags; notifyUpdate(); mPackageUserKeytoUidMap = map; Loading