204 Commits

Author SHA1 Message Date
Satoshi Kataoka
7987a3172b Fix possible NPE
Bug: 8517083
Change-Id: Iea6bdcb0e39ee951b7f90f41cd3350bd1c7c5f71
2013-04-17 18:59:33 +09:00
Jeff Brown
1951ce86c2 Correctly manage the lifecycle of IME InputChannels.
InputChannels are normally duplicated when sent to a remote process
over Binder but this does not happen if the recipient is running within
the system server process.  This causes problems for KeyGuard because the
InputMethodManagerService may accidentally dispose the channel
that KeyGuard is using.

Fixed the lifecycle of InputChannels that are managed by the IME
framework.  We now return a duplicate of the channel to the application
and then take care to dispose of the duplicate when necessary.
In particular, InputBindResult disposes its InputChannel automatically
when returned through Binder (using PARCELABLE_WRITE_RETURN_VALUE).

Bug: 8493879
Change-Id: I08ec3d13268c76f3b56706b4523508bcefa3be79
2013-04-04 22:45:12 -07:00
Dianne Hackborn
bf20aa767e Merge "Keep track of who has disabled applications." into jb-mr2-dev 2013-03-27 23:32:36 +00:00
Dianne Hackborn
3fa3c28a35 Keep track of who has disabled applications.
Change-Id: I2640d3dc2200b589e2beb42a43cc93efd090f06e
2013-03-27 12:01:52 -07:00
Jeff Brown
c28867a1d6 Use input transport for communications between app and IME.
The input method manager service now supplies an input channel for
communication while creating an IME session on behalf of the
application.

This change significanly reduces the overhead of IME event dispatch
by using a standard input channel to send input events rather than
using binder.  This results in fewer thread context switches
and fewer object allocations.

What's more, the IME may perform additional batching of the motion
events that it receives which may help it catch up if it is
getting behind while processing them.

Bug: 7984576
Bug: 8473020
Change-Id: Ibe26311edd0060cdcae80194f1753482e635786f
2013-03-26 15:42:39 -07:00
Dianne Hackborn
119bbc378d Implement #8323587, #8323342, #8323590: new features.
8323587: Add feature for supporting app widgets
8323342: Add feature for replacing the home screen
8323590: Add feature for supporting input methods

The app widget service looks for the app widget feature
and refuses to work if it doesn't exist.  I didn't do
this for the input method service because some devices
will probably want to still make use of that mechanism
without supporting third party input methods.

Change-Id: Ie3b089105e104f4d767cdb03cdbe4fdb1c17382e
2013-03-22 17:27:25 -07:00
Michael Wright
52a5352626 Separate sessionCreated and finishedEvents callbacks
Bug: 8276952
Change-Id: If7051086c060fcce5d1e958ebbddec0784c851da
2013-03-21 17:47:40 -07:00
Craig Mautner
e4bbb1cc45 Catch BadTokenException and continue.
BadTokenException is a normal consequence of swapping IMEs while there
is a DO_SHOW_SOFT_INPUT message in the IIMethodWrapper queue. This
race condition cannot be avoided without an unacceptable lock down of
InputMethodManagerService.

Fixes bug 8387663.
Fixes bug 8263462.

Change-Id: I2c21573cf972145ab08e66604cdb9344139a3f31
2013-03-15 11:38:44 -07:00
Craig Mautner
ca0ac718cb Remove WindowManager messages from remote queue.
When a new IME is attached it is not enough to remove the
WindowManager messages from the local queue, but the ones in
the previous IME queue must also be removed.

Fixes bug 8263462.

Change-Id: I9e916c6052a83dc7691bcba0b6ab8328b9b7cc36
2013-03-14 09:43:02 -07:00
Craig Mautner
6efb4c746f Put debug back in for b/b8263462.
Previous CL did not fix.

Change-Id: Ief9e8f519480fa41248d53e5b0187c9657f00b79
2013-03-13 11:12:26 -07:00
Craig Mautner
274323ce8f Remove old show/hide messages on new ime (DO NOT MERGE)
The previous show/hide messages in the queue were still trying
to be honored even after a new ime was attached.

Fixes bug 8263462.

