Test: filter logcat for ImeTracker tag, open some apps with IME connection (e.g. Dialer, Messaging, etc.) and close the soft keyboard, check that tracking reflects observed behaviour
Change-Id: Icf9ab3fc0f7a7116456c13328d22f8b8428a0c79
Test: filter logcat for ImeTracker tag, open some apps with IME connection (e.g. Dialer, Messaging, etc.), check that tracking reflects observed behaviour
Change-Id: I73dec2e9e2d5f919c7a006828ee0b12a998fc7d9
Introduce new API to support gesture preview as user is operating over
text.
Bug: 254726230
Bug: 254727073
Test: InputConnectionEndToEndTest
Change-Id: I6c2ac5a5aaeaeab78411d24870f573670304e898
Add more description to discourage IME developers
not use deprecated onCreateInputMethodInterface and
onCreateInputMethodSessionInterface.
Also move paragraph tag since Block tags should be
put after the main documentation.
Bug: 254278652
Test: presubmit
Change-Id: I729fbe2e1544fc72580a08ccb763ab69c58af92d
This is a follow up CL to our previous CL [1], which introduced
HandwritingGesture and several subclasses.
One of the challenge is that we only wanted to make child classes
Parcelable, while keeping the abstract base class HandwritingGesture
non-Parcelable. Although InputConnection has only one method
InputConnection#performHandwritingGesture(
HandwritingGesture, ResultReceiver),
in the IPC layer IRemoteInputConnection needed to define methods for
each subclass, e.g.
* performHandwritingSelectGesture(in InputConnectionCommandHeader,
in SelectGesture, ...)
* performHandwritingInsertGesture(in InputConnectionCommandHeader,
in InsertGesture, ...)
* performHandwritingDeleteGesture(in InputConnectionCommandHeader,
in DeleteGesture, ...)
because their abstract class HandwritingGesture is not Parcelable.
To avoid such method definitions (and lots of type-based dispatching /
merging logic), this CL introduces
ParcelableHandwritingGesture
as a generic Parcelable container of HandwritingGesture subclasses.
You can freely use ParcelableHandwritingGesture in AIDL method
definitions as follows.
performHandwritingGesture(in InputConnectionCommandHeader,
in ParcelableHandwritingGesture, ...)
In the Java side, you can easily wrap objects as follows.
var parcelableGesture = ParcelableHandwritingGesture.of(gesture);
var unparceledGesture = parcelableGesture.get();
Note that this CL is still an internal cleanup. There must be no
developer observable behavior change.
[1]: I53bcb62e03ac1c371feb60d1385c88c921754092
3e3ff1a3d2
Bug: 234882948
Bug: 239783077
Test: presubmit
Test: atest FrameworksCoreTests:ParcelableHandwritingGestureTest
Change-Id: I158026087653f6772a78cc2394e678ae9741fb00
This is an API for IME to request text bounds information from editor to
perform handwriting rich gestures. It's useful for IMEs to create custom
handwriting gesture that's not supported the HandwritingGesture. And
it can also be used to provide default rich gesture implementation for
handwriting gesture compatibility.
Bug: 239843501
Test: atest TextBoundsInfoTest
Change-Id: Ia7522371976a4e1fcdff4cc0d244ea427ad3d7c9
By default all PhoneWindows use Theme_windowAnimationStyle which
animates window up and down when gaining and losing focus respectively.
For InkWindow we don't need any animation.
Fix: 237331144
Fix: 245441579
Bug: 253477462
Test: atest StylusHandwritingTest
Change-Id: I209b03dfbed386a2863921b49d43858037d380b8
Mark DISALLOW_INPUT_METHOD_INTERFACE_OVERRIDE
comapt change ID as TestApi for CTS testing.
Bug: 148086656
Test: presubmit
Change-Id: I7b56d68cb5429c7076943f3d12b1d19cdf54d26a
This CL mechanically moves RemoteInputConnectionImpl from
com.android.internal.inputmethod
to
android.view.inputmethod
just to make it a package-private class, as it is (and should be) used
only by InputMethodManager.
This is a mechanical refactoring. There must be no developer
observable behavior change in this CL.
Bug: 192412909
Test: presubmit
Change-Id: I2d9bd4a5cb39d506a70331c9c930a74580cdbfa0
After stylus hasnt been used for handwriting in last X minutes,
remove the the stylus handwriting window.
Bug: 243571274
Test: StylusHandwritingTest
Change-Id: I641be63e028ea9cbfd882ce318d30aad71fd8a4e
With [1] we changed the lifecycle of InkWindow to be short lived and
missed certain cases.
This also fixes CTS testStylusSession_fingerTriggersNavbarGestures
Bug: 243571274
Test: atest StylusHandwritingTest
[1]: Icd3eea91fe144cff7100d3ecf19191c064c0d196
This is a retry for I1593ff10a5520aadb5ed86a4a09f2405ee65c321
Change-Id: Ibf54599f41ac13121215c5344eb92ecca3259db1
It had the chance for calling into IMS but IMS
already destroyed.
Ideally we should suppress any callbacks after
InputMethodService#onDestroy() and log them.
First try is CL[1], but it wrongly add the API to
IInputMethod. Using the InputMethodServiceInternal
is make more sense for IInputMethodWrapper to
communicate with InputMethodService.
[1]: I10f26a92e739b60c5b8010e8476f8f5a403e0a7b
Bug: 121269861
Bug: 211062619
Bug: 148086656
Test: presubmit
Change-Id: I7b4f34eb38f44dea6872eb46866c9ad7dc1c185c
Add InputConnecton#replaceText(int, int, CharSequence, int, TextAttribute) API to support replacing the specific range in the editor with suggested text.
Add default implementation in InputConnection which delegates to call
finishComposingText()+setSelection()+commitText().
Add implementation in BaseInputConnection which will address the issue
of selection flash.
Bug: 241503197
Test: atest FrameworksCoreTests:BaseInputConnectionTest
Test: atest CtsInputMethodTestCases:BaseInputConnectionTest
Change-Id: Ia0e42270cfae112fcf19205a7151e4ab4ac4afdd
Add a compatibility change to forbit IMEs to override
the deprecated onCreateInputMethodSessionInterface
method from U.
Bug: 148086656
Test: presubmit
Change-Id: I002c895ce977cf7ed4ef40019c831ccbd9b6450d
IME developers have no strong reason to override
InputMethodImpl and InputMethodSessionImpl methods.
Add deprecated annotation to these methods with
suggested alternatives.
Bug: 148086656
Test: presubmit
Change-Id: I4e970404a1cbf15d6b40760b7808825c0eb94736
Add new APIs for select and delete with two rectangles.
Test: atest InputConnectionEndToEndTest
Test: atest StylusHandwritingest
Bug: 239783077
Change-Id: Ia7240d3eaac8610c774c3a4aad074a4b84b71521
It had the chance for calling into IMS but IMS
already destroyed.
Ideally we should suppress any callbacks after
InputMethodService#onDestroy() and log them.
Bug: 121269861
Bug: 211062619
Bug: 148086656
Test: presubmit
Change-Id: I10f26a92e739b60c5b8010e8476f8f5a403e0a7b
performHandwritingGesture should take an optional IntConsumer
& executor to provide result of Gesture operation back to IME.
Bug: 210039666
Bug: 239783077
Test: atest InputConnectionEndToEndTests
Change-Id: I2ca7eaa182159b7ffef0812d970512ffcf817ce2
API feedback:
1. use IntDef for toolType
2. Add javadoc in onUpdateEditorTooltip describing its called after
onStartInput.
Fix: 241206150
Bug: 233108064
Test: atest CtsInputMethodTestCases
Change-Id: I95bccd992690af5c160277b88a854d8f032278aa
1. When the system removes the last known stylus device
and has no other stylus available, remove the Ink window.
2. Create InkWindow only if the device+IME combination supports
handwriting and the stylus is being used.
Bug: 243571274
Bug: 239121683
Bug: 210039666
Test: atest StylusHandwritingTest
Change-Id: Icd3eea91fe144cff7100d3ecf19191c064c0d196
During a stylus handwriting session, user can perform a
stylus gesture operation like Select, delete, insert on an
area of text. IME needs APIs to perform these gestures on text.
This CL introduces API signature for Select, delete, insert gestures.
Design doc: go/scribe-gestures-api
Bug: 239783077
Bug: 210039666
Test: Manually build & compile HandwritingIme
Change-Id: I53bcb62e03ac1c371feb60d1385c88c921754092
Introduce APIs necessary for IMEs to be able to distinguish when to show
virtual keyboard vs companion widget based on toolType.
IME receives click toolType in:
1. IMS#onUpdateEditorToolType(int toolType) for every showSoftInput()
called from IMM.
2. Initial value of toolType in EditorInfo#getInitialToolType().
Fix: 233108064
Bug: 210039666
Test: atest StylusHandwritingTest
Change-Id: I91ea9204ef62697b8942b0f350169382f18b3278