summaryrefslogtreecommitdiffstats
path: root/services/core/java/com/android/server/InputMethodManagerService.java
Commit message (Collapse)AuthorAgeFilesLines
* Use public APIs to instantiate InputMethodSubtypeYohei Yukawa2014-09-101-3/+9
| | | | | | | | | | | | | | | | This is a groundwork for subsequent CLs that are supposed to improve default input method selection logics. Historically we have had a @hide constructor of InputMethodSubtype. However, this contructor is a bit obsolete because we can not specify some parameters that were added in recent platform releases. We should use InputMethodSubtypeBuilder instead. BUG: 17347871 Change-Id: I72ad79682a58344e14380eb20e26edf98aee37cd
* Fix illegal cast in a logging codeYohei Yukawa2014-08-311-5/+5
| | | | | | | | | | | | | | | | | This is a follow up CL for I19ad8542659bc092b92ee13eb9, which introduced a ClassCastException error in the logging code of MSG_SET_USER_ACTION_NOTIFICATION_SEQUENCE_NUMBER handler. With this CL, the protocol in question looks like: - what: MSG_SET_USER_ACTION_NOTIFICATION_SEQUENCE_NUMBER - arg1: sequence number to be passed to #setUserActionNotificationSequenceNumber(int) - arg2: not used - obj: ClientState BUG: 16238154 BUG: 7043015 Change-Id: I08d52d4564bae9e042a2eff359e92549a66e837b
* Added notification color to all system notificationsSelim Cinek2014-08-201-0/+2
| | | | | Bug: 17128331 Change-Id: I81a94510ef51b99916f314c0dd65852426a1fbeb
* Persist Show IME option.Michael Wright2014-08-171-19/+43
| | | | | | | | Add a new setting to persist whether to show the IME when a hard keyboard is connected. Bug: 14066881 Change-Id: I2237ded850a0d4ab43ca441d0b7df13e0958e630
* Change 'disable hardware keyboard' to 'show input method'Michael Wright2014-08-171-5/+6
| | | | | | | | | | Previously it implied that the hardware keyboard would be disabled, but really the toggle would just enable showing the IME even if a hardware keyboard was present. Changed the string and swapped the semantics to be more clear about the behavior. Bug: 14066881 Change-Id: I9c8a7eb98b5277f1d09cc19fa7402e9b4cf51d92
* Fix unnecessarily non-static inner class to static innerTadashi G. Takaoka2014-08-051-1/+1
| | | Change-Id: I0c8efda6ef0bede6b5871cd651f42db82dbfbd39
* Fix input method picker using Material design languageTadashi G. Takaoka2014-08-041-61/+61
| | | | | | | Note that the button text color will be fixed in the future change. Bug: 14860252 Change-Id: I8a6a4a7efce50bfaec114117e33f97f27b1ef950
* Polish new IME API for L part 2: CursorAnchorInfoYohei Yukawa2014-07-111-30/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Introduce a sequence number to avoid redundant IPCsYohei Yukawa2014-06-091-8/+53
| | | | | | | | | | | | | | | | | This CL introduces a sequence number to avoid redundant IPCs between IMM and IMMS. The basic concept is that: 1. IMMS maintains a sequence number for #notifyUserAction. 2. IMMS increases the sequence number whenever the current IME/subtype is changed. 3. IMMS notifies the new sequence number to IMM. 4. IMM maintains the last sent sequence number and the next sequence number. IMM should call #notifyUserAction only once per particular sequence number. 5. IMMS ignores #notifyUserAction if the specified sequence number is not the expected one. BUG: 7043015 Change-Id: I19ad8542659bc092b92ee13eb9f1d68ddd4b815a
* Trivial method renaming for notifyTextCommittedYohei Yukawa2014-06-051-3/+3
| | | | | | | | | | | This CL does not change existing behavior but only renames notifyTextCommitted with notifyUserAction so that we can use not only text commit but also other actions such as just typing a character will be used as a trigger to update the IME rotation order for better IME switching experience. BUG: 7043015 Change-Id: I7f3e13a7226ef0dceee82b67e8a0d8536f7e9807
* Hardening token validation in InputMethodManagerServiceYohei Yukawa2014-06-041-6/+18
| | | | | | | | | | | | This CL adds missing token validations in InputMethodManagerService#switchToNextInputMethod and InputMethodManagerService#shouldOfferSwitchingToNextInputMethod. This CL also fixes a possible race condition when validating the token in InputMethodManagerService#updateStatusIcon. BUG: 15420379 Change-Id: I043aa30a19c821f33effd57dfd6590b0e3ed817b
* Remove code duplication in InputMethodManagerServiceYohei Yukawa2014-06-041-17/+32
| | | | | | | | This is a groundwork for the subsequent fix. It should not change existing behavior. BUG: 15420379 Change-Id: I106b3f50731c799e06b26d1eab9c6a406c06d78c
* Remove redundant synchronization blocks from IMMSYohei Yukawa2014-06-041-22/+28
| | | | | | | | This is a groundwork for the subsequent fix. It should not change existing behavior. BUG: 15420379 Change-Id: I6f81ec77e748a8c7c26ffa1f5faf39684b210ae4
* Rebuild the enabled IMEs list when changed in Settings pageYohei Yukawa2014-05-301-1/+9
| | | | | | | | | | | | | | | With this CL, the input method switching controller is notified even when the list of enabled IMEs is changed by System Settings. Ideally we should hook every setter method in InputMethodSettings to ensure that InputMethodSettings and InputMethodSubtypeSwitchingController can share the same list. Until then, most of user visible weirdness should disappear with this CL. BUG: 15299968 Change-Id: Ie41da226d71b58d2e12057f85e4793b35e8b9f23
* Remove unnecessary internal lockYohei Yukawa2014-05-221-12/+22
| | | | | | | | | | | | | | | | | | | | | Previously, InputMethodSubtypeSwitchingController has relied on its own internal lock for #getNextInputMethod and class has to be invalidated whenever InputMethodManagerService#mMethodMap is updated, any method of InputMethodSubtypeSwitchingController should be called under the global lock of InputMethodManagerService#mMethodMap. As a consequence, we can conclude that InputMethodSubtypeSwitchingController does not need its own internal lock. This CL also adds additional synchronization blocks into the constructor of InputMethodManagerService to address the existing inconsistency that methods with *Locked suffix are called without the lock actually. BUG: 7043015 Change-Id: I9d4d3d7232c984432185c10c13fb726a6158cac8
* Update InputMethodSubtypeSwitchingController correctlyYohei Yukawa2014-05-211-2/+2
| | | | | | | | | | | | | | | | | | User visible behavior is supposed to be identical with and without this CL. Previously, there is some corner cases where InputMethodSubtypeSwitchingController#resetCircularListLocked is not called but the list of enabled input method is updated. Fortunately, this corner cases are not observable for a user because we have not updated the the rotation order dynamically. However we should fix this before implementing smarter rotation algorithm that changes the rotation order dynamically. BUG: 7043015 Change-Id: I145a514dc4cde369ba50431c408c916046ab0c6e
* Delay the dispatching of non-wakeup alarms.Dianne Hackborn2014-05-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the screen is off, there are no guarantees about when non-wakeup alarms will be dispatched. Historically they are dispatched any time the device wakes up. With this change, we will delay the dispatch until sometime later. The amount of delay is determined by how long the screen has been off. Currently there are three possible delays: up to 2 minutes if the screen has been off for less than 5 minutes; up to 15 minutes if it has been off for less than 30 minutes; and otherwise up to an hour. When the screen is turned on or a wakeup alarm is dispatched, all delayed alarms will also be dispatched. Note that one of the things this delays is TIME_TICK, which means the in many cases we won't deliver TIME_TICK until the screen is in the process of waking up. The current implementation causes this to be delayed until the SCREEN_ON broadcast is sent; we probably want to improve this to have the power manager tell the alarm manager about the screen turning on before it sends that broadcast, to help make sure things like the lock screen can update their current time before the screen is actually turned on. In addition, switch all of the alarm stats to use the new PendingIntent "tag" identifier for its operations, instead of the old code to try to construct a pseudo-identifier by retrieving the raw Intent. Also add a new package manager command to immediately write packages.xml. Change-Id: Id4b14757cccff9cb2c6b36de994de38163abf615
* Do not pass null to IInputMethod#setSessionEnabledYohei Yukawa2014-05-191-8/+8
| | | | | | | | | It doen't make sense to pass null as IInputMethodSession for IInputMethod#setSessionEnabled. If we do this, it causes NPE. BUG: 14980068 Change-Id: Ide48d098d5e7640890257e31f8872e79b9821eb2
* Don't show switcher button when IME switcher shownJason Monk2014-05-131-0/+3
| | | | | | | | This keeps track of when the switcher is being shown and disables the IME switcher button/notification when it is up. Bug: 14631536 Change-Id: I4adf24bc5fa6377645915419583d60596b3bdde0
* Only show IME in navigation bar when it shouldJason Monk2014-05-071-4/+7
| | | | | | | | | | Add a flag to indicate that the IME should be shown. This follows the continuous ime notification boolean, and if there are multiple input methods to choose from enabled. This way the notification and navigation button show up under the same circumstances (but not on the same devices). Change-Id: Ia6a2253061f1876f4bcc511de48c1078e9d96be5
* Don't show IME Switcher not. if nav bar existsJason Monk2014-05-021-1/+2
| | | | | | | | Since the navigation bar now has IME switcher icon no need for a notification about it when it is present. Bug: 14257632 Change-Id: I5511fee0dee45475d5b7949f63696b1d29acf9cc
* Allow IMEs to start/stop receiving onUpdateCursor callbackYohei Yukawa2014-04-041-0/+31
| | | | | | | | This CL introduces an API which allows IMEs to start/stop receiving onUpdateCursor callback upon their request. BUG: 13388665 Change-Id: I987326872def181dda5d9d701b762f088e0d9c39
* Rename related users to profiles.Kenny Guy2014-04-021-11/+11
| | | | | | | | Rename the related user concept as profiles. When returning profiles of a user include the user as a profile of itself. Change-Id: Id5d4f29017b7ca6844632ce643f10331ad733e1d
* Fix issue #13564072: Back button no longer dismisses IME after voice usageDianne Hackborn2014-03-241-1/+6
| | | | | | Calling identity wasn't being cleared in an incoming code path. Change-Id: Ib32060a91bf81531de049fafde69835b5382a25f
* Unhide notification category.John Spurlock2014-03-211-1/+2
| | | | | | | | | | Rename @hidden Notification.kind -> category, and flesh out shared values. Now a single value. Update framework references, remove unused SystemUpdateService magic value unused since 2012. Change-Id: If06d19ff3a8c3125fca1457f5d3c665e2939c66c
* Treat IME processes as hosting activitiesDianne Hackborn2014-03-171-2/+4
| | | | | | | | | | | When we stop using an IME process, we still treat that process as if it is hosting activities (in the activity part of the LRU list), to try to keep it around. This is intended to help the experience of switching between IMEs, reducing the chance of your previous IME process being killed and thus requiring much more time to switch. Change-Id: Ie5793fd9b40d980fa18f80246326511ed6ae0597
* Allow related users to show activities on primary userAmith Yamasani2014-03-071-1/+21
| | | | | | | | | | | | Make ActivityManager and WindowManager understand related users. Task stack will now contain interleaved tasks for related users, but still group regular users separately from groups of related users. InputMethodManagerService permits related users to invoke IME and receive key events. Change-Id: I3bd87b32aec69c3f8d470c8b29b144f4e849c808
* am 9158825f: Move some system services to separate directoriesAmith Yamasani2013-12-191-200/+29
| | | | | * commit '9158825f9c41869689d6b1786d7c7aa8bdd524ce': Move some system services to separate directories
* Move some system services to separate directoriesAmith Yamasani2013-12-191-0/+3574
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