History log of /frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
7663d80f6b6fd6ca7a736c3802013a09c0abdeb9 24-Feb-2012 Dianne Hackborn <hackbod@google.com> Fix issue #6048808: sometimes auto-correct is inactive

My previous change to speed up the time the IME is dismissed was
fundamentally flawed. That change basically switched the order
the application called the input method manager service from doing
startInput() and then windowGainedFocus(), to first windowGainedFocus()
and then startInput().

The problem is that the service relies on startInput() being done
first, since this is the mechanism to set up the new input focus,
and windowGainedFocus() is just updating the IME visibility state
after that is done. However, by doing the startInput() first, that
means in the case where we are going to hide the IME we must first
wait for the IME to re-initialize editing on whatever input has
focus in the new window.

To address this, the change here tries to find a half-way point
between the two. We now do startInput() after windowGainedFocus()
only when this will result in the window being hidden.

It is not as easy as that, though, because these are calls on to
the system service from the application. So being able to do that
meant a fair amount of re-arranging of this part of the protocol
with the service. Now windowGainedFocus() is called with all of
the information also needed for startInput(), and takes care of
performing both operations. The client-side code is correspondingly
rearranged so that the guts of it where startInput() is called can
instead call the windowGainedFocus() entry if appropriate.

So... in theory this is safer than the previous change, since it
should not be impacting the behavior as much. In practice, however,
we are touching and re-arranging a lot more code, and "should" is
not a promise.

Change-Id: Icb58bef75ef4bf9979f3e2ba88cea20db2e2c3fb
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
06a591cdd6d90600db006906d5d1524d156d6529 16-Feb-2012 Dianne Hackborn <hackbod@google.com> Fix last change -- don't call startInputInner() with lock held.

Change-Id: Ie7a145c5a07f08ae8a3f5954a1c389bfbd946b69
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
a82ba54b0bbc3ff41f29db3998806cb45b261d58 16-Feb-2012 Dianne Hackborn <hackbod@google.com> Part of fixing issue #6006757: Keyboard dismissal lags

This adjust various paths through InputMethodManager so that the flow
in switching focus from one application to another is cleaner, resulting
in less work being done, resulting in it being able to happen quicker.

Some of the changes here avoid doing stuff when not needed, such as when
we are told to unbind but are not currently the active input. A big part
is also a change to the flow when a window receives input. Previously
this would first do a checkFocus() which would tell the input method to
switch focus to whatever view has focus in the window, followed by the
windowGainedFocus() call telling it the window had gained focus. This
would result in extra work because the input method service would first
handle the focus switch, seeing the IME is currently displayed, so the IME
would remain up and reset its focus to the new view. The app would
immediately then tell it about the window, causing the service to find out
the IME should be hidden and telling the IME, but the IME couldn't hide
itself until it had first take care of switching its input.

There is the definite potential of this breaking IME showing/hiding in
cases depending on the order things may be relying on them to happen. I
haven't seen any problems with a brief trip through the UI.

Change-Id: I8494cbd6e19e2ab6db03f2463d9906680dda058b
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
de9dbb05ce57a1617efc131f6a724c2a2b164bf7 20-Oct-2011 Jean Chalard <jchalard@google.com> Fix a warning from the binder, step 2.

This patch fixes the following warning:
W/Binder: The following Binder class should be static or
leaks might occur: android.view.inputmethod
.InputMethodManager.ControlledInputConnectionWrapper

...in hope of removing a possible memory leaks.

Change-Id: I081d10fd839f2985d7081492f4f5cf0b4da42fd2
Bugs: 5481376, 5461066
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
ee5e77cafec2eae70890abdcc1646ed39b06eddd 02-Sep-2011 satok <satok@google.com> Make setAdditionalInputMethodSubtypes async

Bug: 5120261
Change-Id: Ic7869cfaa5361531e08d58d7dfa5ba0feab0613e
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
75917b603fe83a87c0fe3902e1a768fc31f8d120 31-Aug-2011 satok <satok@google.com> Add a comment for setAdditionalInputMethodSubtypes

