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

Commit aea2061e authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Create a Task from the TaskInfo directly" into main

parents 63bc46e3 6b541319
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -309,6 +309,13 @@ public class Task {
                taskInfo.topActivity);
    }

    /**
     * Creates a task object from the given [taskInfo].
     */
    public static Task from(TaskInfo taskInfo) {
        return from(new TaskKey(taskInfo), taskInfo, /* isLocked= */ false);
    }

    public Task(TaskKey key) {
        this.key = key;
        this.taskDescription = new TaskDescription();