summaryrefslogtreecommitdiff
path: root/android/view/inputmethod/InputMethod.java
diff options
context:
space:
mode:
authorJustin Klaassen <justinklaassen@google.com>2017-10-24 19:50:40 -0400
committerJustin Klaassen <justinklaassen@google.com>2017-10-24 19:50:40 -0400
commit47ed54e5d312f899507d28d6e95ccc18a0de19fe (patch)
tree7a2d435c55c36fbc1d07e895bd0c68b18f84e12c /android/view/inputmethod/InputMethod.java
parent07f9f65561c2b81bcd189b895b31bb2ad0438d74 (diff)
downloadandroid-28-47ed54e5d312f899507d28d6e95ccc18a0de19fe.tar.gz
Import Android SDK Platform P [4413397]
/google/data/ro/projects/android/fetch_artifact \ --bid 4413397 \ --target sdk_phone_armv7-win_sdk \ sdk-repo-linux-sources-4413397.zip AndroidVersion.ApiLevel has been modified to appear as 28 Change-Id: I3cf1f7c36e61c090dcc7de7bcfa812ef2bf96c00
Diffstat (limited to 'android/view/inputmethod/InputMethod.java')
-rw-r--r--android/view/inputmethod/InputMethod.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/android/view/inputmethod/InputMethod.java b/android/view/inputmethod/InputMethod.java
index 0922422c..ab8886bb 100644
--- a/android/view/inputmethod/InputMethod.java
+++ b/android/view/inputmethod/InputMethod.java
@@ -16,6 +16,7 @@
package android.view.inputmethod;
+import android.annotation.MainThread;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SdkConstant;
@@ -90,8 +91,9 @@ public interface InputMethod {
* accept the first token given to you. Any after that may come from the
* client.
*/
+ @MainThread
public void attachToken(IBinder token);
-
+
/**
* Bind a new application environment in to the input method, so that it
* can later start and stop input processing.
@@ -104,6 +106,7 @@ public interface InputMethod {
* @see InputBinding
* @see #unbindInput()
*/
+ @MainThread
public void bindInput(InputBinding binding);
/**
@@ -114,6 +117,7 @@ public interface InputMethod {
* Typically this method is called when the application changes to be
* non-foreground.
*/
+ @MainThread
public void unbindInput();
/**
@@ -129,6 +133,7 @@ public interface InputMethod {
*
* @see EditorInfo
*/
+ @MainThread
public void startInput(InputConnection inputConnection, EditorInfo info);
/**
@@ -147,6 +152,7 @@ public interface InputMethod {
*
* @see EditorInfo
*/
+ @MainThread
public void restartInput(InputConnection inputConnection, EditorInfo attribute);
/**
@@ -177,6 +183,7 @@ public interface InputMethod {
* @see EditorInfo
* @hide
*/
+ @MainThread
default void dispatchStartInputWithToken(@Nullable InputConnection inputConnection,
@NonNull EditorInfo editorInfo, boolean restarting,
@NonNull IBinder startInputToken) {
@@ -195,6 +202,7 @@ public interface InputMethod {
*
* @param callback Interface that is called with the newly created session.
*/
+ @MainThread
public void createSession(SessionCallback callback);
/**
@@ -203,6 +211,7 @@ public interface InputMethod {
* @param session The {@link InputMethodSession} previously provided through
* SessionCallback.sessionCreated() that is to be changed.
*/
+ @MainThread
public void setSessionEnabled(InputMethodSession session, boolean enabled);
/**
@@ -214,6 +223,7 @@ public interface InputMethod {
* @param session The {@link InputMethodSession} previously provided through
* SessionCallback.sessionCreated() that is to be revoked.
*/
+ @MainThread
public void revokeSession(InputMethodSession session);
/**
@@ -244,6 +254,7 @@ public interface InputMethod {
* {@link InputMethodManager#RESULT_SHOWN InputMethodManager.RESULT_SHOWN}, or
* {@link InputMethodManager#RESULT_HIDDEN InputMethodManager.RESULT_HIDDEN}.
*/
+ @MainThread
public void showSoftInput(int flags, ResultReceiver resultReceiver);
/**
@@ -258,11 +269,13 @@ public interface InputMethod {
* {@link InputMethodManager#RESULT_SHOWN InputMethodManager.RESULT_SHOWN}, or
* {@link InputMethodManager#RESULT_HIDDEN InputMethodManager.RESULT_HIDDEN}.
*/
+ @MainThread
public void hideSoftInput(int flags, ResultReceiver resultReceiver);
/**
* Notify that the input method subtype is being changed in the same input method.
* @param subtype New subtype of the notified input method
*/
+ @MainThread
public void changeInputMethodSubtype(InputMethodSubtype subtype);
}