Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 69ac9b81 authored by Brian Isganitis's avatar Brian Isganitis Committed by Android (Google) Code Review
Browse files

Merge "Cleanup raw usage of AllAppsStore." into udc-qpr-dev

parents 7dd280ee e9eacb38
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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()) {
+3 −3
Original line number Diff line number Diff line
@@ -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;
    }

+2 −2
Original line number Diff line number Diff line
@@ -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);
+4 −2
Original line number Diff line number Diff line
@@ -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();
+1 −1
Original line number Diff line number Diff line
@@ -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);
    }