[automerger] Log source component instead of current task base intent am: 3cc3df59af
Change-Id: If125e120eabe7ac2cd8e56b30f744c3999195dd8
This commit is contained in:
commit
dee4137e5e
Binary file not shown.
|
@ -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());
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -667,9 +667,10 @@ public abstract class RecentsView<T extends BaseActivity> 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<T extends BaseActivity> 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<T extends BaseActivity> 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);
|
||||
|
|
|
@ -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()));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue