Merge "Fixing work tab is not updated when work-mode changes" into tm-qpr-dev am: 3da648a80b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/20886439 Change-Id: Id88d1048401066badd490b10f92c1f85bda4a205 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -239,23 +239,24 @@ 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();
|
||||
}
|
||||
String lastSectionName = null;
|
||||
for (AppInfo info : mApps) {
|
||||
mAdapterItems.add(AdapterItem.asApp(info));
|
||||
if (addApps) {
|
||||
String lastSectionName = null;
|
||||
for (AppInfo info : mApps) {
|
||||
mAdapterItems.add(AdapterItem.asApp(info));
|
||||
|
||||
String sectionName = info.sectionName;
|
||||
// Create a new section if the section names do not match
|
||||
if (!sectionName.equals(lastSectionName)) {
|
||||
lastSectionName = sectionName;
|
||||
mFastScrollerSections.add(new FastScrollSectionInfo(sectionName, position));
|
||||
String sectionName = info.sectionName;
|
||||
// Create a new section if the section names do not match
|
||||
if (!sectionName.equals(lastSectionName)) {
|
||||
lastSectionName = sectionName;
|
||||
mFastScrollerSections.add(new FastScrollSectionInfo(sectionName, position));
|
||||
}
|
||||
position++;
|
||||
}
|
||||
position++;
|
||||
}
|
||||
}
|
||||
mAccessibilityResultsCount = (int) mAdapterItems.stream()
|
||||
|
||||
Reference in New Issue
Block a user