summaryrefslogtreecommitdiffstats
path: root/core/java/android/inputmethodservice
Commit message (Collapse)AuthorAgeFilesLines
* Framework: Volume key cursor control (1/2)Konsta2015-10-251-0/+34
| | | | | | | This feature is moved to framework so it also works with third party keyboards. Change-Id: I8e20240e7bee5351ab20bb3d701eb95a5fd3e112
* Fix: Wrong suggestion popup position in extract mode.Keisuke Kuroyanagi2015-07-171-2/+6
| | | | | | | | | | | | | | Replace text was handled by the original EditText; thus, we couldn't correctly decide popup window position. Also, changing selection range replaces entire text of the extracted EditText. As a result, text cannot be replaced with the selected item when there is a selection. This change is a workaround for this issue. This quits offering "Replace" for selection in extract mode. Bug: 22038802 Change-Id: I052b027cfd10eeb289f77f4c6b228acf58fea636
* Fix "Select All" in extracted modeAndrei Stingaceanu2015-07-141-12/+13
| | | | | | | | | | | Stop calling onExtractTextContextMenuItem if "Select All" is selected (the action does not modify text thus does not need batch editing). Editor#finishBatchEdit reports that text changed which in turn can stop the action mode and the selection after it was started by onPreDraw. Bug: 22059417 Change-Id: I5354cbe4bae374e0d5f3de39616336170ee33b92
* Fix insertion handle disappearing in extract modeAndrei Stingaceanu2015-07-131-2/+2
| | | | | | | | | | | In extract mode, on every screen touch TextView#setExtractedText gets called which calls SpannableStringBuilder#sendTextChanged which in turn stops the action mode. As a fix, if the text is the same only copy the spans without replacing everything. Bug: 22315095 Change-Id: I28da760b3dc11e1cfbaf720e547bd817c5b89d7e
* Handle back key to cancel text action mode in full-screen IME.Yohei Yukawa2015-06-241-9/+28
| | | | | | | | | | | | | This CL is a follow up to I7998c8ee2162a0e01525a0cd66ec14fa505, which completely removed ExtractActionMode including back key handling in InputMethodService when full-screen mode is enabled. It turns out that back key events still need to be handled in InputMethodService when full-screen mode is enabled so that users can still cancel floating text action mode with back key. Bug: 22034992 Change-Id: I5f8db34f7425eef343d40d9820925ea6aaf9fccc
* Fix selection by double tap in Extracted modeAndrei Stingaceanu2015-06-221-0/+8
| | | | | | | | | Select with double tap in extracted mode has suffered a regression recently: flickers and it does not correctly select. Found this fix after a lot of trials. Bug: 20128047 Change-Id: I1bbe8c11982d37e5409bac2b648a31b0ca1f0bbc
* Fix JavaDoc error in I392166c77cd9dd2c432dc4f1274312f8355de02b.Yohei Yukawa2015-06-111-1/+2
| | | | | | | Fix confirmed with 'make doc-comment-check-docs' Bug: 21446448 Change-Id: Ica4359b13ddbc790740cc22c95b9e002f7c8e4b8
* Merge "Keyboard.Key#onReleased() should handle inside parameter." into mnc-devYohei Yukawa2015-06-121-5/+15
|\
| * Keyboard.Key#onReleased() should handle inside parameter.Yohei Yukawa2015-06-111-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The boolean parameter of Keyboard.Key#onReleased(boolean) has been somehow ignored since Capcake. With this CL, that method starts working as documented. Alternatively we could fix the issue when and only when the application's targetSdkVersion >= 23. We didn't do that because: - Although Keyboard.Key class is a public API, it is supposed to be used almost only by android.inputmethodservice.KeyboardView. The risk of unwanted compatibility problems is low. - Fixing that is beneficial for users because it actually fixes UX issue when applications/IMEs that still rely on KeyboardView run in Android M. - All the fields that are related to Keyboard.Key#onReleased are public fields so developers can easily work around anyway. Bug: 21446448 Change-Id: I392166c77cd9dd2c432dc4f1274312f8355de02b
* | Completely remove ExtractActionMode from ExtractEditLayoutAndrei Stingaceanu2015-06-092-178/+3
|/ | | | | | | Use the floating toolbar action mode instead. Bug: 20128047 Change-Id: I7998c8ee2162a0e01525a0cd66ec14fa5050a953
* Catch BadTokenException and continue in clearInsetofPreviousIme.Seigo Nonaka2015-06-081-5/+11
| | | | | | | | | | This is a follow up CL for Ib04967f39b2529251e4835c42e9f99dba2cf43f2. As well explained in the I2c21573cf972145ab08e66604cdb9344139a3f31, the race condition here cannot be avoided without an unacceptable performance penalty. For now, we follow the same way. Bug: 21600287 Change-Id: I0ffdf8bf7e8a53cf8aba1339024b32da65d4f32d
* Separate the SelectionActionMode into Insertion and Selection.Clara Bayarri2015-06-041-1/+1
| | | | | | | | | | When we got rid of the paste popup, we merged it into the Selection ActionMode and moved all its invocations to the ActionMode. Some apps actually want the paste popup without the Selection ActionMode, hence separating them again allows them to cancel the one they want. Bug: 21571422 Change-Id: I91bcd0d9c3e68d9c736698fe0bec010b4c9f5cf3
* Clear the inset of previous IME when necessary.Yohei Yukawa2015-05-281-1/+34
| | | | | | | | | | | | | | | | In the following scenario, the system continues keeping the previous IME's inset in the display until the new IME shows its window. 1. an IME shows its software keyboard with reporting non-empty inset. 2. the user switches to another IME, which does not show the software keyboard when it is selected (e.g., because the physical keyboard is connected.) This CL tries to address above situation by introducing a new state flag IMMS#mShouldClearInsetOfPreviousIme to clear the previous IME's inset when necessary. Bug: 15922840 Change-Id: Ib04967f39b2529251e4835c42e9f99dba2cf43f2
* Notify IME visibility when showWindow is called.Seigo Nonaka2015-04-241-3/+7
| | | | | | | | | | | | | | To change the back icon, need to notify IME visibility to the InputMethodManagerService when guest IME service calls showWindow(). IME can call showWindow() if it want to show software input, but it doesn't send IME_VISIBLE state to the InputMethodManagerService, hence the arrow icon is different from what we expect. This typically happens when Latin IME shows Emoji panel by left-alt keys. Bug: 20318050 Change-Id: I0ec2c71ad9bc3b7e9259d9180375d9062fc7e154
* am 66a51c70: am da1bc605: am 7a3c8c70: Merge "Fixed memory leak in ↵Adam Powell2015-04-071-0/+2
|\ | | | | | | | | | | | | ExtractEditLayout finish()" * commit '66a51c7080f26219652f84ae8d10b1e4d63409af': Fixed memory leak in ExtractEditLayout finish()
| * Fixed memory leak in ExtractEditLayout finish()Johan8 Persson22015-03-271-0/+2
| | | | | | | | | | | | | | | | | | When marking text and opening the edit text dialog and then rotating the device would result in references being kept to the edit text dialog and the memory would never get released again. Change-Id: I3e95083e4923844d2b496ea79174ef97e77f8686
* | Add @ResourceInt annotations on APIsTor Norbye2015-02-182-3/+6
|/ | | | Change-Id: I119cc059c2f8bd98fd585fc84ac2b1b7d5892a08
* am 83c804be: Merge "Prevent duplicated registration of ↵Yohei Yukawa2015-02-141-0/+1
|\ | | | | | | | | | | | | OnComputeInternalInsetsListener" automerge: efd9abb * commit '83c804be9c1f33ff4bafbfd60218751a00c7d2b9': Prevent duplicated registration of OnComputeInternalInsetsListener
| * Prevent duplicated registration of OnComputeInternalInsetsListenerSeonggoo Kang2014-12-241-0/+1
| | | | | | | | | | | | | | | | | | | | OnComputeInternalInsetsListener is added when initViews is called, and initViews is called by onCreate and onConfigurationChanged. But it is removed only by onDestroy. Therefore listeners are accumulated and it results performance issue. So before adding, remove mInsetListener that was previously added. Change-Id: I494d3f1875613d73d3f9b8e2af286b5800f03196
* | Use CURRENT_OR_SELF when checking SPEAK_PASSWORD settingAlan Viverette2014-12-021-1/+1
| | | | | | | | | | | | | | Using CURRENT isn't always safe. BUG: 18557273 Change-Id: I12e197ab25b8ffdc04c5e74836945177870698a2
* | Load SPEAK_PASSWORD from currently active user rather than selfAlan Viverette2014-11-251-2/+4
|/ | | | | | | Also fixes a typo in UserHandle's docs. BUG: 18295054 Change-Id: I1f5384f84062b9ea7dcbebe1e5f64af331028d41
* Remove CursorAnchorInfoRequest and related stuffYohei Yukawa2014-08-221-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Deprecate InputMethodService.enableHardwareAcceleration()Alan Viverette2014-08-141-1/+4
| | | | | BUG: 16951553 Change-Id: I126ea823eb2eeabb29d30999dec9c9411b33b315
* Polish new IME API for L part 2: CursorAnchorInfoYohei Yukawa2014-07-111-21/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* More work on voice interaction visuals.Dianne Hackborn2014-05-302-3/+8
| | | | | | | | | | | | | | | | | There is now a special theme for voice interaction activities to use, so they can be a panel that is better intergrated with the rest of the voice interaction experience. This is still not completely working, I have some hacks in the demo app to get it right; I'll fix that in a future change. Also improve VoiceInteractor to be retained across activity instances, for things like rotation. And bump up the number of concurrent broadcasts that are allowed on non-svelte devices, since they can handle more and this makes the boot experience better when dispatching BOOT_COMPLETED. Change-Id: Ie86b5fd09b928da20d645ec2200577dee3e6889d
* Add system layer for voice interaction services.Dianne Hackborn2014-05-282-59/+20
| | | | | | | | | | | | | | | | | New window layer that voice interaction service windows go in to. Includes a new voice-specific content rectangle that voice activities are placed in to. Add specific animations for this layer, sliding down from the top (though this can be customized by the voice interaction service). Also add the concept of activities running for voice interaction services for purposes of adjusting the animation used for them, again sliding from the top, but not (yet?) customizable by the voice interaction service. Change-Id: Ic9e0e8c843c2e2972d6abb4087dce0019326155d
* Introduce new API for floating window supportYohei Yukawa2014-05-092-0/+35
| | | | | | | | This CL introduces a new API IMM#updateCursorAnchorInfo for floating window support. BUG: 14579622 Change-Id: I61dec2f8fa671ba891da1d4af08975750e3acb04
* Partial revert "Load device default theme mapping from resources"Alan Viverette2014-05-051-5/+7
| | | | | | This reverts commit e4ab72d54cf41d16819b72e94d9b0d0d51289647. Change-Id: Id17170312c75993fc1f7859d52c7e050b2aeaf80
* Further work on voice interaction services.Dianne Hackborn2014-05-052-11/+70
| | | | | | | | | | | | | This makes VoiceInteractionSession a more first-class concept. Now the flow is that a VoiceInteractionService calls startSession() when it wants to begin a session. This will result in a new VoiceInteractionSession via the VoiceInteractionSessionService containing it, and the session at that point an decide what to do. It can now show UI, and it is what has access to the startVoiceActivity API. Change-Id: Ie2b85b3020ef1206d3f44b335b128d064e8f9935
* Load device default theme mapping from resourcesAlan Viverette2014-05-011-7/+5
| | | | | | | Also adds a few missing styles and reorganizes some XML files. Makes stackViewStyle public since it's defined in DeviceDefault. Change-Id: I8f6a0f93410948b38619594474d60dc40ece5917
* Revise Javadoc for CURSOR_ANCHOR_MONITOR_MODE_CURSOR_RECTYohei Yukawa2014-04-291-2/+3
| | | | | | | | This is a follow-up CL for I3acf2317ae1d763d11 to improve the Javadoc for CURSOR_ANCHOR_MONITOR_MODE_CURSOR_RECT BUG: 14323360 Change-Id: Ie8948eda3ce57da282bd82e8e9a44997f6d53245
* Return the cursor position in screen coordinatesYohei Yukawa2014-04-291-4/+7
| | | | | | | | | | | | | | | | | From its beginning, InputMethodService#onUpdateCursor has provided the cursor position in local coordinates in the attached view. However, the local coordinates is not useful for IMEs to render a floating UI near the cursor because the IME is not able to know the origin of the attached view. With this CL, CURSOR_ANCHOR_MONITOR_MODE_CURSOR_RECT also means that the IME will receive the cursor position in screen coordinates. Because this is a new constant in the next release, conditionally changing the coordinates never causes compatibility issues as long as its behavior is well documented. BUG: 14323360 Change-Id: I3acf2317ae1d763d11dae5ef73c2a1348b377c71
* Allow IMEs to start/stop receiving onUpdateCursor callbackYohei Yukawa2014-04-041-0/+17
| | | | | | | | This CL introduces an API which allows IMEs to start/stop receiving onUpdateCursor callback upon their request. BUG: 13388665 Change-Id: I987326872def181dda5d9d701b762f088e0d9c39
* Switch framework Holo references to Quantum.LightAlan Viverette2014-04-011-0/+1
| | | | Change-Id: Ib545a143f1959b6104adbc9d594dd626851d90b3
* Remove unused imports from frameworks/base.John Spurlock2013-11-201-1/+0
| | | | Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
* am 4c62da69: am 145cac85: am 4bf6eb17: Merge "Memory leak in ↵Jeff Brown2013-10-291-1/+9
|\ | | | | | | | | | | | | IInputMethodSessionWrapper executeMessage" * commit '4c62da692ce5159a187644ca76f7de2063bbf057': Memory leak in IInputMethodSessionWrapper executeMessage
| * am 145cac85: am 4bf6eb17: Merge "Memory leak in IInputMethodSessionWrapper ↵Jeff Brown2013-10-291-1/+9
| |\ | | | | | | | | | | | | | | | | | | executeMessage" * commit '145cac85f8ff077447d282c147e4c8865833b76a': Memory leak in IInputMethodSessionWrapper executeMessage
| | * Memory leak in IInputMethodSessionWrapper executeMessageHenrik Baard2013-08-111-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases the executeMessage is called with mInputMethodSession == null. For the messages DO_UPDATE_SELECTION, DO_APP_PRIVATE_COMMAND memory is leaked. This commit recycles the args freeing the allocated memory.
* | | Introduce an API to get the recommended height of the InputMethodWindowSatoshi Kataoka2013-10-151-0/+15
| | | | | | | | | | | | | | | | | | | | | Bug: 11035379 Bug: 5137498 Change-Id: I0e920ee79c526c3aea6872b063cf294e2ab081c8
* | | am 4faa694e: am d3758420: am 65e91126: Merge "Allow IMEs to extend below nav ↵John Spurlock2013-10-091-0/+2
|\ \ \ | |/ / | | | | | | | | | | | | | | | bar, remove SystemUI veto." into klp-dev * commit '4faa694ed28db7961a2a37269e5706c2a49d87c3': Allow IMEs to extend below nav bar, remove SystemUI veto.
| * | Allow IMEs to extend below nav bar, remove SystemUI veto.John Spurlock2013-10-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Layout IMEs below the nav bar, offset by bottom padding and associated guard rectangle with a black background to ensure they do not appear as islands during transitions. This makes it safe to remove the SystemUI forced opaque transition when showing an IME, making the overall transition less expensive, quicker and smoother overall. Bug:11058746 Change-Id: I460912ee7c117480c57b947ed31eca330819f32c
* | | am 4895ec3d: am 940a2ad6: Merge "Don\'t send the same values to ↵Jean Chalard2013-09-121-0/+5
|\ \ \ | |/ / | | | | | | | | | | | | | | | onUpdateSelection repeatedly" into klp-dev * commit '4895ec3dcc214891b9788cde3c9720ee9656596c': Don't send the same values to onUpdateSelection repeatedly
| * | Don't send the same values to onUpdateSelection repeatedlyJean Chalard2013-09-121-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the IME is repeatedly changing the text in its onUpdateSelection handler, this will crash it with a stack overflow exception. It's better than the old behavior, which would result in a busyloop likely to make the device completely unresponsive. Bug: 10301239 Change-Id: I170cfb8ef20fc056d4725931890a987aefcaea8b
* | | Add View constructor that supplies a default style resourceAlan Viverette2013-09-093-9/+20
|/ / | | | | | | | | | | | | Also updates the constructor of every class that extends View. BUG: 10676369 Change-Id: Ifaf27bf82028d180afa4931c0e906df88d858ac3
* | Fix possible NPE in IInputMethodWrapperSatoshi Kataoka2013-07-011-0/+8
| | | | | | | | | | | | Bug: 9093124 Change-Id: If62138a85e46f217ad2d3eda140715961006dcdc
* | Resolve inconsistent conditions in InputMethodServiceSatoshi Kataoka2013-05-301-2/+1
|/ | | | | | | | | This change is addressing this issue by 1. call doFinishInput in onDestroy 2. fix the inconsistent condition of "mInputStarted" Bug: 9197136 Change-Id: Iefe6b284e148e31bd212b255c41cb2cf548723d7
* am 1a546dca: Merge "Fixed the problem ime invisible status despite being the ↵Satoshi Kataoka2013-04-181-1/+1
|\ | | | | | | | | | | | | 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/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Use input transport for communications between app and IME.Jeff Brown2013-03-263-89/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Separate sessionCreated and finishedEvents callbacksMichael Wright2013-03-211-5/+5
| | | | | | | | | | Bug: 8276952 Change-Id: If7051086c060fcce5d1e958ebbddec0784c851da