summaryrefslogtreecommitdiffstats
path: root/quickstep
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2019-05-22 03:48:36 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2019-05-22 03:48:36 +0000
commit47f21e8a08fd024b99feabdf6c8470e0c253a30d (patch)
tree96d86893e42313dd80a39a228d8c2a20e9f88c8f /quickstep
parent0ef504aa71c85e36fc03300c4649adc503113920 (diff)
parent8f7d2b0dfd4aa0ab060b6e0be893eee136e5f2a4 (diff)
downloadandroid_packages_apps_Trebuchet-47f21e8a08fd024b99feabdf6c8470e0c253a30d.tar.gz
android_packages_apps_Trebuchet-47f21e8a08fd024b99feabdf6c8470e0c253a30d.tar.bz2
android_packages_apps_Trebuchet-47f21e8a08fd024b99feabdf6c8470e0c253a30d.zip
Merge "Fix issue where Assistant could be invoked at the same time as all apps" into ub-launcher3-qt-dev
Diffstat (limited to 'quickstep')
-rw-r--r--quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/AssistantTouchConsumer.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/AssistantTouchConsumer.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/AssistantTouchConsumer.java
index 2ff5e2386..bf276e1e1 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/AssistantTouchConsumer.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/AssistantTouchConsumer.java
@@ -41,6 +41,7 @@ import android.os.SystemClock;
import android.util.Log;
import android.view.HapticFeedbackConstants;
import android.view.MotionEvent;
+import android.view.ViewConfiguration;
import com.android.launcher3.BaseDraggingActivity;
import com.android.launcher3.R;
@@ -97,7 +98,9 @@ public class AssistantTouchConsumer extends DelegateInputConsumer
mDistThreshold = res.getDimension(R.dimen.gestures_assistant_drag_threshold);
mTimeThreshold = res.getInteger(R.integer.assistant_gesture_min_time_threshold);
mAngleThreshold = res.getInteger(R.integer.assistant_gesture_corner_deg_threshold);
- float slop = QuickStepContract.getQuickStepDragSlopPx();
+
+ float slop = ViewConfiguration.get(context).getScaledTouchSlop();
+
mSquaredSlop = slop * slop;
mActivityControlHelper = activityControlHelper;
mSwipeDetector = new SwipeDetector(mContext, this, SwipeDetector.VERTICAL);
@@ -273,7 +276,7 @@ public class AssistantTouchConsumer extends DelegateInputConsumer
@Override
public void onDragEnd(float velocity, boolean fling) {
- if (fling && !mLaunchedAssistant) {
+ if (fling && !mLaunchedAssistant && mState != STATE_DELEGATE_ACTIVE) {
mLastProgress = 1;
try {
mSysUiProxy.onAssistantGestureCompletion(velocity);