diff options
| author | Gilles Debunne <debunne@google.com> | 2012-01-13 15:26:05 -0800 |
|---|---|---|
| committer | Gilles Debunne <debunne@google.com> | 2012-01-13 16:23:35 -0800 |
| commit | 14568c3f76cc4d3ad75dfd0206a3dc2130135c58 (patch) | |
| tree | 43869c99e2eaf6041365210779a55a43c54c43d2 /core/java/android/inputmethodservice/ExtractEditText.java | |
| parent | ade3289beefd7acb318ccb937e1e1615012a003e (diff) | |
Fixes around extract mode
Stop selection mode after Edit/Copy while in extracted mode.
The selection mode was started by a long press in the ExtractedEditText.
Selection Copy in the menu simply sends the id to the context menu.
SelectionMode is not stopped in the underlying text since it was not
started there. Stop it directly in the ExtractedEditText.
Cut and paste do stop the mode because the text is modified.
Change-Id: Id7dbfa99de404c4eb85ced9627c99af4895ac628
Diffstat (limited to 'core/java/android/inputmethodservice/ExtractEditText.java')
| -rw-r--r-- | core/java/android/inputmethodservice/ExtractEditText.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/java/android/inputmethodservice/ExtractEditText.java b/core/java/android/inputmethodservice/ExtractEditText.java index 10c11958610b..23ae21b2a2d8 100644 --- a/core/java/android/inputmethodservice/ExtractEditText.java +++ b/core/java/android/inputmethodservice/ExtractEditText.java @@ -100,6 +100,9 @@ public class ExtractEditText extends EditText { @Override public boolean onTextContextMenuItem(int id) { if (mIME != null && mIME.onExtractTextContextMenuItem(id)) { + // Mode was started on Extracted, needs to be stopped here. + // Cut and paste will change the text, which stops selection mode. + if (id == android.R.id.copy) stopSelectionActionMode(); return true; } return super.onTextContextMenuItem(id); |
