Clarify in javadoc that ACTION_LONG_CLICK does not include coordinate
information.
Bug: 179692809
Test: manual test
Change-Id: I6a4edda48e140f9ba444fdef67feca4d3ed3d146
The locales aren't available on a RESUMED event; now they're stored on a
STARTED event. The crash happens because the default Callback impl
converts the Locale to a string to support a deprecated method.
Fix: 186392998
Test: manual - install test apk which triggers the crash. no crash with
this change.
Change-Id: Iaceca8d29f4c2b0d692c8f6780b0ab963e4e2243
--Updated HWUI holepunch logic for SurfaceView to
also apply the stretch to the hole punch
--Updated RenderNode callbacks to also include
an offset from the ancestor RenderNode that also
has a stretch configured on it
--Added new test activity to verify hole punch
logic
Bug: 179047472
Test: manual
Change-Id: Ibbaf8248a31839ba9dc352ecb9fef54e1276918e
The implementation for drag-and-drop provides two ways of taking URI
permissions: a public API that ties permissions to an activity and
an internal API that grants "transient" permissions. The latter is
used in a single code path: dropping content into an editable
TextView (implemented in android.widget.Editor).
The transient code path was previously (Android R and below)
implemented using a try/finally block in Editor.onDrop. The change
I7ae38069fb741925211b42c7ff28784eb9722ce3 had updated that logic to
tie permissions to the app process lifecycle instead, to account for
the new OnReceiveContentListener which apps can use to implement
custom drop handling (and use a background thread to do the processing
of the content). The problem with having permissions tied to the app
process lifecycle is that the app process could potentially be
long-running.
This change updates the logic to tie transient permissions to the
DragAndDropPermissions object lifecycle (release whenever there are no
more reference to the object and it is garbage collected). This
follows the same approach as used for IME permission grants
(InputContentInfo.java and InputContentUriTokenHandler.java).
Bug: 181178998
Test: atest CtsWindowManagerDeviceTestCases:CrossAppDragAndDropTests
Test: Manually verified using development/samples/ReceiveContentDemo
Change-Id: I950d4572ee19af64da1ace1572fe12e17d09c609
Such that we only set the flag in case window visibility actually
changes. There are a lot of other cases where we need to do a
window relayout which can lead to visible jank.
Test: FrameMetricsListenerTest, manual
Bug: 185902609
Change-Id: Ia09ce640f3a89bf9dd4ff0f4e4469e88a513709a
It turns out that IInputMethodManager#reportActivityView() [1], which
was added a few years ago to support CursorAnchorInfo API on edit
fields hosted on an ActivityView [1], is now also used by task
organizer [2]. This means that we would continue living with this
@hide API for a while even after ActivityView gets completely removed
at Bug 179161778. Then, converting this IPC into truly asynchronous
would probably make sense.
There should be no behavior change unless the target IME client is
running on an embedded display environment.
[1]: Id0411a80456182111bb5b681c6d1230b58e7ec2e
b4f328a2f3
[2]: Id422bb2547197c617f914ed7cf5085e02a1c3fb5
a1f869d10e
Fix: 186874025
Test: atest CtsWindowManagerDeviceTestCases:ActivityViewTest
Change-Id: I0463e8e9daaa8ab6d3eadb395843ca5e6bc1bb5e
mEvents to null to remove possible NPE.
* clearEvents() needs to be called by destroy() which could cause race
condition on whether mEvents is null for other func calls.
Fixes: 185162720
Test: atest CtsContentCaptureServiceTestCases
Change-Id: I7330e651bc890c8a86822158efcf17a61e927112
We only provide text-text capability now and when the UiTranslation
APIs are called, the model files should be ready. To simplify the call
flow, we hardcode the TranslationCapability now. If more capabilities
are supported, we will call the API to get the TranslationCapability.
Bug: 183589662
Test: atest CtsTranslationTestCases
Change-Id: Iea1baac7988402298b2577d03adf9d889f45ad53
Rename Battery to BatteryState, and rename the method hasBattery to
isPresent.
Return NaN in getCapacity() if capacity can not be read.
Bug: 180733860
Test: atest android.hardware.input.cts.tests
Change-Id: I8e855be0b263479c2744b817df5f591c9d1e4a64
Add a debug log to identify calls to showSoftInput from Insets API.
Fix: 1865976
Test: manually using steps:
1. Use an app like launcher that uses Insets API to show IME.
2. dump using adb shell dumpsys input_method
3. Verify log.
4. use another app that shows IME using showSoftInput like gmail
5. verify the log
Change-Id: I6ba0d3f7912855f31e033735557b44eeed3e6652
Add traces to show what messages are currently being handled inside
ViewRootImpl's handler.
bug: 184951839
Test: presubmit
Change-Id: I00c04250b3ea00fb32473d9fa35390510e8692c5
-. Remove VoidResultCallback of updateStatusIcon
and let it be truly asynchronous.
-. Rename this method to updateStatusIconAsync.
Bug: 183587528
Test: atest CtsInputMethodTestCases
Change-Id: Ic7759354ec06a3293ea370ab7afe7422eb2d9356
As CL[1] added the reason field in showSoftInput to expose where the
show request comes from.
Refine the original showSoftInput debug log from CL[2] to add the
reason for helping the issue clarification.
[1]: I390dc029e7bcc30c200926a9bfbbbd0268a1f714
[2]: I67a790f9d98d6131aaf04e4bb98d2a28873d3424
Bug: 182071625
Bug: 171827834
Test: adb logcat -s InputMethodManager:D
Change-Id: I73ab4e2b856669b6b6922ee451da1819e5ca18f4
Explicitly state that when fps=0 the other two parameters
of setFrameRate are ignored.
Bug: 161776961
Test: n/a
Change-Id: If5ecbbf053aa59071f19f6c7ba9ae0af9f15451b
As previously InputMethodManager#toggleSoftInput is designed to tell
InputMethodService directly through IInputMethodSession to toggle
soft-keyboard visibility, this could be happened some unexpected IME
visibility issues that when the app calling this method in the wrong
state like the app toggling IME visibility when the app is off-screen
but unexpectedly it ends up showing soft-keyboard when the IME is in
invisible state.
To minimize the app compatibility without changing the public API
surface and reducing unexpected IME visibilty been toggled behavior
especially happens when switching the apps, changed the internal IPC
protocols to call IMMS#showSoftInput or IMMS#hideSoftInput directly
according the previous IME consumer requested visibility state,
so that in IMMS side can validate to see if the token user is
still focused and ready to toggle the IME visibility to show or hide.
As the result, we deprecated toggleSoftInput and
toggleSoftInputFromWindow to state the reason as the above, and
recommand to use showSoftInput or hideSoftInputFromWindow instead,
so that framework side no longer has to call {InputMethodSessionWrapper,
InputMethodSessionImpl}#toggleSoftInput.
Bug: 182071625
Test: m checkapi doc-comment-check-docs
Test: atest KeyboardVisibilityControlTest#testToggleSoftInput
Change-Id: I390dc029e7bcc30c200926a9bfbbbd0268a1f714