mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-28 07:46:55 +00:00
Removing unnecessary work adapter wrapper
Simplifying view type constants to make it easier to add new view types Bug: 234008165 Test: Verified on device Change-Id: I96589ceba362ea7e75afdfc3fe8da3be214aa682
This commit is contained in:
@@ -50,7 +50,7 @@ public class AlphabeticalAppsList<T extends Context & ActivityContext> implement
|
||||
|
||||
public static final String TAG = "AlphabeticalAppsList";
|
||||
|
||||
private final WorkAdapterProvider mWorkAdapterProvider;
|
||||
private final WorkProfileManager mWorkProviderManager;
|
||||
|
||||
/**
|
||||
* Info about a fast scroller section, depending if sections are merged, the fast scroller
|
||||
@@ -92,11 +92,11 @@ public class AlphabeticalAppsList<T extends Context & ActivityContext> implement
|
||||
private Predicate<ItemInfo> mItemFilter;
|
||||
|
||||
public AlphabeticalAppsList(Context context, @Nullable AllAppsStore appsStore,
|
||||
WorkAdapterProvider adapterProvider) {
|
||||
WorkProfileManager workProfileManager) {
|
||||
mAllAppsStore = appsStore;
|
||||
mActivityContext = ActivityContext.lookupContext(context);
|
||||
mAppNameComparator = new AppInfoComparator(context);
|
||||
mWorkAdapterProvider = adapterProvider;
|
||||
mWorkProviderManager = workProfileManager;
|
||||
mNumAppsPerRowAllApps = mActivityContext.getDeviceProfile().inv.numAllAppsColumns;
|
||||
if (mAllAppsStore != null) {
|
||||
mAllAppsStore.addUpdateListener(this);
|
||||
@@ -260,9 +260,9 @@ public class AlphabeticalAppsList<T extends Context & ActivityContext> implement
|
||||
}
|
||||
} else {
|
||||
int position = 0;
|
||||
if (mWorkAdapterProvider != null) {
|
||||
position += mWorkAdapterProvider.addWorkItems(mAdapterItems);
|
||||
if (!mWorkAdapterProvider.shouldShowWorkApps()) {
|
||||
if (mWorkProviderManager != null) {
|
||||
position += mWorkProviderManager.addWorkItems(mAdapterItems);
|
||||
if (!mWorkProviderManager.shouldShowWorkApps()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user