am e69b2860: Merge "DO NOT MERGE Removed "Stop selecting text" option." into gingerbread

Merge commit 'e69b286005b0b543e274f523d894e069811215a6' into gingerbread-plus-aosp

* commit 'e69b286005b0b543e274f523d894e069811215a6':
  DO NOT MERGE Removed "Stop selecting text" option.
This commit is contained in:
Gilles Debunne
2010-08-27 12:23:43 -07:00
committed by Android Git Automerger

View File

@@ -4304,7 +4304,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
return 0; return 0;
} }
break; break;
// Has to be done on key down (and not on key up) to correctly be intercepted.
case KeyEvent.KEYCODE_BACK: case KeyEvent.KEYCODE_BACK:
if (mIsInTextSelectionMode) { if (mIsInTextSelectionMode) {
stopTextSelectionMode(); stopTextSelectionMode();
@@ -4464,6 +4465,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
return super.onKeyUp(keyCode, event); return super.onKeyUp(keyCode, event);
} }
break;
} }
if (mInput != null) if (mInput != null)
@@ -7335,7 +7337,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
// Context menu entries // Context menu entries
private static final int ID_SELECT_ALL = android.R.id.selectAll; 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_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_CUT = android.R.id.cut;
private static final int ID_COPY = android.R.id.copy; private static final int ID_COPY = android.R.id.copy;
private static final int ID_PASTE = android.R.id.paste; private static final int ID_PASTE = android.R.id.paste;
@@ -7382,10 +7383,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
startTextSelectionMode(); startTextSelectionMode();
return true; return true;
case ID_STOP_SELECTING_TEXT:
stopTextSelectionMode();
return true;
case ID_CUT: case ID_CUT:
clip.setText(mTransformed.subSequence(min, max)); clip.setText(mTransformed.subSequence(min, max));
((Editable) mText).delete(min, max); ((Editable) mText).delete(min, max);