Change-Id: Iee60dbd1d58542f73aedeac5ccb54cddeb5d5dfe
2013-03-12 14:44:59 -07:00
Satoshi Kataoka
7f7535fd25 Fix an issue where voice input is not enabled by default for the secondary user
Bug: 8205725
Change-Id: I438daf996ba48cdb34f0a6158a0cbb510aae931b
2013-02-18 14:08:07 +09:00
Satoshi Kataoka
f1367b7e90 Do not turn on imes unexpectedly with unit tests
Bug: 7872918

Change-Id: Ie1d74c9fac27de140e7aa85f2eaefcb89aa06ea7
2013-01-28 19:25:55 +09:00
Dianne Hackborn
fd7adedebf Add new disabled state for "optional" built-in apps.
The disabled state allows you to make an app disabled
except for whatever parts of the system still want to
provide access to them and automatically enable them
if the user want to use it.

Currently the input method manager service is the only
part of the system that supports this, so you can put
an IME in this state and it will generally look disabled
but still be available in the IME list and once selected
switched to the enabled state.

Change-Id: I77f01c70610d82ce9070d4aabbadec8ae2cff2a3
2013-01-22 17:10:23 -08:00
Satoshi Kataoka
2d43bf6ba5 Merge "Ensure that the input method dialog is dismissed when changing the hardware keyboard state." 2013-01-18 07:03:32 +00:00
Satoshi Kataoka
04dd24d4ba Ensure that the input method dialog is dismissed when changing the hardware keyboard state.
Change-Id: I51882ecd2b1a12116f43afff7c23454164a6272b
2013-01-18 13:44:57 +09:00
Amith Yamasani
d4fe37bee7 Merge "Rename bindService to bindServiceAsUser to follow convention." 2013-01-16 23:26:30 +00:00
Amith Yamasani
27b89e6658 Rename bindService to bindServiceAsUser to follow convention.
This is for the multi-user version of bindService, not the original.

Change-Id: Ib2de35941196accf387b1a276a77e6f9af805ec0
2013-01-16 12:30:11 -08:00
Satoshi Kataoka
8e303cc5dd Refactor utilities for InputMethodManagerSerivce that we want to share with the Settings application
Bug: 7872918

Change-Id: I0bc9954f163a3ec38d08b9ba842a8a31176eb6a6
2013-01-15 12:52:47 +09:00
Satoshi Kataoka
9062fd8d55 am 50fc82fd: am 30b074fc: am 2495d08a: am 5327322a: Merge "Revert "Fix a bug where disabled auxilialy IME is unexpectedly re-enabled"" into jb-mr1.1-dev
* commit '50fc82fdf025bc1fee8f0eb50fa88e4591c8daae':
  Revert "Fix a bug where disabled auxilialy IME is unexpectedly re-enabled"
2013-01-11 10:54:31 -08:00
Satoshi Kataoka
30b074fcbf am 2495d08a: am 5327322a: Merge "Revert "Fix a bug where disabled auxilialy IME is unexpectedly re-enabled"" into jb-mr1.1-dev
* commit '2495d08a5c06556deb7c3993add337037b8b492e':
  Revert "Fix a bug where disabled auxilialy IME is unexpectedly re-enabled"
2013-01-10 18:17:35 -08:00
Satoshi Kataoka
9d08143fa7 Revert "Fix a bug where disabled auxilialy IME is unexpectedly re-enabled"
This reverts commit 32b812054cce27d1c70b53ba8ac729c7186b105e

Bug: 7976890

Change-Id: I75ab60734153719b199cf7281d23f5eb1ad2d1bc
2013-01-10 17:42:56 +09:00
satok
52ed1fdf10 am 5ce02267: am 7ad7b2c4: am 32b81205: Fix a bug where disabled auxilialy IME is unexpectedly re-enabled
* commit '5ce0226708ec75b8636d062ae89aeb410c06659c':
  Fix a bug where disabled auxilialy IME is unexpectedly re-enabled
2012-12-19 10:27:42 -08:00
satok
7ad7b2c437 am 32b81205: Fix a bug where disabled auxilialy IME is unexpectedly re-enabled
* commit '32b812054cce27d1c70b53ba8ac729c7186b105e':
  Fix a bug where disabled auxilialy IME is unexpectedly re-enabled
2012-12-19 10:23:04 -08:00
satok
32b812054c Fix a bug where disabled auxilialy IME is unexpectedly re-enabled
Bug: 7872918