Change-Id: I3a19471b80a6f8a68473cba6f0fc934bd052af10
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
4273ed652ae9ea2af0a77b6d59a183ebce53a680 19-Jul-2011 satok <satok@google.com> Merge "Enable IMEs to set additional subtypes in background"
6dd005b48138708762bfade0081d031a2a4a3822 18-Jul-2011 Dianne Hackborn <hackbod@google.com> I. Can. Not. Stand. ViewAncestor.

It was done so we would have the name "ViewRoot" available for a
public API. However, the name "ViewAncestor" just makes no sense.
So instead, change it to ViewRootImpl.

Change-Id: If9599ca67896f339f6fefa7d1dde121201171d97
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
91e88122cf28a48fd2e2260da7d3d87dd437227a 18-Jul-2011 satok <satok@google.com> Enable IMEs to set additional subtypes in background

Bug: 4591792

Change-Id: I7e61a576c56d1a3a56001bdf2fd51ad3801add01
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
863fcd62171e55bc9f2105d9fb5877df982454d8 21-Jun-2011 satok <satok@google.com> Add onClickView to InputMethodService

Bug: 4697141

- onClickView is called everytime the user taps EditText

Change-Id: Ia71ad325e50a20e9e1001def662ef992bb50a9d0
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
e7c6998e0a953ae55487d4fe122739646f9280aa 03-Jun-2011 satok <satok@google.com> API to set additional subtypes

Bug: 4321667

- Due to the voice team's strong request

Change-Id: Ia8bbc277c0987bde996e6f65541877cec96a3ca1
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
560bcb34fad8bfe642d9ab6f38d973185d253af5 02-Jun-2011 satok <satok@google.com> Update internal states stored in InputMethodManager properly

Bug: 4517456

"startInputInner" in InputMethodManager.java will call "startInput" in InputMethodManagerService.java
In startInputLocked in IMMS, mCurSeq (Bind sequence) is incremented, but if mCurMethod stored in
InputMethodManager.java is not null, mBindSequence in InputMethodManager.java will not be updated
to the incremented sequence.

Hence, after this procedure, unbinding IME will be cancelled by the mismatch of the bind sequence.

This situation happens when user changes the focused text view.
If I remember correctly, some behaviors of showing or hiding IME at switching text view were changed.
And I think this bug appeared because of that change.

Change-Id: Icec380f3ca05cf798cc4b82155d0cecf178633a5
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
f9f01008624e2d28c15a90d942fa36f98c8c967d 19-May-2011 satok <satok@google.com> Add Apis to send notifications when the suggestion was picked

- Due to a strong request from VoiceIME

Bug: 4443922

Change-Id: Ia539de0acf66053e0349daec459d75e36805f6bf
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
c6cc0f8c19d9eccf408a443fa2bf668af261dcd0 12-Apr-2011 Joe Onorato <joeo@google.com> Rename ViewRoot to ViewAncestor.

ViewRoot is about to be a new public class for poking at ViewAncestor.

Change-Id: Ie95d707c6d8bbb48f78d093d7b2667851812a7d5
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
d4fce2b7f1a861590ce84afcf2f569189251bc59 10-Apr-2011 satok <satok@google.com> Add comments for APIs of InputMethodManager added to Honeycomb

Change-Id: I89501889c612aaeca503d0c11f14e23c67a0ca39
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
68f1b78b7b9139a0e34285ff641a664e664a14b8 11-Apr-2011 satok <satok@google.com> Add an API to get the last used input method subtype

Bug: 4075039

- Voice input requires to know the last used input method subtype.

Change-Id: I603a4fb88a2af5195e52188adfa6585ad80304fa
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
ad8484b3799ba7046e57388e34ba9a4c0a971b42 18-Feb-2011 Gilles Debunne <debunne@google.com> Cursor does not jump back to its previous position when IME is showed up.

Bug 3441308

This behavior may be restored for phones if appropriate.

