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

Commit 65fc27d5 authored by Daniel Chapin's avatar Daniel Chapin Committed by Android (Google) Code Review
Browse files

Merge "Work folder name is only fetched from activity, not ActivityContext"

parents 19f7d988 57810aef
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -27,14 +27,12 @@ import com.android.launcher3.R;
import com.android.launcher3.model.AllAppsList;
import com.android.launcher3.model.BaseModelUpdateTask;
import com.android.launcher3.model.BgDataModel;
import com.android.launcher3.model.StringCache;
import com.android.launcher3.model.data.AppInfo;
import com.android.launcher3.model.data.FolderInfo;
import com.android.launcher3.model.data.WorkspaceItemInfo;
import com.android.launcher3.util.IntSparseArrayMap;
import com.android.launcher3.util.Preconditions;
import com.android.launcher3.util.ResourceBasedOverride;
import com.android.launcher3.views.ActivityContext;

import java.util.ArrayList;
import java.util.Arrays;
@@ -109,9 +107,7 @@ public class FolderNameProvider implements ResourceBasedOverride {
        Set<UserHandle> users = workspaceItemInfos.stream().map(w -> w.user)
                .collect(Collectors.toSet());
        if (users.size() == 1 && !users.contains(Process.myUserHandle())) {
            StringCache cache = ActivityContext.lookupContext(context).getStringCache();
            String workFolderName = cache != null
                    ? cache.workFolderName : context.getString(R.string.work_folder_name);
            String workFolderName = context.getString(R.string.work_folder_name);
            setAsLastSuggestion(nameInfos, workFolderName);
        }