This is a serious issue which the disabled system auxilialy IME is unexpectedly re-enabled by re-building internal IMI cache.

Change-Id: I0727cc973dfaea9823194021ce94af8665b98373
2012-12-19 21:06:57 +09:00
Mita Yun
d44280e288 resolved conflicts for merge of ebcbfb3f to master
Change-Id: I0658dd4a1418fbad91d9663e5b52418a979dc683
2012-12-10 16:50:22 -08:00
Mita Yun
ed218c706d Use asynchronous messages for input method events.
Improves the throughput of IME event handling by ensuring that
input events do not get serialized behind UI traversal and
drawing messages such as when the UI is animating.

Added support for creating an asynchronous Handler as part of a
HandlerCaller.  It turns out we should be using an asynchronous
Handler not only in IME dispatch but also in accessibility and
wallpaper events where HandlerCaller is used.  So fixed those
services to also use an asynchronous Handler.

Change-Id: I0b19140c9d5ca6ee300c1a150c48312fd55ed8eb
2012-12-06 18:11:32 -08:00
satok
fb21aa84a8 am 8ec9f8f0: am dc5b21a5: am 487f8e93: Merge "Fix an issue on installing 3rd-party IME by a non-primary user" into jb-mr1.1-dev
* commit '8ec9f8f074ea35cad6e6a75a87e4bde947f12ea1':
  Fix an issue on installing 3rd-party IME by a non-primary user
2012-12-05 12:28:17 -08:00
satok
81f8b7c667 Fix an issue on installing 3rd-party IME by a non-primary user
Bug: 7573552

Currently IMMS doesn't receive install/uninstall messages. Accordingly enabled IMEs' list is not refreshed properly.

Change-Id: I25e9798a65f528dd270cd6bb1f14b1d887194787
2012-12-04 21:16:59 +09:00
Satoshi Kataoka
48d3111ef1 am c86ae7cf: am 1c37b800: am 1af08411: Merge "Hide current soft input when a background user gains window focus." into jb-mr1.1-dev
* commit 'c86ae7cf318f6c9d8cf581447e8897fbc1245ef3':
  Hide current soft input when a background user gains window focus.
2012-11-27 17:34:02 -08:00
Satoshi Kataoka
1af0841137 Merge "Hide current soft input when a background user gains window focus." into jb-mr1.1-dev 2012-11-26 19:39:20 -08:00
John Spurlock
e02b31f77b am 4e3520a8: am ce393d33: am 3f64edec: Merge "Fix IME down caret in keyguard nav bar bug." into jb-mr1.1-dev
* commit '4e3520a8d441dd2c1cb446f6f9a28b43d07238c9':
  Fix IME down caret in keyguard nav bar bug.
2012-11-21 06:52:40 -08:00
John Spurlock
bc7b6fc2a4 Fix IME down caret in keyguard nav bar bug.
The input method manager service now keeps track of whether or not
the ime was shown on the keyguard.  This prevents activities behind
the keyguard from incorrectly showing the down-caret in the keyguard.

Bug:7498792
Change-Id: I0de01ec29cb544e902305b0f9d9fb94a73835e7b
2012-11-20 14:06:56 -05:00
Satoshi Kataoka
8d03305b57 Hide current soft input when a background user gains window focus.
Bug: 7507226
Change-Id: If58f68469e21eaaba8536c4b54b3aa8cf8c08eb5
2012-11-20 11:12:07 +09:00
Satoshi Kataoka
1ee199a4c6 am 9371747e: am 0e1c092a: am 2656abe0: Merge "Fix an inconsistent state with IMMS and Settings when the hard keyboard is connected" into jb-mr1.1-dev
* commit '9371747e752236727be58149a8d04248860c134f':
  Fix an inconsistent state with IMMS and Settings when the hard keyboard is connected
