diff options
author | Tony Wickham <twickham@google.com> | 2016-07-27 00:16:56 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2016-07-27 00:16:56 +0000 |
commit | 10717bfcae5fc6d34818f09d4f2ce584222cdba0 (patch) | |
tree | 8671c6d9f7762cedd7139d5d7a0034c5a04b5b19 /src | |
parent | eec1f9a839e8c58a96f16f61e998891433e0eb6b (diff) | |
parent | 47c5a495792f37c9fe443aa896d539d264432509 (diff) | |
download | android_packages_apps_Trebuchet-10717bfcae5fc6d34818f09d4f2ce584222cdba0.tar.gz android_packages_apps_Trebuchet-10717bfcae5fc6d34818f09d4f2ce584222cdba0.tar.bz2 android_packages_apps_Trebuchet-10717bfcae5fc6d34818f09d4f2ce584222cdba0.zip |
Merge "Remove DisallowIntercept runnable from ShortcutsContainerListener." into ub-launcher3-calgary
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher3/shortcuts/ShortcutsContainerListener.java | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/com/android/launcher3/shortcuts/ShortcutsContainerListener.java b/src/com/android/launcher3/shortcuts/ShortcutsContainerListener.java index f94595b54..507939a8e 100644 --- a/src/com/android/launcher3/shortcuts/ShortcutsContainerListener.java +++ b/src/com/android/launcher3/shortcuts/ShortcutsContainerListener.java @@ -4,7 +4,6 @@ import android.os.SystemClock; import android.view.MotionEvent; import android.view.View; import android.view.ViewConfiguration; -import android.view.ViewParent; import com.android.launcher3.BubbleTextView; import com.android.launcher3.CheckLongPressHelper; @@ -22,18 +21,12 @@ public class ShortcutsContainerListener implements View.OnTouchListener, /** Scaled touch slop, used for detecting movement outside bounds. */ private final float mScaledTouchSlop; - /** Timeout before disallowing intercept on the source's parent. */ - private final int mTapTimeout; - /** Timeout before accepting a long-press to start forwarding. */ private final int mLongPressTimeout; /** Source view from which events are forwarded. */ private final BubbleTextView mSrcIcon; - /** Runnable used to prevent conflicts with scrolling parents. */ - private Runnable mDisallowIntercept; - /** Runnable used to trigger forwarding on long-press. */ private Runnable mTriggerLongPress; @@ -56,7 +49,6 @@ public class ShortcutsContainerListener implements View.OnTouchListener, public ShortcutsContainerListener(BubbleTextView icon) { mSrcIcon = icon; mScaledTouchSlop = ViewConfiguration.get(icon.getContext()).getScaledTouchSlop(); - mTapTimeout = ViewConfiguration.getTapTimeout(); mLongPressTimeout = CheckLongPressHelper.DEFAULT_LONG_PRESS_TIMEOUT; @@ -113,10 +105,6 @@ public class ShortcutsContainerListener implements View.OnTouchListener, public void onViewDetachedFromWindow(View v) { mForwarding = false; mActivePointerId = MotionEvent.INVALID_POINTER_ID; - - if (mDisallowIntercept != null) { - mSrcIcon.removeCallbacks(mDisallowIntercept); - } } /** @@ -158,11 +146,6 @@ public class ShortcutsContainerListener implements View.OnTouchListener, case MotionEvent.ACTION_DOWN: mActivePointerId = srcEvent.getPointerId(0); - if (mDisallowIntercept == null) { - mDisallowIntercept = new DisallowIntercept(); - } - src.postDelayed(mDisallowIntercept, mTapTimeout); - if (mTriggerLongPress == null) { mTriggerLongPress = new TriggerLongPress(); } @@ -195,10 +178,6 @@ public class ShortcutsContainerListener implements View.OnTouchListener, if (mTriggerLongPress != null) { mSrcIcon.removeCallbacks(mTriggerLongPress); } - - if (mDisallowIntercept != null) { - mSrcIcon.removeCallbacks(mDisallowIntercept); - } } private void onLongPress() { @@ -265,14 +244,6 @@ public class ShortcutsContainerListener implements View.OnTouchListener, return handled && keepForwarding; } - private class DisallowIntercept implements Runnable { - @Override - public void run() { - final ViewParent parent = mSrcIcon.getParent(); - parent.requestDisallowInterceptTouchEvent(true); - } - } - private class TriggerLongPress implements Runnable { @Override public void run() { |