diff options
| author | Yohei Yukawa <yukawa@google.com> | 2016-06-27 20:30:49 +0000 |
|---|---|---|
| committer | android-build-merger <android-build-merger@google.com> | 2016-06-27 20:30:49 +0000 |
| commit | badcecb2aaa996828af02cc1a0e01f869df12a2d (patch) | |
| tree | 3ced7a8872fc1c4514c8e2f29358bccaa184ef75 /core/java/android/inputmethodservice/AbstractInputMethodService.java | |
| parent | 33ffd531bdd13ade7bfe4cf37d05131089ee0213 (diff) | |
| parent | cb56978912772a8e3d741b643ad1e491c97af22f (diff) | |
Merge \"Use a flag to grant a temporary URI permission.\" into nyc-mr1-dev
am: cb56978912
Change-Id: I20e1481c6f68a5af4f33e699f5bc505b3a4c1457
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; + } + } |
