Loading core/java/android/text/method/ArrowKeyMovementMethod.java +43 −36 Original line number Diff line number Diff line Loading @@ -267,7 +267,15 @@ implements MovementMethod (MetaKeyKeyListener.getMetaState(buffer, MetaKeyKeyListener.META_SELECTING) != 0); if (cap) { if (cap & handled) { // Before selecting, make sure we've moved out of the "slop". // handled will be true, if we're in select mode AND we're // OUT of the slop // Turn long press off while we're selecting. User needs to // re-tap on the selection to enable longpress widget.cancelLongPress(); // Update selection as we're moving the selection area. // Get the current touch position Loading Loading @@ -296,7 +304,6 @@ implements MovementMethod spanstart = findWordEnd(buffer, lastDownOffset); spanend = findWordStart(buffer, offset); } Selection.setSelection(buffer, spanstart, spanend); return true; } Loading core/java/android/view/View.java +6 −18 Original line number Diff line number Diff line Loading @@ -2726,9 +2726,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility setPressed(false); if (!mHasPerformedLongPress) { if (mPendingCheckForLongPress != null) { removeCallbacks(mPendingCheckForLongPress); } cancelLongPress(); } } } Loading Loading @@ -3750,9 +3748,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility if (imm != null && (mPrivateFlags & FOCUSED) != 0) { imm.focusOut(this); } if (mPendingCheckForLongPress != null) { removeCallbacks(mPendingCheckForLongPress); } cancelLongPress(); onFocusLost(); } else if (imm != null && (mPrivateFlags & FOCUSED) != 0) { imm.focusIn(this); Loading Loading @@ -3998,9 +3994,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility if (!mHasPerformedLongPress) { // This is a tap, so remove the longpress check if (mPendingCheckForLongPress != null) { removeCallbacks(mPendingCheckForLongPress); } cancelLongPress(); result = performClick(); } Loading Loading @@ -4190,9 +4184,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility if (!mHasPerformedLongPress) { // This is a tap, so remove the longpress check if (mPendingCheckForLongPress != null) { removeCallbacks(mPendingCheckForLongPress); } cancelLongPress(); // Only perform take click actions if we were in the pressed state if (!focusTaken) { Loading Loading @@ -4235,9 +4227,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility // Outside button if ((mPrivateFlags & PRESSED) != 0) { // Remove any future long press checks if (mPendingCheckForLongPress != null) { removeCallbacks(mPendingCheckForLongPress); } cancelLongPress(); // Need to switch from pressed to not pressed mPrivateFlags &= ~PRESSED; Loading Loading @@ -5769,9 +5759,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility * @see #onAttachedToWindow() */ protected void onDetachedFromWindow() { if (mPendingCheckForLongPress != null) { removeCallbacks(mPendingCheckForLongPress); } cancelLongPress(); destroyDrawingCache(); } Loading Loading
core/java/android/text/method/ArrowKeyMovementMethod.java +43 −36 Original line number Diff line number Diff line Loading @@ -267,7 +267,15 @@ implements MovementMethod (MetaKeyKeyListener.getMetaState(buffer, MetaKeyKeyListener.META_SELECTING) != 0); if (cap) { if (cap & handled) { // Before selecting, make sure we've moved out of the "slop". // handled will be true, if we're in select mode AND we're // OUT of the slop // Turn long press off while we're selecting. User needs to // re-tap on the selection to enable longpress widget.cancelLongPress(); // Update selection as we're moving the selection area. // Get the current touch position Loading Loading @@ -296,7 +304,6 @@ implements MovementMethod spanstart = findWordEnd(buffer, lastDownOffset); spanend = findWordStart(buffer, offset); } Selection.setSelection(buffer, spanstart, spanend); return true; } Loading
core/java/android/view/View.java +6 −18 Original line number Diff line number Diff line Loading @@ -2726,9 +2726,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility setPressed(false); if (!mHasPerformedLongPress) { if (mPendingCheckForLongPress != null) { removeCallbacks(mPendingCheckForLongPress); } cancelLongPress(); } } } Loading Loading @@ -3750,9 +3748,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility if (imm != null && (mPrivateFlags & FOCUSED) != 0) { imm.focusOut(this); } if (mPendingCheckForLongPress != null) { removeCallbacks(mPendingCheckForLongPress); } cancelLongPress(); onFocusLost(); } else if (imm != null && (mPrivateFlags & FOCUSED) != 0) { imm.focusIn(this); Loading Loading @@ -3998,9 +3994,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility if (!mHasPerformedLongPress) { // This is a tap, so remove the longpress check if (mPendingCheckForLongPress != null) { removeCallbacks(mPendingCheckForLongPress); } cancelLongPress(); result = performClick(); } Loading Loading @@ -4190,9 +4184,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility if (!mHasPerformedLongPress) { // This is a tap, so remove the longpress check if (mPendingCheckForLongPress != null) { removeCallbacks(mPendingCheckForLongPress); } cancelLongPress(); // Only perform take click actions if we were in the pressed state if (!focusTaken) { Loading Loading @@ -4235,9 +4227,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility // Outside button if ((mPrivateFlags & PRESSED) != 0) { // Remove any future long press checks if (mPendingCheckForLongPress != null) { removeCallbacks(mPendingCheckForLongPress); } cancelLongPress(); // Need to switch from pressed to not pressed mPrivateFlags &= ~PRESSED; Loading Loading @@ -5769,9 +5759,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility * @see #onAttachedToWindow() */ protected void onDetachedFromWindow() { if (mPendingCheckForLongPress != null) { removeCallbacks(mPendingCheckForLongPress); } cancelLongPress(); destroyDrawingCache(); } Loading