diff --git a/quickstep/libs/sysui_shared.jar b/quickstep/libs/sysui_shared.jar index 308e92f666..27de1e9075 100644 Binary files a/quickstep/libs/sysui_shared.jar and b/quickstep/libs/sysui_shared.jar differ diff --git a/quickstep/src/com/android/quickstep/QuickScrubController.java b/quickstep/src/com/android/quickstep/QuickScrubController.java index 7a79c6f4df..e0089c6463 100644 --- a/quickstep/src/com/android/quickstep/QuickScrubController.java +++ b/quickstep/src/com/android/quickstep/QuickScrubController.java @@ -108,7 +108,7 @@ public class QuickScrubController implements OnAlarmListener { } else { mActivity.getUserEventDispatcher().logTaskLaunchOrDismiss(Touch.DRAGDROP, LauncherLogProto.Action.Direction.NONE, page, - TaskUtils.getComponentKeyForTask(taskView.getTask().key)); + TaskUtils.getLaunchComponentKeyForTask(taskView.getTask().key)); } mWaitingForTaskLaunch = false; }, taskView.getHandler()); diff --git a/quickstep/src/com/android/quickstep/TaskUtils.java b/quickstep/src/com/android/quickstep/TaskUtils.java index ec2c318d35..c9ba7dc0f3 100644 --- a/quickstep/src/com/android/quickstep/TaskUtils.java +++ b/quickstep/src/com/android/quickstep/TaskUtils.java @@ -75,8 +75,11 @@ public class TaskUtils { applicationInfo.loadLabel(packageManager), user); } - public static ComponentKey getComponentKeyForTask(Task.TaskKey taskKey) { - return new ComponentKey(taskKey.getComponent(), UserHandle.of(taskKey.userId)); + public static ComponentKey getLaunchComponentKeyForTask(Task.TaskKey taskKey) { + final ComponentName cn = taskKey.sourceComponent != null + ? taskKey.sourceComponent + : taskKey.getComponent(); + return new ComponentKey(cn, UserHandle.of(taskKey.userId)); } diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index d550edcd33..3cec078cde 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -667,9 +667,10 @@ public abstract class RecentsView extends PagedView impl // The temporary running task is only used for the duration between the start of the // gesture and the task list is loaded and applied - mTmpRunningTask = new Task(new Task.TaskKey(runningTaskId, 0, new Intent(), 0, 0), null, - null, "", "", 0, 0, false, true, false, false, - new ActivityManager.TaskDescription(), 0, new ComponentName("", ""), false); + mTmpRunningTask = new Task(new Task.TaskKey(runningTaskId, 0, new Intent(), + new ComponentName(getContext(), getClass()), 0, 0), null, null, "", "", 0, 0, + false, true, false, false, new ActivityManager.TaskDescription(), 0, + new ComponentName("", ""), false); taskView.bind(mTmpRunningTask); } setCurrentTask(runningTaskId); @@ -792,7 +793,7 @@ public abstract class RecentsView extends PagedView impl if (shouldLog) { mActivity.getUserEventDispatcher().logTaskLaunchOrDismiss( onEndListener.logAction, Direction.UP, index, - TaskUtils.getComponentKeyForTask(task.key)); + TaskUtils.getLaunchComponentKeyForTask(task.key)); } } } @@ -1229,7 +1230,7 @@ public abstract class RecentsView extends PagedView impl if (task != null) { mActivity.getUserEventDispatcher().logTaskLaunchOrDismiss( onEndListener.logAction, Direction.DOWN, indexOfChild(tv), - TaskUtils.getComponentKeyForTask(task.key)); + TaskUtils.getLaunchComponentKeyForTask(task.key)); } } else { onTaskLaunchFinish.accept(false); diff --git a/quickstep/src/com/android/quickstep/views/TaskView.java b/quickstep/src/com/android/quickstep/views/TaskView.java index b5f31b8e2e..a7690e1e38 100644 --- a/quickstep/src/com/android/quickstep/views/TaskView.java +++ b/quickstep/src/com/android/quickstep/views/TaskView.java @@ -118,7 +118,7 @@ public class TaskView extends FrameLayout implements TaskCallbacks, PageCallback launchTask(true /* animate */); BaseActivity.fromContext(context).getUserEventDispatcher().logTaskLaunchOrDismiss( Touch.TAP, Direction.NONE, getRecentsView().indexOfChild(this), - TaskUtils.getComponentKeyForTask(getTask().key)); + TaskUtils.getLaunchComponentKeyForTask(getTask().key)); }); setOutlineProvider(new TaskOutlineProvider(getResources())); }