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

Commit 3da648a8 authored by Sunny Goyal's avatar Sunny Goyal Committed by Android (Google) Code Review
Browse files

Merge "Fixing work tab is not updated when work-mode changes" into tm-qpr-dev

parents 485c8777 3c2ee27a
Loading
Loading
Loading
Loading
+14 −13
Original line number Diff line number Diff line
@@ -239,12 +239,12 @@ public class AlphabeticalAppsList<T extends Context & ActivityContext> implement
            mAdapterItems.addAll(mSearchResults);
        } else {
            int position = 0;
            boolean addApps = true;
            if (mWorkProviderManager != null) {
                position += mWorkProviderManager.addWorkItems(mAdapterItems);
                if (!mWorkProviderManager.shouldShowWorkApps()) {
                    return;
                }
                addApps = mWorkProviderManager.shouldShowWorkApps();
            }
            if (addApps) {
                String lastSectionName = null;
                for (AppInfo info : mApps) {
                    mAdapterItems.add(AdapterItem.asApp(info));
@@ -258,6 +258,7 @@ public class AlphabeticalAppsList<T extends Context & ActivityContext> implement
                    position++;
                }
            }
        }
        mAccessibilityResultsCount = (int) mAdapterItems.stream()
                .filter(AdapterItem::isCountedForAccessibility).count();