4397591f3da2aa03a22eeca308a78e1027505228 |
|
03-Mar-2018 |
Yohei Yukawa <yukawa@google.com> |
Revert "Introduce InputConnection#reportLanguageHint()" This reverts commit e77386e8fbe01b7fbf1a04555d4088796d862f03 [1]. Reason for revert: The protocol is not yet ready to be exposed and we are still unsure what is the best approach. [1]: Ie86edafd1ed68b58f702116f561fc448fdbb57a8 Bug: 7031513 Bug: 72522601 Fix: 74087970 Test: atest CtsInputMethodTestCases Change-Id: Ia61dc9b3d5b116199382994430fb16ee804942b3
/frameworks/base/core/java/com/android/internal/view/IInputContext.aidl
|
e77386e8fbe01b7fbf1a04555d4088796d862f03 |
|
23-Jan-2018 |
Yohei Yukawa <yukawa@google.com> |
Introduce InputConnection#reportLanguageHint() The goal of this CL is to introduce a way for IMEs to tell applications about what languages are likely to be used in the text to be committed, for IMEs that support dynamic language switching (especially without relying on InputMethodSubtype). It is already obvious that InputMethodSubtype is not working well for this use case. We need is a simple, easy, and back-portable way that can be widely accepted by the ecosystem. Bug: 7031513 Test: atest CtsInputMethodTestCases Change-Id: Ie86edafd1ed68b58f702116f561fc448fdbb57a8
/frameworks/base/core/java/com/android/internal/view/IInputContext.aidl
|
2bc66171cce4d5ae7bee2c3920e82e45a9d245af |
|
08-Feb-2017 |
Yohei Yukawa <yukawa@google.com> |
Eliminate out-of-sync IMM#mFullscreenMode error As explained in the commit message of my previous CL [1], we have had a design issue in how to notify the full-screen mode change from the IME to InputMethodManager running in the target application. Histrically we have done this by using hooking the following IPC from the IME to the target application. InputConnection#reportFullscreenMode() However, since we also want InputConnection to be deactivated in some situations such as the when the target application is no longer focused. In other words, InputConnection is not a reliable way to notify something. As a result, we have suffered from many stale state issues. Bug 21455064 and Bug 28157836 are such examples. In Android N, we introduced yet another hack to work around those issues, but it is really time to fix the protocol design instead. The new strategy is to rely on internal IPCs provided by InputMethodManager to deliver such critical notifications from one process to the other. This is actually more natural because our goal is to make sure that InputMethodManager#isFullscreenMode() always returns the latest value as long as the caller is the focused application. For backword compatibility, applications that are monitoring this callback should continue working, as InputMethodManager emulates the previous behavior. However, as updated in JavaDoc, IMEs are no longer allowed to invoke InputConnection#reportFullscreenMode(), which should be OK because even on previous releases IMEs should rely on InputMethodService#updateFullscreenMode() instead. [1]: Iba184245a01a3b340f006bc4e415d304de3c2696 1544def0facda69c210b0ae64b17394ea2860d39 Fixes: 28406127 Test: Make sure Bug 21455064 is still fixed. 1. Input some words in extract mode. 2. Select a word. 3. Perform copy. 4. Select a word. 5. Rotate the device. 6. Try to select a word. 7. Make sure he word is selected and action mode starts. Test: Make sure Bug 28157836 is still fixed. 1. Rotate device to landscape mode. 2. Tap on EditText and start full screen extracted mode. 3. Rotate device to portrait mode. 4. Long press to start action mode. 5. Make sure Action mode gets started. Test: `adb shell dumpsys input_method` to make sure that fullscreen state is synchronized across the app, IMMS, and the IME. Change-Id: If23e7c7c265ab3dfb48c2fb6fdb361b17d22c594
/frameworks/base/core/java/com/android/internal/view/IInputContext.aidl
|
45700fa135e83ed44e4b69ca60cf12960a5898d7 |
|
24-Jun-2016 |
Yohei Yukawa <yukawa@google.com> |
Use a flag to grant a temporary URI permission. It turns out that we can let the system to call InputMethodService#exposeContent(InputContentInfo, EditorInfo), which added in my previous CL [1], during the IME is calling InputConnection#commitContent() as follows. [IME] InputContentInfo contentInfo = new InputContentInfo( contentUri, new ClipDescription(description, new String[]{mimeType}), linkUrl); getCurrentInputConnection().commitContent( inputContentInfo, InputConnection.INPUT_CONTENT_GRANT_READ_URI_PERMISSION, null); [App] try { contentInfo.requestPermission(); // Load inputContentInfo.getContentUri() here. } finally { contentInfo.releasePermission(); } This gives us flexibility to let InputConnection#commitContent() do all the magic for IME developers like other APIs such as Context#startActivity(), rather than asking them to call one more API to grant a temporary URI permission like a scenario where Context#grantUriPermission() is used. [1]: I2772889ca01f2ecb2cdeed4e04a9319bdf7bc5a6 25e0813e6eb6315b1016db805fa9b791b4ae5cc2 Bug: 29450031 Change-Id: I99536cd58c9984af30b0bafb4a1dd25a26634a2d
/frameworks/base/core/java/com/android/internal/view/IInputContext.aidl
|
adebb52588b098a1af678d4e33a234ef1ce783b2 |
|
17-Jun-2016 |
Yohei Yukawa <yukawa@google.com> |
API Rename: IC#inputContent to IC#commitContent. As shown in below, we have already used commit* naming convention in InputConnection. - InputConnection#commitCompletion(CompletionInfo); - InputConnection#commitCorrection(CorrectionInfo); - InputConnection#commitText(CharSequence, int); Hence renaming IC#inputContent() to IC#commitContent() would make the new method more consistent. Bug: 29450024 Change-Id: Ica1ba3154795c1bf44e140dfe639b299f83cd8af
/frameworks/base/core/java/com/android/internal/view/IInputContext.aidl
|
152944f4909c47917473293b258d266435c6ab35 |
|
11-Jun-2016 |
Yohei Yukawa <yukawa@google.com> |
Add InputConnection#insertContent(). Providing an official protocol for IMEs to insert an image to the application is something that has been requested from many IME developers to Android OS. With this CL, IMEs are able to ask applications to insert a content including image files as follows. 1. An application that opts in to this protocol specifies a list of supported content MIME types in EditorInfo#contentMimeTypes. 2. When an IME is actively interacting with such an application, the IME can call InputConnection#insertContent() with a InputContentInfo that contains content URI, metadata (ClipDescription), and an optional link URI. 3. The application can read the stream data from the given content URI to insert the content into somewhere in the application. Detailed design background can be found in the JavaDoc of InputConnection#insertContent(). Bug: 22830793 Change-Id: Iaadf934a997ffcd6000a516cc3c1873db56e60ad
/frameworks/base/core/java/com/android/internal/view/IInputContext.aidl
|
c89e22a6ff227089fde26daea186346029d1b32c |
|
14-Jan-2016 |
Yohei Yukawa <yukawa@google.com> |
Introdude IC#deleteSurroundingTextInCodePoints(). This CL introduces a API variant of IC#deleteSurroundingText(), named IC#deleteSurroundingTextInCodePoints(). Major differences from the existing one are: - The lengths are supplied in code points rather than code units. - This API does nothing if there are one or more invalid surrogate pairs in the requested range. (Failure Atomicity) Note that due to the asynchronous nature of the input method architecture in Android, implementing the same logic in the input method side basically ends up with unreliable and unpredictable results. Bug: 6526420 Change-Id: I7f6a2c5d3d52079ae71623fd5e40d60c688dd5fb
/frameworks/base/core/java/com/android/internal/view/IInputContext.aidl
|
a277db28e990d1f6f74ace0c32fe92401660a840 |
|
22-Aug-2014 |
Yohei Yukawa <yukawa@google.com> |
Remove CursorAnchorInfoRequest and related stuff This CL removes CursorAnchorInfoRequest and related stuff in favor of InputConnection.requestUpdateCursorAnchorInfo, which is more easy to understand. This CL also deprecates InputMethodManager#updateCursor and related stuff. Rationale: 1. The spec of #updateCursor says that it provides the cursor position in local coordinates, while the input method requires it in the screen coordinates. 2. #updateCursor has never been enabled in AOSP, because InputMethodManager#isWatchingCursor always returned false. 3. There has been no way to let InputMethodManager#isWatchingCursor return true. 4. In L, InputMethodManager#updateCursorAnchorInfo is introduced to address all the issues above. Given that we no longer need to support #updateCursor, CursorAnchorInfoRequest is overkill when we need to convey just a couple of parameters. BUG: 17185263 BUG: 17182367 Change-Id: I4a577bfd02b37b9e56c80b8b41bb25afa95dd8ef
/frameworks/base/core/java/com/android/internal/view/IInputContext.aidl
|
0023d0e0c4f5339b299d1eacbd4e7181c2fd271f |
|
10-Jul-2014 |
Yohei Yukawa <yukawa@google.com> |
Polish new IME API for L part 2: CursorAnchorInfo This CL addresses feedbacks from internal customers for new input method APIs that are mainly used for physical keyboard support in L. For performance reasons, #onUpdateCursorAnchorInfo is not called back by default and each input method has to enable this event notification explicitly whenever fine-grained character locations are needed. In L-preview, InputMethodSession#setCursorAnchorMonitorMode was introduced for this purpose. However, we got several feedbacks to be addressed. - The effect of #setCursorAnchorMonitorMode is not preserved during focus change. IMEs need to call #setCursorAnchorMonitorMode every time when #onStartInput is called. This is tricky and hard to understand. - As #onUpdateCursorAnchorInfo is a new API, not all applications/text editors have supported it. Therefore IMEs can't always rely on it. However, there is no way to query if the attached target is supporting this new API or not. It would helpful for IME authors if we can provide a reliable way to query if the attached input target is supporting the new API or not. In order to address these issues, the triggering method has moved from InputMethodSession to InputConnection in this CL, as an analogy of existing InputConnection#getExtractedText API, which has provided similar functionality including optional reactive event callbacks from the application to the IME. BUG: 15812658 BUG: 16118603 Change-Id: I3c6b69bd9d79b199afe68d838f25effa6048e5cc
/frameworks/base/core/java/com/android/internal/view/IInputContext.aidl
|
e3797a15fbf769a0abcbe121cfd33b4b658aea1e |
|
21-Mar-2011 |
satok <satok@google.com> |
Removed APIs for setCorrectionSpan from InputConnection ("setCorrectionSpan" was added in Id3abc9ea4d11753cd ) Also.. - Added a class java doc for CorrectionSpan - Removed FLAG_DEFAULT - Changed the return type of getSuggestions from Array<CharSequence> to String[] Change-Id: If5eb091e307a7a40c5b4a70ec1fe6059ecd9fb2d
/frameworks/base/core/java/com/android/internal/view/IInputContext.aidl
|
adb435835fb9a5f2bb74d29930b239dde18504a7 |
|
09-Mar-2011 |
satok <satok@google.com> |
Add CorrectionSpan and APIs to pass a secure CorrectionSpan to TextView - CorrectionSpan is a span which has suggestions made by IME. This has a function to change the current IME to other IME specified in this span. For security reasons, only the current IME is allowed to use this function through InputConnection. (IME token is used for checking the validity of it.). - CorrectionSpan stores following information: flags, subtype Id, InputMethodInfo Id, suggests, locale, original string Change-Id: Id3abc9ea4d11753cdc4f483a2bb3128f49ba198a
/frameworks/base/core/java/com/android/internal/view/IInputContext.aidl
|
cf9cf2f40efc4ccf3f73e6fdb07725d9c00c4f91 |
|
09-Dec-2010 |
Gilles Debunne <debunne@google.com> |
New API in InputConnection to signal IME's text correction. Scafolding so that the IME team can start working on this feature. The animation part in the TextView is missing. Change-Id: I8225538564370fba1500e3539742a8ab79bdd199
/frameworks/base/core/java/com/android/internal/view/IInputContext.aidl
|
a90b7f0125389b9e1040d2be82aad4ef74ea6071 |
|
26-Aug-2010 |
Amith Yamasani <yamasani@google.com> |
Add methods to InputConnection: setComposingRegion() to select a region of text for correction, and getSelectedText() to return the selected text. setComposingRegion: The TextView may choose to highlight the text in some way (underline for now) to indicate that the text is selected for correction, if the IME wants to provider alternatives. Choosing an alternative in the IME can then call IC.commitText() to replace the highlighted (not selected) text with a different candidate. This change also ensures that any existing spans/styles are not wiped out. So we can now correct rich text as well. getSelectedText: This is a convenience to get the selected text instead of using extracted text that is more heavy weight. Existing getTextBeforeCursor() and getTextAfterCursor() fail to retrieve the selected text, only what's before and after the selection. Change-Id: Ieb5ecd5ff947ea04958589f501e7bd5228e00fb5
/frameworks/base/core/java/com/android/internal/view/IInputContext.aidl
|
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 |
|
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
/frameworks/base/core/java/com/android/internal/view/IInputContext.aidl
|
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 |
|
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
/frameworks/base/core/java/com/android/internal/view/IInputContext.aidl
|
076357b8567458d4b6dfdcf839ef751634cd2bfb |
|
03-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@132589
/frameworks/base/core/java/com/android/internal/view/IInputContext.aidl
|
3dec7d563a2f3e1eb967ce2054a00b6620e3558c |
|
03-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@137055
/frameworks/base/core/java/com/android/internal/view/IInputContext.aidl
|
da996f390e17e16f2dfa60e972e7ebc4f868f37e |
|
13-Feb-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //branches/cupcake/...@131421
/frameworks/base/core/java/com/android/internal/view/IInputContext.aidl
|
d24b8183b93e781080b2c16c487e60d51c12da31 |
|
11-Feb-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //branches/cupcake/...@130745
/frameworks/base/core/java/com/android/internal/view/IInputContext.aidl
|
f1e484acb594a726fb57ad0ae4cfe902c7f35858 |
|
22-Jan-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //branches/cupcake/...@127436
/frameworks/base/core/java/com/android/internal/view/IInputContext.aidl
|
b798689749c64baba81f02e10cf2157c747d6b46 |
|
10-Jan-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //branches/cupcake/...@125939
/frameworks/base/core/java/com/android/internal/view/IInputContext.aidl
|
f013e1afd1e68af5e3b868c26a653bbfb39538f8 |
|
18-Dec-2008 |
The Android Open Source Project <initial-contribution@android.com> |
Code drop from //branches/cupcake/...@124589
/frameworks/base/core/java/com/android/internal/view/IInputContext.aidl
|