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

Commit 6b541319 authored by minch's avatar minch
Browse files

Create a Task from the TaskInfo directly

Bug: 401582344
Flag: EXEMPT refactor
Test: m
Change-Id: I5cf831cdbf08d496983a263efa13d783451a0a19
parent 3a5acfec
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();