mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 17:36:49 +00:00
Clear all task button should not log as individual swipe up
Bug: 78895803 Change-Id: I3a8c40e892396ea0781423fa1791a9e13a116c45
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user