Introduce new API to support gesture preview as user is operating over
text.
Bug: 254726230
Bug: 254727073
Test: InputConnectionEndToEndTest
Change-Id: I6c2ac5a5aaeaeab78411d24870f573670304e898
This was pointed out by a presubmit on the previous CL for an individual
JavaDoc entry, but let's fix it for all of them.
Bug: 257028305
Test: none
Change-Id: I4d0aaf3c4d0cb53a532d523a9802c1363e637b50
This CL removes mRequestedVisible from InsetsSourceConsumer since the
information can be queried from InsetsController.
This CL also stores the public insets type in InsetsSourceConsumer.
Eventually, the internal insets type will be removed.
Bug: 253420890
Bug: 234093736
Test: atest ImeInsetsSourceConsumerTest InsetsAnimationControlImplTest
InsetsControllerTest InsetsSourceConsumerTest
Change-Id: I8e2070676d2161cc9e8fc28a3dd49cefb362f26c
This is the 2nd attempt to submit this cleanup [1], after a revert [2] due to some build failure.
This is a follow up CL to our previous CL [3], which introduced
InputMethodManagerService#showInputMethodPickerFromClient(
@NonNull IInputMethodClient client,
int auxiliarySubtypeMode, int displayId);
Somehow the "client" has never been used, which is fine because the
actual caller verification is done by requiring WRITE_SECURE_SETTINGS
permission.
Let's remove such an unused parameter for simplicity.
There must be no observable behavior change.
[1]: I2f27160cbe7d83201c8f52dbb6dcb774a5b8ae43
3efbbb5e49
[2]: I343828ad83d50436211004753f1b9ba1b13b60ca
2fb98cdab1
[3]: Ic7d7c5a7ad8005a3fbd9d1c1b73e3c5a39a07001
0b05f9e49d
Bug: 234882948
Bug: 256952514
Test: presubmit
Test: lunch aosp_bramble-userdebug && make -j
Change-Id: Ia536d8793f0022179dfafd1cbf21091537375992
This is a follow up CL to our previous CL [1], which re-introduced
InputMethodManager#reportVirtualDisplayGeometry()
for some special form factors.
For apps that only aim to bypass display ID mismatch check in
RemoteInputConnectionImpl#requestCursorUpdatesInternal(),
this CL gives a much simpler and easier-to-maintain @hide method
InputMethodManager#setRequestCursorUpdateDisplayIdCheck().
[1]: I35b491da5a340844e17542d7a6198f8152bbeda3
708c957fa3
Bug: 224424149
Bug: 256926300
Test: presubmit
Change-Id: I9e1f62e3d5d2a385dce8a9633b5b73f8e7f0ccef
Add a new group of information related to text appearance in
CursorAnchorInfo, which is extracted from TextView.
Bug: 231894524
Test: atest android.view.inputmethod.cts.CursorAnchorInfoTest#testBuilder
atest android.view.inputmethod.cts.CursorAnchorInfoTest#testEquality
atest android.view.inputmethod.cts.InputMethodServiceTest#testOnUpdateCursorAnchorInfo
Change-Id: I8b96f055506b0a426dcfc6334db867dda7073868
This CL removes an unused method
RemoteInputConnectionImpl#requestCursorUpdatesFromImm(),
which was originally introduced [1] then removed [2], and
accidentally added again [3].
Anyway, this method is no longer used and can be removed safely.
[1]: I3d6b1728d62139785593af14c24cb52bf2c91e31
71aa1a31d1
[2]: Ia72a9fe0ceac1798ee1989eaae3906e8e1b696bf
5854c92bad
[3]: I53bcb62e03ac1c371feb60d1385c88c921754092
3e3ff1a3d2
Bug: 210039666
Test: presubmit
Change-Id: I4d0bf0ac371e1f9f214258906231d6ae85bdce3e
This is a follow up CL to our previous CL [1], which introduced
InputMethodManagerService#showInputMethodPickerFromClient(
@NonNull IInputMethodClient client,
int auxiliarySubtypeMode, int displayId);
Somehow the "client" has never been used, which is fine because the
actual caller verification is done by requiring WRITE_SECURE_SETTINGS
permission.
Let's remove such an unused parameter for simplicity.
There must be no observable behavior change.
[1]: Ic7d7c5a7ad8005a3fbd9d1c1b73e3c5a39a07001
0b05f9e49d
Bug: 234882948
Test: presubmit
Change-Id: I2f27160cbe7d83201c8f52dbb6dcb774a5b8ae43
This is mechanical refactoring that has no behavior change.
- Add missing @RequiresPermission
- Describe when INTERACT_ACROSS_USERS_FULL is required
- Apply the same annotation order
- Use the same import pattern around permissions
Fix: 256239860
Test: presubmit
Change-Id: I5ba2210e4de54b6941dba148471746f20720f9c6
This is a follow up CL to our previous CL [1], which exposed
InputMethodManager#getInputMethodListAsUser(int userId) [2]
as an @TestApi.
One thing to clarify is that INTERACT_ACROSS_USERS_FULL permission is
required when and only when "userId" is different from the one of the
calling process. To make it clear, this CL adds "conditional = true"
like other @RequiresPermission usages in InputMethodManager.
This is just about (Test) API annotation. There must be no observable
behavior change.
[1]: I4b73d9374d7a2ce4c9dfc48682a43d5d48b39042
ec8b1449f2
[2]: I5b50b5fe143c74c87b331bda3e5bcc4d6248436e
d20eef826c
Bug: 256239860
Test: presubmit
Change-Id: I14867e528d4292f1f8713b1d9b491fc5ed6c1abb
We only use parts of Context in the Content Capture manager and
main session, we don't need to cache context object which will
cause some memory issues.
This change will extract the necessary information to save it, instead
of caching the entire context object.
Bug: 256247718
Fixes: 239192932
Test: atest CtsContentCaptureServiceTestCases
Change-Id: Id7b5e8617c521f31879199b0f2c7e18204bb7526
For the app developers to understand the editor view of requesting
showSoftInput requires the view and its window must be focused and
serverd by an input method.
Bug: 256517410
Test: build
Change-Id: Ibe52263a01f62140862527fd59111b914ad5e18c
text to insert should be optional field for InsertGesture. This allows
IME to use this gesture to move cursor.
Fix: 255839545
Test: atest InputConnectionEndToEndTest
Change-Id: Ibbffff210007dc7900b442d3d46232432e5dbbb2
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
Also catch RuntimeException for addToDisplayAsUser in case the throwing
type was not RemoteException.
Bug: 253200800
Test: Simulate to throw a runtime exception in WMS#addWindow, and verify
VRI#setView should catch that exception, and clear resources without
crash.
Change-Id: Ia113b836e4a18c656093f9db7f63e9c50c427e6c
This is a follow up CL to our previous CL [1], which introduced an @TestApi
InputMethodManager#addVirtualStylusIdForTestSession(),
which internally requires INJECT_EVENTS permission.
Now that TEST_INPUT_METHOD is also available [2], let's require it
instead of INJECT_EVENTS for better consistency with other test APIs
defined in InputMethodManager.
This CL also add @RequiresPermission(TEST_INPUT_METHOD) to
InputMethodManager#addVirtualStylusIdForTestSession()
to make it clear that it's guarded with the permission.
[1]: I7399c0a56c04f024d65c16d459818cc2c5cdbc7f
d96ef57bc4
[2]: Ie79a3e9d41ce22605ae083594d639c37d08b7def
b869c78380
Bug: 256239860
Test: atest CtsInputMethodTestCases:StylusHandwritingTest
Change-Id: Icdbb4ade2bd4b5066984e209efcf0ca93bfa08ca