diff options
author | Hyunyoung Song <hyunyoungs@google.com> | 2018-05-01 11:38:18 -0700 |
---|---|---|
committer | Hyunyoung Song <hyunyoungs@google.com> | 2018-05-01 15:47:26 -0700 |
commit | 78e278e9dbf7e391b0f3c0b67586fed739c6337d (patch) | |
tree | 9ab925b0544e3c823de6cc8c26f86f724ac267ef | |
parent | cbebaa19f992bf55c1f4d6d57e3a21c71f5ee013 (diff) | |
download | android_packages_apps_Trebuchet-78e278e9dbf7e391b0f3c0b67586fed739c6337d.tar.gz android_packages_apps_Trebuchet-78e278e9dbf7e391b0f3c0b67586fed739c6337d.tar.bz2 android_packages_apps_Trebuchet-78e278e9dbf7e391b0f3c0b67586fed739c6337d.zip |
Clear all task button should not log as individual swipe up
Bug: 78895803
Change-Id: I3a8c40e892396ea0781423fa1791a9e13a116c45
-rw-r--r-- | quickstep/src/com/android/quickstep/views/RecentsView.java | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 51b787ba0..68aabafea 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -735,12 +735,15 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl duration, LINEAR, anim); } - private void removeTask(Task task, PendingAnimation.OnEndListener onEndListener) { + private void removeTask(Task task, PendingAnimation.OnEndListener onEndListener, + boolean shouldLog) { if (task != null) { ActivityManagerWrapper.getInstance().removeTask(task.key.id); - mActivity.getUserEventDispatcher().logTaskLaunchOrDismiss( - onEndListener.logAction, Direction.UP, - TaskUtils.getComponentKeyForTask(task.key)); + if (shouldLog) { + mActivity.getUserEventDispatcher().logTaskLaunchOrDismiss( + onEndListener.logAction, Direction.UP, + TaskUtils.getComponentKeyForTask(task.key)); + } } } @@ -823,7 +826,7 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl mPendingAnimation.addEndListener((onEndListener) -> { if (onEndListener.isSuccess) { if (shouldRemoveTask) { - removeTask(taskView.getTask(), onEndListener); + removeTask(taskView.getTask(), onEndListener, true); } int pageToSnapTo = mCurrentPage; if (draggedIndex < pageToSnapTo) { @@ -859,7 +862,7 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl if (onEndListener.isSuccess) { while (getChildCount() != 0) { TaskView taskView = getPageAt(getChildCount() - 1); - removeTask(taskView.getTask(), onEndListener); + removeTask(taskView.getTask(), onEndListener, false); removeView(taskView); } onAllTasksRemoved(); |