Change-Id: Ibc2de587d64d372521da2d54f239cab56f04b407
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
857fd9b8562c29913e03ed29288bd1802d37dc60 28-Jan-2011 Joe Onorato <joeo@google.com> Plumb whether an input view is actually visible or not through from the IME
to the status bar.

Bug: 3391067
Change-Id: I049531155bf7ee0b29874916c0b5b0a45b73c09e
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
7c8c6d689280ecfbd151a2e0cb40341768470676 24-Jan-2011 Gilles Debunne <debunne@google.com> Typo in InputMethodManager's documentation

Change-Id: I711e6d24462e336546b789fac0b9c6f529ebe260
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
8cbb4c6e30cff706a243599634aeb8fd9a818d92 24-Jan-2011 Gilles Debunne <debunne@google.com> NULL inputType text fields should never show the IME.

Bug 3381317

Changes made in https://android-git.corp.google.com/g/#change,91880
displayed the IME onFocus. However, the test was not consistent to what
is done in touch event. textIsEditable is now checked too.

Change-Id: If11382c1c90a557839b87d62494253470c42b621
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
16331c8a1d33defccc5cbb18694def79196c921b 20-Dec-2010 satok <satok@google.com> Add a parameter to InputMethodManagerService.getEnabledSubtype for allowing to select subtypes implicitly if no subtype is enabled.

Bug: 3142286

Change-Id: I92d019d0648c552e6d7695c3530aa81ae054d702
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
440aab54cab106030f1edafea4dec1f9d8624f9b 25-Nov-2010 satok <satok@google.com> Removed InputMethodSubtypePicker

Change-Id: I08abac5d65a30c02cc671f4f70e93df25b6c8a92
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
2820351489537698ad153c6397edf3270455edc5 24-Nov-2010 satok <satok@google.com> Add an API to set InputMethodAndSubtype

Change-Id: I66f1a4c8e0d98705614f12a737e7efcd0263b72a
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
f3db1af8d55ab247b6db67baf4fe772c18f33cab 23-Nov-2010 satok <satok@google.com> Change return type of getShortcutInputMethodsAndSubtypes to Map<InputMethodInfo, List<InputMethodSubtype>>

bug: 3201828

- Brushed up the code

Change-Id: I11ad9d1d749bd8947144ca7f1676bab3cf777fd6
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
4e4569dab5c75804b01a19b2d6e6101b445c1c68 19-Nov-2010 satok <satok@google.com> Add an API to get shortcut IMEs

- If there are no selected shortcut IMEs, the most applicable voice input will be selected as a shortcut IME

Change-Id: Ibd0f7ef5101013569c303820a3adc9038a97356d
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
67ddf9cbd5d7133c7f443cd3c55841ed1109c3a0 17-Nov-2010 satok <satok@google.com> Add a function to get enabledInputMethodAndSubtype

Change-Id: Ie97635343249aa63e33028c2843cab103125ca92
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
b66d287e3003a0934d5714fbf15e554b3c814906 09-Nov-2010 satok <satok@google.com> Add a setter of InputMethodSubtype to InputMethodManager

- Public API: void setCurrentInputMethodSubtype(int pos)

Change-Id: I55daa19ba924999def544bf841f00bf54852f3e1
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
735cf38b8c7f8f91ad087511e44fe79018fa61d6 11-Nov-2010 satok <satok@google.com> Add a function to switch back to the last used IME

Change-Id: Iac7bcc2ee16dd04d91a3e75b160622d246788c9a
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
06487a58be22b100daf3f950b9a1d25c3ea42aa2 29-Oct-2010 satok <satok@google.com> Add a functionarity for showing / hiding IME button on the system bar

Bug: 3077030

- IME communicates with status bar directly.

Change-Id: Ic5b6b5b7a2b8ea62372dcc9b9c36d81b9f2db651
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
04d50204705c9da52b218f11972da4e7d7a9cb84 25-Oct-2010 satok <satok@google.com> Show Subtype Icon properly in the system status bar

