summaryrefslogtreecommitdiffstats
path: root/core/java/android/inputmethodservice/InputMethodService.java
diff options
context:
space:
mode:
authorsatok <satok@google.com>2011-06-21 17:38:02 +0900
committersatok <satok@google.com>2011-06-29 23:24:24 +0900
commit863fcd62171e55bc9f2105d9fb5877df982454d8 (patch)
treecb95025f4fba8e5ce3f403b0f0c4111fce2a65c8 /core/java/android/inputmethodservice/InputMethodService.java
parent01fa0d7aae1a551e1e7cfb90d2aeaf2fcb3978af (diff)
downloadframeworks_base-863fcd62171e55bc9f2105d9fb5877df982454d8.zip
frameworks_base-863fcd62171e55bc9f2105d9fb5877df982454d8.tar.gz
frameworks_base-863fcd62171e55bc9f2105d9fb5877df982454d8.tar.bz2
Add onClickView to InputMethodService
Bug: 4697141 - onClickView is called everytime the user taps EditText Change-Id: Ia71ad325e50a20e9e1001def662ef992bb50a9d0
Diffstat (limited to 'core/java/android/inputmethodservice/InputMethodService.java')
-rw-r--r--core/java/android/inputmethodservice/InputMethodService.java20
1 files changed, 19 insertions, 1 deletions
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index feb246e..9481a88 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -488,7 +488,15 @@ public class InputMethodService extends AbstractInputMethodService {
InputMethodService.this.onUpdateSelection(oldSelStart, oldSelEnd,
newSelStart, newSelEnd, candidatesStart, candidatesEnd);
}
-
+
+ @Override
+ public void viewClicked(boolean focusChanged) {
+ if (!isEnabled()) {
+ return;
+ }
+ InputMethodService.this.onViewClicked(focusChanged);
+ }
+
/**
* Call {@link InputMethodService#onUpdateCursor
* InputMethodService.onUpdateCursor()}.
@@ -1609,6 +1617,16 @@ public class InputMethodService extends AbstractInputMethodService {
}
/**
+ * Called when the user tapped or clicked a text view.
+ * IMEs can't rely on this method being called because this was not part of the original IME
+ * protocol, so applications with custom text editing written before this method appeared will
+ * not call to inform the IME of this interaction.
+ * @param focusChanged true if the user changed the focused view by this click.
+ */
+ public void onViewClicked(boolean focusChanged) {
+ }
+
+ /**
* Called when the application has reported a new location of its text
* cursor. This is only called if explicitly requested by the input method.
* The default implementation does nothing.