diff options
author | Tony Wickham <twickham@google.com> | 2021-01-27 16:27:15 -0800 |
---|---|---|
committer | Tony Wickham <twickham@google.com> | 2021-02-03 18:54:58 -0800 |
commit | aaa42bd0e85f21c78d999c20adb819d77b6df731 (patch) | |
tree | 750c08be09184c45786921f8f2cae61e6181348b /quickstep/src/com/android/launcher3/taskbar/TaskbarDragController.java | |
parent | 5809a40f3ed091af74c5209a09a628fa2b5beb76 (diff) |
Add recent tasks to Taskbar
- Also adds a divider between Hotseat and Recents
- Dedupes Recents from Hotseat
Test: Open some recent tasks, ensure they are deduped
from Hotseat and also handle < 2 tasks.
Bug: 171917176
Change-Id: Ia782c6ccbcda94cfd844aad04dc3d25a3f072c2b
Diffstat (limited to 'quickstep/src/com/android/launcher3/taskbar/TaskbarDragController.java')
-rw-r--r-- | quickstep/src/com/android/launcher3/taskbar/TaskbarDragController.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarDragController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarDragController.java index 2318ff96b6..baec8998f3 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarDragController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarDragController.java @@ -25,6 +25,7 @@ import android.content.pm.LauncherApps; import android.content.res.Resources; import android.graphics.Canvas; import android.graphics.Point; +import android.os.UserHandle; import android.view.DragEvent; import android.view.View; @@ -33,6 +34,7 @@ import com.android.launcher3.BubbleTextView; import com.android.launcher3.LauncherSettings; import com.android.launcher3.R; import com.android.launcher3.model.data.WorkspaceItemInfo; +import com.android.systemui.shared.recents.model.Task; import com.android.systemui.shared.system.ClipDescriptionCompat; import com.android.systemui.shared.system.LauncherAppsCompat; @@ -102,6 +104,15 @@ public class TaskbarDragController { item.getIntent().getComponent(), null, item.user)); } intent.putExtra(Intent.EXTRA_USER, item.user); + } else if (tag instanceof Task) { + Task task = (Task) tag; + clipDescription = new ClipDescription(task.titleDescription, + new String[] { + ClipDescriptionCompat.MIMETYPE_APPLICATION_TASK + }); + intent = new Intent(); + intent.putExtra(ClipDescriptionCompat.EXTRA_TASK_ID, task.key.id); + intent.putExtra(Intent.EXTRA_USER, UserHandle.of(task.key.userId)); } if (clipDescription != null && intent != null) { |