Loading core/java/android/text/method/Touch.java +11 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.text.Layout; import android.text.NoCopySpan; import android.text.Layout.Alignment; import android.text.Spannable; import android.util.Log; import android.view.MotionEvent; import android.view.ViewConfiguration; import android.widget.TextView; Loading Loading @@ -156,8 +157,17 @@ public class Touch { padding)); ny = Math.max(ny, 0); int oldX = widget.getScrollX(); int oldY = widget.getScrollY(); scrollTo(widget, layout, nx, ny); // If we actually scrolled, then cancel the up action. if (oldX != widget.getScrollX() || oldY != widget.getScrollY()) { widget.cancelLongPress(); } return true; } } Loading core/java/android/widget/TextView.java +1 −4 Original line number Diff line number Diff line Loading @@ -6529,6 +6529,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener // Reset this state; it will be re-set if super.onTouchEvent // causes focus to move to the view. mTouchFocusSelected = false; mScrolled = false; } final boolean superResult = super.onTouchEvent(event); Loading @@ -6545,10 +6546,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener if ((mMovement != null || onCheckIsTextEditor()) && mText instanceof Spannable && mLayout != null) { if (action == MotionEvent.ACTION_DOWN) { mScrolled = false; } boolean handled = false; int oldSelStart = Selection.getSelectionStart(mText); Loading Loading
core/java/android/text/method/Touch.java +11 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.text.Layout; import android.text.NoCopySpan; import android.text.Layout.Alignment; import android.text.Spannable; import android.util.Log; import android.view.MotionEvent; import android.view.ViewConfiguration; import android.widget.TextView; Loading Loading @@ -156,8 +157,17 @@ public class Touch { padding)); ny = Math.max(ny, 0); int oldX = widget.getScrollX(); int oldY = widget.getScrollY(); scrollTo(widget, layout, nx, ny); // If we actually scrolled, then cancel the up action. if (oldX != widget.getScrollX() || oldY != widget.getScrollY()) { widget.cancelLongPress(); } return true; } } Loading
core/java/android/widget/TextView.java +1 −4 Original line number Diff line number Diff line Loading @@ -6529,6 +6529,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener // Reset this state; it will be re-set if super.onTouchEvent // causes focus to move to the view. mTouchFocusSelected = false; mScrolled = false; } final boolean superResult = super.onTouchEvent(event); Loading @@ -6545,10 +6546,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener if ((mMovement != null || onCheckIsTextEditor()) && mText instanceof Spannable && mLayout != null) { if (action == MotionEvent.ACTION_DOWN) { mScrolled = false; } boolean handled = false; int oldSelStart = Selection.getSelectionStart(mText); Loading