Merge "Get rid of multiple haptic feedbacks when long pressing on nav buttons" into main
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarNavButtonController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarNavButtonController.java
index d26a36d..ea091ca 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarNavButtonController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarNavButtonController.java
@@ -166,8 +166,12 @@
         if (buttonType == BUTTON_SPACE) {
             return false;
         }
-        // Provide the same haptic feedback that the system offers for virtual keys.
-        view.performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY);
+
+        // Provide the same haptic feedback that the system offers for long press.
+        // The haptic feedback from long pressing on the home button is handled by circle to search.
+        if (buttonType != BUTTON_HOME) {
+            view.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
+        }
         switch (buttonType) {
             case BUTTON_HOME:
                 logEvent(LAUNCHER_TASKBAR_HOME_BUTTON_LONGPRESS);
@@ -179,10 +183,12 @@
                 return true;
             case BUTTON_BACK:
                 logEvent(LAUNCHER_TASKBAR_BACK_BUTTON_LONGPRESS);
-                return backRecentsLongpress(buttonType);
+                backRecentsLongpress(buttonType);
+                return true;
             case BUTTON_RECENTS:
                 logEvent(LAUNCHER_TASKBAR_OVERVIEW_BUTTON_LONGPRESS);
-                return backRecentsLongpress(buttonType);
+                backRecentsLongpress(buttonType);
+                return true;
             case BUTTON_IME_SWITCH:
             default:
                 return false;