Merge "Cleanup raw usage of AllAppsStore." into udc-qpr-dev am: 69ac9b8169
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23924283 Change-Id: I8bd977f6cd209f0913b313fa8b80f31cb1b39b57 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -2985,7 +2985,7 @@ public class Launcher extends StatefulActivity<LauncherState>
|
||||
Map<PackageUserKey, Integer> packageUserKeytoUidMap) {
|
||||
Preconditions.assertUIThread();
|
||||
boolean hadWorkApps = mAppsView.shouldShowTabs();
|
||||
AllAppsStore appsStore = mAppsView.getAppsStore();
|
||||
AllAppsStore<Launcher> appsStore = mAppsView.getAppsStore();
|
||||
appsStore.setApps(apps, flags, packageUserKeytoUidMap);
|
||||
PopupContainerWithArrow.dismissInvalidPopup(this);
|
||||
if (hadWorkApps != mAppsView.shouldShowTabs()) {
|
||||
|
||||
@@ -139,7 +139,7 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext>
|
||||
private final SearchTransitionController mSearchTransitionController;
|
||||
private final Paint mHeaderPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
private final Rect mInsets = new Rect();
|
||||
private final AllAppsStore mAllAppsStore;
|
||||
private final AllAppsStore<T> mAllAppsStore;
|
||||
private final RecyclerView.OnScrollListener mScrollListener =
|
||||
new RecyclerView.OnScrollListener() {
|
||||
@Override
|
||||
@@ -192,7 +192,7 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext>
|
||||
public ActivityAllAppsContainerView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
mActivityContext = ActivityContext.lookupContext(context);
|
||||
mAllAppsStore = new AllAppsStore(mActivityContext);
|
||||
mAllAppsStore = new AllAppsStore<>(mActivityContext);
|
||||
|
||||
mScrimColor = Themes.getAttrColor(context, R.attr.allAppsScrimColor);
|
||||
mHeaderThreshold = getResources().getDimensionPixelSize(
|
||||
@@ -892,7 +892,7 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext>
|
||||
container.put(R.id.work_tab_state_id, state);
|
||||
}
|
||||
|
||||
public AllAppsStore getAppsStore() {
|
||||
public AllAppsStore<T> getAppsStore() {
|
||||
return mAllAppsStore;
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ public class AlphabeticalAppsList<T extends Context & ActivityContext> implement
|
||||
// The set of apps from the system
|
||||
private final List<AppInfo> mApps = new ArrayList<>();
|
||||
@Nullable
|
||||
private final AllAppsStore mAllAppsStore;
|
||||
private final AllAppsStore<T> mAllAppsStore;
|
||||
|
||||
// The number of results in current adapter
|
||||
private int mAccessibilityResultsCount = 0;
|
||||
@@ -86,7 +86,7 @@ public class AlphabeticalAppsList<T extends Context & ActivityContext> implement
|
||||
private int mNumAppRowsInAdapter;
|
||||
private Predicate<ItemInfo> mItemFilter;
|
||||
|
||||
public AlphabeticalAppsList(Context context, @Nullable AllAppsStore appsStore,
|
||||
public AlphabeticalAppsList(Context context, @Nullable AllAppsStore<T> appsStore,
|
||||
WorkProfileManager workProfileManager) {
|
||||
mAllAppsStore = appsStore;
|
||||
mActivityContext = ActivityContext.lookupContext(context);
|
||||
|
||||
@@ -60,13 +60,15 @@ public class PinnedAppsAdapter extends BaseAdapter implements OnSharedPreference
|
||||
private final OnClickListener mOnClickListener;
|
||||
private final OnLongClickListener mOnLongClickListener;
|
||||
private final SharedPreferences mPrefs;
|
||||
private final AllAppsStore mAllAppsList;
|
||||
private final AllAppsStore<SecondaryDisplayLauncher> mAllAppsList;
|
||||
private final AppInfoComparator mAppNameComparator;
|
||||
|
||||
private final Set<ComponentKey> mPinnedApps = new HashSet<>();
|
||||
private final ArrayList<AppInfo> mItems = new ArrayList<>();
|
||||
|
||||
public PinnedAppsAdapter(SecondaryDisplayLauncher launcher, AllAppsStore allAppsStore,
|
||||
public PinnedAppsAdapter(
|
||||
SecondaryDisplayLauncher launcher,
|
||||
AllAppsStore<SecondaryDisplayLauncher> allAppsStore,
|
||||
OnLongClickListener onLongClickListener) {
|
||||
mLauncher = launcher;
|
||||
mOnClickListener = launcher.getItemOnClickListener();
|
||||
|
||||
@@ -302,7 +302,7 @@ public class SecondaryDisplayLauncher extends BaseDraggingActivity
|
||||
public void bindAllApplications(AppInfo[] apps, int flags,
|
||||
Map<PackageUserKey, Integer> packageUserKeytoUidMap) {
|
||||
Preconditions.assertUIThread();
|
||||
AllAppsStore appsStore = mAppsView.getAppsStore();
|
||||
AllAppsStore<SecondaryDisplayLauncher> appsStore = mAppsView.getAppsStore();
|
||||
appsStore.setApps(apps, flags, packageUserKeytoUidMap);
|
||||
PopupContainerWithArrow.dismissInvalidPopup(this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user