2012-11-17 22:01:57 -08:00
Satoshi Kataoka
15451bd7af Fix an inconsistent state with IMMS and Settings when the hard keyboard is connected
Bug: 7540140
Change-Id: Iaac951ff457c35751b442e84ac07f1f86be93494
2012-11-16 13:30:56 +09:00
Satoshi Kataoka
d214296f7f Fix an issue on LED in IME switcher
Bug: 5282186
Change-Id: I66362aefb319a02ca741e40a50b8b345a89c8726
2012-11-12 18:43:06 +09:00
Dianne Hackborn
2ea9bae712 Fix issue #7457380: IME leaves a mark after user switching
The gnarly stuff where we keep track of the old input method
window as if it was still there was sitting around leaving things
in a stuck state.  Now we clear this out at key points in the
window manager (freezing screen, user change), and the input
method manager service is less aggressive about asking the window
manager to do it.

Also fixed a problem that was causing flickers during some
wallpaper transitions -- when we are animating two things on
top of the wallpaper and one of them disappears, we need to
make sure the wallpaper target points to whatever the current
target should be (if any), not left pointing to the old target
that has gone away.

Change-Id: I2fb9600f569a5bd5e3528aaf24cde9340af56cb0
2012-11-02 18:56:01 -07:00
Amith Yamasani
f043de93eb Fix a crash in InputMethodManagerService due to permission failure.
Clear calling identity before sending broadcast to the current user.

Bug: 7403829
Change-Id: If2b27d07d917b892470163e1303883b29a86c0e4
2012-10-24 06:45:12 -07:00
Amith Yamasani
cd75706117 System server should always send broadcasts to a specific or all users
Bug: 7368245

Log a warning if the system process calls unqualified sendBroadcast()
and other calls.

As a result of the logging above, found a few more method calls such as
bindService() that would benefit from being more explicit to avoid
future confusion and reduce the log warnings.

Change-Id: I17f15c8be9adf7becd456d6abbab606f19befdbf
2012-10-22 12:38:53 -07:00
Satoshi Kataoka
c86884cd83 Fix an issue on showInputMethodPickerFromClient
Bug: 7302748
Change-Id: Iff4345d26b3d6e4bfedf893bbd6a864c771df01d
2012-10-09 15:20:29 +09:00
Satoshi Kataoka
3ba439d648 Fix the issue on the input method switch picker
Bug: 7292731
Change-Id: I8cb51dd01e4c467fff511d4ecee79426f9b2ed80
2012-10-05 19:01:06 +09:00
Satoshi Kataoka
3573950e0b Close the current input method when attached view doesn't have a handler
Bug: 7187452
Change-Id: Iba4f7ac89f5806e871aaeb97f366935b83b95a5a
2012-10-03 12:07:23 +09:00
Satoshi Kataoka
135e5fb712 Always accept API calls from processes which have INTERACT_ACROSS_USERS_FULL in InputMethodManagerService
Bug: 6931482
Change-Id: I1620413578b9e8da6564664219f65bdc00d5ecfd
2012-10-01 16:18:05 +09:00
Satoshi Kataoka
d08a9238db Fix ime swtich issue
Bug: 7250097
Change-Id: Ibe85aaf7d60e7c3a27363eece528d19a0c8ddca2
2012-09-28 16:19:59 +09:00
Satoshi Kataoka
5ade83ba12 Treat additional inputmethod subtypes per user
Bug: 6931482
Change-Id: I4f7c7e69a80534da3a48ac508ff7a9e7511f33ce
2012-09-27 19:00:44 +09:00
Satoshi Kataoka
4e1ab15b30 Enable multi-user function for IMF
Bug: 6931482

Change-Id: Ib23849d352db33f0747aa9d5a178f00ac726c13b
2012-09-26 19:22:04 +09:00
Satoshi Kataoka
e62e6d8731 Add subtypeId for keeping enabled "InputMethodSubtype"s even if subtype parameters are changed
Bug: 6752230
Change-Id: I3a2d512e395fe8645edf6ab82108948b927c629a
2012-09-04 15:29:03 +09:00
Svetoslav Ganov
758143ecfe Window position not reported if the window is not moved.
1.If a window is shown but never moved the window window
  is never notified for its current location. Therefore,
  accessibility nodes do not contain correct bounds in
  screen coordinates.

bug:6926295

Change-Id: I7df18b095d33ecafffced75aba9e4f4693b0c393
2012-08-06 23:49:38 -07:00
Dianne Hackborn
39606a007a Make AtomicFile a public API. It's about time!
Change-Id: Ib34e294747405b7ab709cb0bbb2d9a0cc80ce86a
2012-07-31 17:54:52 -07:00