diff options
Diffstat (limited to 'core/java/android/inputmethodservice/AbstractInputMethodService.java')
| -rw-r--r-- | core/java/android/inputmethodservice/AbstractInputMethodService.java | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/core/java/android/inputmethodservice/AbstractInputMethodService.java b/core/java/android/inputmethodservice/AbstractInputMethodService.java index 3531926d347c..29177b6b47cf 100644 --- a/core/java/android/inputmethodservice/AbstractInputMethodService.java +++ b/core/java/android/inputmethodservice/AbstractInputMethodService.java @@ -16,11 +16,14 @@ package android.inputmethodservice; +import android.annotation.NonNull; import android.app.Service; import android.content.Intent; import android.os.IBinder; import android.view.KeyEvent; import android.view.MotionEvent; +import android.view.inputmethod.InputConnection; +import android.view.inputmethod.InputContentInfo; import android.view.inputmethod.InputMethod; import android.view.inputmethod.InputMethodSession; @@ -208,7 +211,7 @@ public abstract class AbstractInputMethodService extends Service * * @param event The motion event being received. * @return True if the event was handled in this function, false otherwise. - * @see View#onTrackballEvent + * @see android.view.View#onTrackballEvent(MotionEvent) */ public boolean onTrackballEvent(MotionEvent event) { return false; @@ -219,9 +222,30 @@ public abstract class AbstractInputMethodService extends Service * * @param event The motion event being received. * @return True if the event was handled in this function, false otherwise. - * @see View#onGenericMotionEvent + * @see android.view.View#onGenericMotionEvent(MotionEvent) */ public boolean onGenericMotionEvent(MotionEvent event) { return false; } + + /** + * Allow the receiver of {@link InputContentInfo} to obtain a temporary read-only access + * permission to the content. + * + * <p>Default implementation does nothing.</p> + * + * @param inputContentInfo Content to be temporarily exposed from the input method to the + * application. + * This cannot be {@code null}. + * @param inputConnection {@link InputConnection} with which + * {@link InputConnection#commitContent(InputContentInfo, int, android.os.Bundle)} will be + * called. + * @return {@code false} if we cannot allow a temporary access permission. + * @hide + */ + public void exposeContent(@NonNull InputContentInfo inputContentInfo, + @NonNull InputConnection inputConnection) { + return; + } + } |