- Added API for getting the current subtype
- Added functions for show/hide status icon

Change-Id: Ifcaad00f7f4c658cdb3af367387476bbf316eb19
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
47a44916e2fb33cf4751906386d5f5c903b28d8b 06-Oct-2010 satok <satok@google.com> Add InputMethodEnabler for enabling input methods and subtypes

- Copyed functionarity from LanguageSettings.java

TODO: Save enabled InputMethodSubtypes

Change-Id: I7b4fb1a79cb8b3229f88773d261430e23ba7aae2
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
ab751aa085433e9f735d2e7603459c6c7e9d2fb0 14-Sep-2010 satok <satok@google.com> Add methods for managing subtypes

- added showInputMethodSubtypePicker to public API
-- show the selector dialog for subtypes
- added getter, setter and event handler to InputMethodManagerService
- extract InputMethodSubtype to the top level class for using it in aidl
- TODO: make an enabler for input method subtypes
- TODO: handle the event of changing an input method subtype in LatinIME

Change-Id: I49f8c6675ac4b06511635d14a37bd398738eff33
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
d4723bb415dc70008c744d1027c3e3d9473adfe1 03-Sep-2010 Gilles Debunne <debunne@google.com> Revert "Merge "InputMethodManager showSoftInput return documentation." into gingerbread"

This reverts commit 26d708d93624d2d060529b7e33e0a20172e85efd, reversing
changes made to 3ac85d31de6cab5a468b7728b3340cf1b57bc8fe.

Change-Id: Ifc19f837bee7437707ddddf0b19cb6bce53dd2c5
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
a18cf547317d3602b5476ee4b9e206fe4c12d7b5 01-Sep-2010 Gilles Debunne <debunne@google.com> InputMethodManager showSoftInput return documentation.

Change-Id: I12b1fe6d224e1b44377fb9152a33a818b1974925
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
4c62fc0e1e5ea9c69a12a7d1cf8b3ec8b2d114a3 09-Aug-2009 Dianne Hackborn <hackbod@google.com> Very primitive wallpapers in a surface.

This is all of the basic pieces:

- The WallpaperService now creates a surface with the window manager for its
contents.
- There is a simple service that displays a bitmap.
- The wallpaper manager takes care of starting and stopping the service.
- The window manager knows about wallpaper windows and how to layer them with
the windows that want to be shown on top of wallpaper.

Lots and lots of issues remain, but at this point you can actually write a
wallpaper service, select it in the UI, and see it behind an activity.
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
4eba271a64b98a5fc38227f40190b879f807acf5 25-Mar-2009 Dianne Hackborn <> Automated import from //branches/master/...@141043,141043
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
51bf077883df4f5cc816fbfec6d19eedffc26d70 25-Mar-2009 Dianne Hackborn <> Automated import from //branches/master/...@141004,141004
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
c39a6e0c51e182338deb8b63d07933b585134929 11-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@137873
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
b2a3dd88a53cc8c6d19f6dc8ec4f3d6c4abd9b54 09-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@137197
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
4df2423a947bcd3f024cc3d3a1a315a8dc428598 05-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@136594
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
076357b8567458d4b6dfdcf839ef751634cd2bfb 03-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@132589
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
3dec7d563a2f3e1eb967ce2054a00b6620e3558c 03-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@137055
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
3001a035439d8134a7d70d796376d1dfbff3cdcd 19-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@132276
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
da996f390e17e16f2dfa60e972e7ebc4f868f37e 13-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@131421
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
d24b8183b93e781080b2c16c487e60d51c12da31 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
f1e484acb594a726fb57ad0ae4cfe902c7f35858 22-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@127436
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
22f7dfd23490a3de2f21ff96949ba47003aac8f8 20-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@127101
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
9266c558bf1d21ff647525ff99f7dadbca417309 16-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@126645
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
b798689749c64baba81f02e10cf2157c747d6b46 10-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@125939
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java
f013e1afd1e68af5e3b868c26a653bbfb39538f8 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java