summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/InputMethodManagerService.java
Commit message (Collapse)AuthorAgeFilesLines
* Move some system services to separate directoriesAmith Yamasani2013-12-191-3574/+0
| | | | | | | | Refactored the directory structure so that services can be optionally excluded. This is step 1. Will be followed by another change that makes it possible to remove services from the build. Change-Id: Ideacedfd34b5e213217ad3ff4ebb21c4a8e73f85
* Introduce a Lifecycle for system servicesAdam Lesinski2013-12-121-1/+1
| | | | | | | | | | | | | | | | | Provide an abstract class for system services to extend from, similar to the android.app.Service. This will allow services to receive events in a uniform way, and will allow services to be created and started in the correct order regardless of whether or not a particular service exists. Similar to android.app.Service, services are meant to implement Binder interfaces as inner classes. This prevents services from having incestuous access to each other and makes them use the public API. Change-Id: Iaacfee8d5f080a28d7cc606761f4624673ed390f
* Simplify IME policy and enforce in binder calls.John Spurlock2013-10-291-16/+17
| | | | | | | | | | | | | | | | | | Revert the overly complicated bc7b6fc2a4b701596a2c8eecc4aeef522abeeafa. Since setImeWindowStatus can be called externally, enforce similar keyguard policy so that this is not a backdoor for IMEs bound under the keyguard to drive IME visibility. Policy is simplified, we keep track of whether the keyguard is locked when the current IME switches. This fixes b/7498792 (activity under lockscreen drives IME visibility when lockscreen is rotated) and does not break b/11186297 (IME visible when BT keyboard is attached). Bug:7498792 Change-Id: Idd335cc8259c3532fa869449a9048b420f286e6d
* Decouple IME_ACTIVE and IME_VISIBLE for hardware keyboards.John Spurlock2013-10-231-2/+6
| | | | | | | | Reserve IME_VISIBLE for when software keyboards are actually showing. Bug:11186297 Change-Id: I4e09a7de353e564bd1a97dadd603d3104254fa56
* Fix issue #11005453: [SUW] G+ profile creation for new user brokenDianne Hackborn2013-10-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main problem here was a mistake when turning a single process structure to a multi-package-process structure with a common process. When we cloned the original process state, if there were any services already created for the process for that package, they would be left with their process pointer still referencing the original now common process instead of the package-specific process, allowing the active counts to get bad. Now we switch any of those processes over to the new package-specific process. There was also another smaller issue with how ServiceRecord is associated with a ServiceState -- we could be waiting for an old ServiceRecord to be destroyed while at the same time creating a new ServiceRecord for that same service class. These would share the same ServiceState, so when the old record finally finished destroying itself it would trample over whatever the new service is doing. This is fixed by changing the model to instead of using an "active" reference count, we have an object identifying the current owner of the ServiceState. Then when the old ServiceRecord is cleaning up, we know if it is still the owner at that point. Also some other small things along the way -- new Log.wtfStack() method that is convenient, new suite of Slog.wtf methods, fixed some services to use Slog.wtf when catching exceptions being returned to the caller so that we actually know about them. Change-Id: I75674ce38050b6423fd3c6f43d1be172b470741f
* Add new API shouldOfferSwitchingToNextInputMethodSatoshi Kataoka2013-08-221-0/+15
| | | | | Bug: 8364845 Change-Id: I6767f5640a07aa515a930645b0cf0b36fbe94831
* Reduce the transaction fee of getEnabledInputMethodSubtypeListSatoshi Kataoka2013-08-081-4/+10
| | | | | Bug: 8467480 Change-Id: If18cce8fbe567df51f29adcdcedff3f743460b8b
* Revert "Reduce the transaction fee of getEnabledInputMethodSubtypeList"Ken Wakasa2013-08-071-10/+4
| | | | | | This reverts commit e9a6f9713ca48aab9a6c87e0645cb0a0af946a11. Change-Id: I611d31086d4f02aae5c7021ac92975bd92a59f34
* Reduce the transaction fee of getEnabledInputMethodSubtypeListSatoshi Kataoka2013-08-071-4/+10
| | | | | Bug: 8467480 Change-Id: Ic1fddfe433e097041fcb09d1fd341d77d7d8b13b
* Add a debug utility for InputMethodUtilsSatoshi Kataoka2013-08-011-1/+2
| | | | Change-Id: I59f6001bf20640e36e19b09cf117b8579120ba7d
* Small refactor on InputMethodUtilsSatoshi Kataoka2013-07-311-18/+3
| | | | Change-Id: Ie4f797508c02abb13c7fe1be162ec4dc18829925
* Merge "Refactoring of the print sub-system and API clean up."Svetoslav Ganov2013-07-161-1/+1
|\
| * Refactoring of the print sub-system and API clean up.Svetoslav Ganov2013-07-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Now a user state has ins own spooler since the spooler app is running per user. The user state registers an observer for the state of the spooler to get information needed to orchestrate unbinding from print serivces that have no work and eventually unbinding from the spooler when all no service has any work. 2. Abstracted a remote print service from the perspective of the system in a class that is transparently managing binding and unbinding to the remote instance. 3. Abstracted the remote print spooler to transparently manage binding and unbinding to the remote instance when there is work and when there is no work, respectively. 4. Cleaned up the print document adapter (ex-PrintAdapter) APIs to enable implementing the all callbacks on a thread of choice. If the document is really small, using the main thread makes sense. Now if an app that does not need the UI state to layout the printed content, it can schedule all the work for allocating resources, laying out, writing, and releasing resources on a dedicated thread. 5. Added info class for the printed document that is now propagated the the print services. A print service gets an instance of a new document class that encapsulates the document info and a method to access the document's data. 6. Added APIs for describing the type of a document to the new document info class. This allows a print service to do smarts based on the doc type. For now we have only photo and document types. 7. Renamed the systemReady method for system services that implement it with different semantics to systemRunning. Such methods assume the the service can run third-party code which is not the same as systemReady. 8. Cleaned up the print job configuration activity. 9. Sigh... code clean up here and there. Factoring out classes to improve readability. Change-Id: I637ba28412793166cbf519273fdf022241159a92
* | Switch proc stats to use new process state constants.Dianne Hackborn2013-07-151-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These new constants are a better mapping to the kind of information that procstats is wanting to collect about processes. In doing this, the process states are tweaked to have a bit more information that we care about for procstats. This changes the format of the data printed by procstats, so the checkin version is bumped to 2. The structure is the same, however the codes for process states have all changed. The new codes are, in order of precedence: p -- persistent system process. t -- top activity; actually any visible activity. f -- important foreground process (ime, wallpaper, etc). b -- important background process u -- performing backup operation. w -- heavy-weight process (currently not used). s -- background process running a service. r -- process running a receiver. h -- process hosting home/launcher app when not on top. l -- process hosting the last app the user was in. a -- cached process hosting a previous activity. c -- cached process hosting a client activity. e -- cached process that is empty. In addition, we are now collecting uss along with pss data for each process, so the pss checkin entries now have three new values at the end of the min/avg/max uss values of that process. With this switch to using process state constants more fundamentally, I realized that they could actually be used by the core oom adj code to make it a lot cleaner. So that change has been made, that code has changed quite radically, and lost a lot of its secondary states and flags that it used to use in its computation, now relying on primarily the oom_adj and proc state values for the process. This also cleaned up a few problems -- for example for purposes of determing the memory level of the device, if a long-running service dropped into the cached oom_adj level, it would start being counted as a cached process and thus make us think that the memory state is better than it is. Now we do this based on the proc state, which always stays as a service regardless of what is happening like this, giving as a more consistent view of the memory state of the device. Making proc state a more fundamentally part of the oom adj computation means that the values can also be more carefully tuned in semantic meaning so the value assigned to a process doesn't tend to change unless the semantics of the process has really significantly changed. For example, a process will be assigned the service state regardless of whether that services is executing operations in the foreground, running normally, or has been dropped to the lru list for pruning. The top state is used for everything related to activities visible to the user: when actually on top, visible but not on top, currently pausing, etc. There is a new Context.BIND_SHOWING_UI added for when system services bind to apps, to explicitly indicate that the app is showing UI for the system. This gives us a better metric to determine when it is showing UI, and thus when it needs to do a memory trim when it is no longer in that state. Without this, services could get in bad states of continually trimming. Finally, more HashSet containers have been changed to ArraySet, reducing the temporary iterators created for iterating over them. Change-Id: I1724113f42abe7862e8aecb6faae5a7620245e89
* Consolidate InputMethodUtilsSatoshi Kataoka2013-07-091-10/+3
| | | | Change-Id: Ib5a5f3af8ea9eaaa81697d13c20abe28121e7373
* resolved conflicts for merge of ee0a5faf to masterKenny Root2013-05-031-6/+17
|\ | | | | | | Change-Id: Iba0ad9e665ad98379761995cb7c32415bcf50e48
| * am 245a3e1c: Merge "Change the initial disabled state of disabled IMEs" into ↵Satoshi Kataoka2013-05-031-5/+16
| |\ | | | | | | | | | | | | | | | | | | jb-mr2-dev * commit '245a3e1c1ed265a13d07000ef6e786ec321b85c4': Change the initial disabled state of disabled IMEs
| | * Change the initial disabled state of disabled IMEsSatoshi Kataoka2013-05-021-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 8365223 This change is a supplement for I77f01c70610d82ce9070d4a The disabled state of disabled pre-installed imes should be changed to ENABLED_STATE_DISABLED_UNTIL_USED on boot or user switch. Change-Id: If8ff1b2b95c36d33148def2ab87bd006aa520cc0
* | | am f09993ca: am 1a546dca: Merge "Fixed the problem ime invisible status ↵Satoshi Kataoka2013-04-181-1/+3
|\| | | | | | | | | | | | | | | | | | | | despite being the icon that appears in the statusbar." * commit 'f09993ca1d01823f9c60c0be45a8169e09dd27d7': Fixed the problem ime invisible status despite being the icon that appears in the statusbar.
| * | am 1a546dca: Merge "Fixed the problem ime invisible status despite being the ↵Satoshi Kataoka2013-04-181-1/+3
| |\ \ | | |/ | |/| | | | | | | | | | | | | icon that appears in the statusbar." * commit '1a546dca77b47b86c87ddf4de7a76662ef8bd48b': Fixed the problem ime invisible status despite being the icon that appears in the statusbar.
| | * Fixed the problem ime invisible status despite being the icon that appears ↵jungheang.lee2013-02-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in the statusbar. [Reproduce the Path] Precondition : Set "Auto-rotate screen" option to ENABLE Calendar App lunch -> Rotate device to "Landscape" -> Touch "+" button(Add new Schedule) -> Check the ime icons of the Status bar Ime invisible status despite being the icon that appears in the statusbar. Displays an icon in the status bar when the ime was actually visible state is modified to check. Change-Id: If103ab909c5bfa6391eb51a696fb8b8f0b18808c
* | | am 3e3a7b3b: am f024e7ac: Merge "Fix possible NPE" into jb-mr2-devSatoshi Kataoka2013-04-171-1/+1
|\| | | | | | | | | | | | | | * commit '3e3a7b3b1ed641dfa7c321f48bd228c59dc3c180': Fix possible NPE
| * | Fix possible NPESatoshi Kataoka2013-04-171-1/+1
| | | | | | | | | | | | | | | Bug: 8517083 Change-Id: Iea6bdcb0e39ee951b7f90f41cd3350bd1c7c5f71
* | | am 4c2a7b23: am 4a706bc6: Merge "Correctly manage the lifecycle of IME ↵Jeff Brown2013-04-051-7/+18
|\| | | | | | | | | | | | | | | | | | | | InputChannels." into jb-mr2-dev * commit '4c2a7b23f5f012cf00357035f840a32d4da20eb5': Correctly manage the lifecycle of IME InputChannels.
| * | Correctly manage the lifecycle of IME InputChannels.Jeff Brown2013-04-041-7/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | am 6b8e7b35: am bf20aa76: Merge "Keep track of who has disabled ↵Dianne Hackborn2013-03-271-1/+2
|\| | | | | | | | | | | | | | | | | | | | applications." into jb-mr2-dev * commit '6b8e7b35ef763d29a30c87a5a95ef941d39a8ee9': Keep track of who has disabled applications.
| * | Merge "Keep track of who has disabled applications." into jb-mr2-devDianne Hackborn2013-03-271-1/+2
| |\ \
| | * | Keep track of who has disabled applications.Dianne Hackborn2013-03-271-1/+2
| | | | | | | | | | | | | | | | Change-Id: I2640d3dc2200b589e2beb42a43cc93efd090f06e
* | | | am 901b77c6: am ca3d655d: Merge "Use input transport for communications ↵Jeff Brown2013-03-261-46/+81
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | between app and IME." into jb-mr2-dev * commit '901b77c63bc707c5785a149975e2113a43e38ad6': Use input transport for communications between app and IME.
| * | | Use input transport for communications between app and IME.Jeff Brown2013-03-261-46/+81
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | am 8277f248: am b685faa2: Merge "Implement #8323587, #8323342, #8323590: new ↵Dianne Hackborn2013-03-231-0/+3
|\| | | | | | | | | | | | | | | | | | | | features." into jb-mr2-dev * commit '8277f24865e52915b4825517860629c0385f79ed': Implement #8323587, #8323342, #8323590: new features.
| * | Implement #8323587, #8323342, #8323590: new features.Dianne Hackborn2013-03-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | am 621c35e4: am 765ddb4b: Merge "Separate sessionCreated and finishedEvents ↵Michael Wright2013-03-221-7/+3
|\| | | | | | | | | | | | | | | | | | | | callbacks" into jb-mr2-dev * commit '621c35e4fc83c2864a82da31aac767832ce86df6': Separate sessionCreated and finishedEvents callbacks
| * | Separate sessionCreated and finishedEvents callbacksMichael Wright2013-03-211-7/+3
| | | | | | | | | | | | | | | Bug: 8276952 Change-Id: If7051086c060fcce5d1e958ebbddec0784c851da
* | | am 20a402e0: am 8dfe99ce: Merge "Catch BadTokenException and continue." into ↵Craig Mautner2013-03-151-22/+8
|\| | | | | | | | | | | | | | | | | | | | jb-mr2-dev * commit '20a402e0dc8d3052ac317e6c13afee22a9502c35': Catch BadTokenException and continue.
| * | Catch BadTokenException and continue.Craig Mautner2013-03-151-22/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | am b7ca6804: am 67bea2ef: Merge "Remove WindowManager messages from remote ↵Craig Mautner2013-03-141-7/+12
|\| | | | | | | | | | | | | | | | | | | | queue." into jb-mr2-dev * commit 'b7ca680485f90c2507d969d7d64e5bec3acc3c33': Remove WindowManager messages from remote queue.
| * | Remove WindowManager messages from remote queue.Craig Mautner2013-03-141-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | am 35d45010: am dc50ba18: Merge "Put debug back in for b/b8263462." into ↵Craig Mautner2013-03-141-5/+11
|\| | | | | | | | | | | | | | | | | | | | jb-mr2-dev * commit '35d450107716d5ea950a19ffe09065ad4cb8b1fc': Put debug back in for b/b8263462.
| * | Put debug back in for b/b8263462.Craig Mautner2013-03-131-5/+11
| | | | | | | | | | | | | | | | | | Previous CL did not fix. Change-Id: Ief9e8f519480fa41248d53e5b0187c9657f00b79
| * | Remove old show/hide messages on new ime (DO NOT MERGE)Craig Mautner2013-03-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Remove old show/hide messages on new imeCraig Mautner2013-03-121-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Ie85369346cd3f843389a8e7837f5d97b56885309
* | | Add debug for b/8263462.Craig Mautner2013-03-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Look for race condition in soft input method attach. For bug 8263462. Change-Id: Id0609a743d57ab685c036372100ddd33819bff03
* | | Add a comment for secondary user handling in IMMSSatoshi Kataoka2013-02-251-1/+6
|/ / | | | | | | | | | | | | | | This is a follow up change for I438daf996ba48cdb34f0a6 Bug: 8205725 Change-Id: Iae87580b7d56ed8badf548ac1830ddb12a051148
* | Fix an issue where voice input is not enabled by default for the secondary userSatoshi Kataoka2013-02-181-5/+12
| | | | | | | | | | Bug: 8205725 Change-Id: I438daf996ba48cdb34f0a6158a0cbb510aae931b
* | Do not turn on imes unexpectedly with unit testsSatoshi Kataoka2013-01-281-15/+30
| | | | | | | | | | | | Bug: 7872918 Change-Id: Ie1d74c9fac27de140e7aa85f2eaefcb89aa06ea7
* | Add new disabled state for "optional" built-in apps.Dianne Hackborn2013-01-221-7/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Ensure that the input method dialog is dismissed when changing the ↵Satoshi Kataoka2013-01-181-0/+3
|\ \ | | | | | | | | | hardware keyboard state."
| * | Ensure that the input method dialog is dismissed when changing the hardware ↵Satoshi Kataoka2013-01-181-0/+3
| | | | | | | | | | | | | | | | | | keyboard state. Change-Id: I51882ecd2b1a12116f43afff7c23454164a6272b
* | | Merge "Rename bindService to bindServiceAsUser to follow convention."Amith Yamasani2013-01-161-1/+2
|\ \ \ | |/ / |/| |