diff options
| author | 2022-11-02 11:12:08 +0800 | |
|---|---|---|
| committer | 2022-11-02 11:29:58 +0800 | |
| commit | 53df6b0874ab0acd2a71a86dc5f08d2f80ea8cfa (patch) | |
| tree | b05d0331f7d5ae0dc311581c7239930988e2cc1d | |
| parent | 8d9267ff01f24956e5ecb4b672c02910a265276f (diff) | |
Refine InputMethodService java doc
Add more description to discourage IME developers
not use deprecated onCreateInputMethodInterface and
onCreateInputMethodSessionInterface.
Also move paragraph tag since Block tags should be
put after the main documentation.
Bug: 254278652
Test: presubmit
Change-Id: I729fbe2e1544fc72580a08ccb763ab69c58af92d
| -rw-r--r-- | core/java/android/inputmethodservice/InputMethodService.java | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java index 39d362b17d97..cea46f3363c4 100644 --- a/core/java/android/inputmethodservice/InputMethodService.java +++ b/core/java/android/inputmethodservice/InputMethodService.java @@ -1774,16 +1774,13 @@ public class InputMethodService extends AbstractInputMethodService { } /** - * Implement to return our standard {@link InputMethodImpl}. Subclasses - * can override to provide their own customized version. + * Implement to return our standard {@link InputMethodImpl}. * - * @deprecated IME developers don't need to override this method to get callbacks information. - * Most methods in {@link InputMethodImpl} have corresponding callbacks. - * Use {@link InputMethodService#onBindInput()}, {@link InputMethodService#onUnbindInput()}, - * {@link InputMethodService#onWindowShown()}, {@link InputMethodService#onWindowHidden()}, etc. - * - * <p>Starting from Android U and later, override this method won't guarantee that IME works - * as previous platform behavior.</p> + * @deprecated Overriding or calling this method is strongly discouraged. A future version of + * Android will remove the ability to use this method. Use the callbacks on + * {@link InputMethodService} as {@link InputMethodService#onBindInput()}, + * {@link InputMethodService#onUnbindInput()}, {@link InputMethodService#onWindowShown()}, + * {@link InputMethodService#onWindowHidden()}, etc. */ @Deprecated @Override @@ -1792,18 +1789,17 @@ public class InputMethodService extends AbstractInputMethodService { } /** - * Implement to return our standard {@link InputMethodSessionImpl}. Subclasses - * can override to provide their own customized version. + * Implement to return our standard {@link InputMethodSessionImpl}. + * + * <p>IMEs targeting on Android U and above cannot override this method, or an + * {@link LinkageError} would be thrown.</p> * - * @deprecated IME developers don't need to override this method to get callbacks information. + * @deprecated Overriding or calling this method is strongly discouraged. * Most methods in {@link InputMethodSessionImpl} have corresponding callbacks. * Use {@link InputMethodService#onFinishInput()}, * {@link InputMethodService#onDisplayCompletions(CompletionInfo[])}, * {@link InputMethodService#onUpdateExtractedText(int, ExtractedText)}, * {@link InputMethodService#onUpdateSelection(int, int, int, int, int, int)} instead. - * - * <p>IMEs targeting on Android U and above cannot override this method, or an - * {@link LinkageError} would be thrown.</p> */ @Deprecated @Override |