From 8a47d5f95587a5c0ae56f2fc09436f0874c5807c Mon Sep 17 00:00:00 2001 From: Alex Chau Date: Mon, 9 May 2022 14:54:10 +0100 Subject: [PATCH] Avoid logging LAUNCHER_OVERVIEW_GESTURE in 3 button mode - Avoid doLogGesture for app->overview in 3 button mode Bug: 219686410 Test: app -> overveiw in 3 button mode and gesture mode Change-Id: I5e65f9182be0388abfc9b07d5f08c96a3334b7b5 --- .../src/com/android/quickstep/AbsSwipeUpHandler.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java index 13389c0c09..f60b2253e4 100644 --- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java @@ -1177,6 +1177,11 @@ public abstract class AbsSwipeUpHandler, } private void doLogGesture(GestureEndTarget endTarget, @Nullable TaskView targetTask) { + if (mDp == null || !mDp.isGestureMode || mDownPos == null) { + // We probably never received an animation controller, skip logging. + return; + } + StatsLogManager.EventEnum event; switch (endTarget) { case HOME: @@ -1200,11 +1205,6 @@ public abstract class AbsSwipeUpHandler, logger.withItemInfo(targetTask.getItemInfo()); } - DeviceProfile dp = mDp; - if (dp == null || mDownPos == null) { - // We probably never received an animation controller, skip logging. - return; - } int pageIndex = endTarget == LAST_TASK || mRecentsView == null ? LOG_NO_OP_PAGE_INDEX : mRecentsView.getNextPage();