summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGilles Debunne <debunne@google.com>2010-10-10 10:51:52 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-10-10 10:51:52 -0700
commitd14230f1c7aa5073db9d291f8fbd6da5491955b9 (patch)
treeac96d392ab4ff74ac89f9f2a920986c756a7075e
parent1c3ef78782cb3461ef83e0c337d03b6f677c94e5 (diff)
parentf8d8149501231cb9d44da657792abb15566f76b3 (diff)
downloadframeworks_base-d14230f1c7aa5073db9d291f8fbd6da5491955b9.zip
frameworks_base-d14230f1c7aa5073db9d291f8fbd6da5491955b9.tar.gz
frameworks_base-d14230f1c7aa5073db9d291f8fbd6da5491955b9.tar.bz2
Merge "Made paste work in ExtractEditText" into gingerbread
-rw-r--r--core/java/android/inputmethodservice/ExtractEditText.java12
1 files changed, 2 insertions, 10 deletions
diff --git a/core/java/android/inputmethodservice/ExtractEditText.java b/core/java/android/inputmethodservice/ExtractEditText.java
index 8a52e40..3447e76 100644
--- a/core/java/android/inputmethodservice/ExtractEditText.java
+++ b/core/java/android/inputmethodservice/ExtractEditText.java
@@ -18,7 +18,6 @@ package android.inputmethodservice;
import android.content.Context;
import android.util.AttributeSet;
-import android.view.ContextMenu;
import android.view.inputmethod.ExtractedText;
import android.widget.EditText;
@@ -29,7 +28,6 @@ import android.widget.EditText;
public class ExtractEditText extends EditText {
private InputMethodService mIME;
private int mSettingExtractedText;
- private boolean mContextMenuShouldBeHandledBySuper = false;
public ExtractEditText(Context context) {
super(context, null);
@@ -99,19 +97,13 @@ public class ExtractEditText extends EditText {
return false;
}
- @Override
- protected void onCreateContextMenu(ContextMenu menu) {
- super.onCreateContextMenu(menu);
- mContextMenuShouldBeHandledBySuper = true;
- }
-
@Override public boolean onTextContextMenuItem(int id) {
- if (mIME != null && !mContextMenuShouldBeHandledBySuper) {
+ // Horrible hack: select word option has to be handled by original view to work.
+ if (mIME != null && id != android.R.id.startSelectingText) {
if (mIME.onExtractTextContextMenuItem(id)) {
return true;
}
}
- mContextMenuShouldBeHandledBySuper = false;
return super.onTextContextMenuItem(id);
}