summaryrefslogtreecommitdiffstats
path: root/core/java/android/widget
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/widget')
-rw-r--r--core/java/android/widget/TextView.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index c888026..5cdd4f2 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -4304,7 +4304,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
return 0;
}
break;
-
+
+ // Has to be done on key down (and not on key up) to correctly be intercepted.
case KeyEvent.KEYCODE_BACK:
if (mIsInTextSelectionMode) {
stopTextSelectionMode();
@@ -4464,6 +4465,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
return super.onKeyUp(keyCode, event);
}
+ break;
}
if (mInput != null)
@@ -7335,7 +7337,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
// Context menu entries
private static final int ID_SELECT_ALL = android.R.id.selectAll;
private static final int ID_START_SELECTING_TEXT = android.R.id.startSelectingText;
- private static final int ID_STOP_SELECTING_TEXT = android.R.id.stopSelectingText;
private static final int ID_CUT = android.R.id.cut;
private static final int ID_COPY = android.R.id.copy;
private static final int ID_PASTE = android.R.id.paste;
@@ -7382,10 +7383,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
startTextSelectionMode();
return true;
- case ID_STOP_SELECTING_TEXT:
- stopTextSelectionMode();
- return true;
-
case ID_CUT:
clip.setText(mTransformed.subSequence(min, max));
((Editable) mText).delete(min, max);