Don't snap to task when tapping task icon in overview grid

- Open task menu directly instead of snapping to task, as there are spaces to do so unlike small screen

Fix: 201428316
Test: Tap task icon with clear all button shown in overview grid, no snapping
Test: Tap task icon with clear all button shown in non-grid overview, snapped to last task
Change-Id: Ief79f7c758c4109e5c7722b2f35647db98a9f05c
diff --git a/quickstep/src/com/android/quickstep/views/TaskView.java b/quickstep/src/com/android/quickstep/views/TaskView.java
index 7b4bf62..ea8282f 100644
--- a/quickstep/src/com/android/quickstep/views/TaskView.java
+++ b/quickstep/src/com/android/quickstep/views/TaskView.java
@@ -795,7 +795,8 @@
             return true;
         }
 
-        if (!getRecentsView().isClearAllHidden()) {
+        if (!mActivity.getDeviceProfile().overviewShowAsGrid
+                && !getRecentsView().isClearAllHidden()) {
             getRecentsView().snapToPage(getRecentsView().indexOfChild(this));
             return false;
         } else {