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

Commit 57810aef authored by Hyunyoung Song's avatar Hyunyoung Song
Browse files

Work folder name is only fetched from activity, not ActivityContext

Bug: 217872881
Test: builds
Change-Id: I36bc9c386772c20fce2d10bf1bfaad565046d38f
parent c1b94255
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);
        }