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

Commit 25e61b26 authored by Vinit Nayak's avatar Vinit Nayak Committed by Presubmit Automerger Backend
Browse files

[automerge] Add null check for null task in getItemInfo() 2p: 73c62880

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16828919

Change-Id: I205452840d664917ad1b61d3daec717f211a8ef2
parents bc4b55f9 73c62880
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -462,11 +462,15 @@ public class TaskView extends FrameLayout implements Reusable {
        return getItemInfo(mTask);
    }

    protected WorkspaceItemInfo getItemInfo(Task task) {
        ComponentKey componentKey = TaskUtils.getLaunchComponentKeyForTask(task.key);
    protected WorkspaceItemInfo getItemInfo(@Nullable Task task) {
        WorkspaceItemInfo stubInfo = new WorkspaceItemInfo();
        stubInfo.itemType = LauncherSettings.Favorites.ITEM_TYPE_TASK;
        stubInfo.container = LauncherSettings.Favorites.CONTAINER_TASKSWITCHER;
        if (task == null) {
            return stubInfo;
        }

        ComponentKey componentKey = TaskUtils.getLaunchComponentKeyForTask(task.key);
        stubInfo.user = componentKey.user;
        stubInfo.intent = new Intent().setComponent(componentKey.componentName);
        stubInfo.title = task.title;