Disable end-to-end input latency metric to reduce the
number of JNI WeakGlobalRef acquires per-frame.
Bug: 189738006
Test: Observe trace section no longer appears in calculator
Change-Id: I062dad8e7cec93cca5599e51d2b0b1a1b6e39a07
When a new SurfaceControl was created, the java object's transform
hint was not updated. This created a mismatch between the java and
native objects resulting in the client getting an incorrect transform
hint. Fix this by making the native object the source of truth for
transform hints.
Test: in landscape mode, dismiss apps and check launcher does not reject buffers
Bug: 191841127
Change-Id: Icc87b8cf8158eedb87eea886392a0460a76c6443
These are needed to have a workaround fix for a11y cache filled with
stale data before android T.
NoNonSdkCheck: set maxTargetSdk to S in UnsupportedAppUsage is not allowed yet.
Bug: b/192110374
Test: it builds fine.
Change-Id: Iaa0f68b2b8e4702f6b638cb3060714a22850af7e
This CL logically reverts recent CLs [1][2][3][4][5][6][7][8][9] to
switch back to the previous sync IPC approach in IInputMethodManager
except for the following two IPCs.
* reportPerceptibleAsync
* removeImeSurfaceFromWindowAsync
Reason for revert:
We need more time to understand its performance implications.
[1]: If4b40244a2e0e3b11c38c1da9340ba8e5166ad64
b9590fa1e1
[2]: If79e063641a01b325c63eb9f871f5b992d7c0b72
5a5648dcb5
[3]: I1547b98b2aacf764e33aadc9ab784f2013f58f2f
d833f0dab4
[4]: I646ef4ae0570aae1812ea267f309441fdec6938d
38fd020616
[5]: Iaa63e01453da4ff0e3f446eac036b3be3180cb73
4a820ccc41
[6]: Id516fd1c961f43ac3e139c88d7ed004c188d458b
0a32fd21ef
[7]: Icb396ae5d74060af69c4ecb16723b2e37b9f2067
c4663ba6a9
[8]: I3eafbc28ed3acf3ba859885bf201cb06b3149b94
f226a79fee
[9]: Ic584203c1221fbae17f5e2d8f09e3992df061646
5e2d9f271d
Bug: 163453493
Bug: 174892351
Fix: 190486491
Test: atest CtsInputMethodTestCases
Change-Id: If16ac0de536d9089eb04f6e07b1ee47378124658
Merged-In: If16ac0de536d9089eb04f6e07b1ee47378124658
1. We save Translator WeakReference in ServiceBinderReceiver.
It has a chance the reference is gone even the session is still
alive. Save Translator instead of WeakReference.
2. Fix not access TranslationManager mTranslators, mTranslatorIds in
the lock.
3. Fix protential NPE of resultData access in ServiceBinderReceiver.
Bug: 192205945
Test: manual. The function works.
Test: atest CtsTranslationTestCases
Change-Id: I158901db4bbcd76203c705ab2a34f1e0b37c7565
This flag indicates that the event was modified or generated by an
accessibility service.
It allows apps to tell apart real hardware events, events that are
injected (device id == -1), and events coming from accessibility (has
flag is_accessibility_event).
Events that have gone into accessibility, and got reinjected without
being modified will not be distinguishable from real hardware events.
In the next release, we will make FLAG_IS_ACCESSIBILITY_EVENT public
api. Until then, applications will have to hard-code its value (0x800)
to use it. The value is the same for both KeyEvents and MotionEvents for
convenience.
Bug: 175069843
Bug: 152399927
Test: atest VerifiedMotionEventTest VerifiedKeyEventTest
Test: atest AccessibilityGestureDispatchTest
Test: atest inputflinger_tests libinput_tests GamepadWithAccessibilityTest
Change-Id: I38ac2ab8e19e32cad927742c623f14f43ea0c588
The boolean system property is named as "debug.hwui.webview_overlays_enabled"
Bug: 192267127
Test: change the property value, check presence of Webview Surface
Control
Change-Id: I01e3e26282a5fa79aa504a6e49c5abe1a1c3ea02
Add a new private window attribute for allowing apps to specify the min
display refresh rate in addition to the existing
preferredMaxDisplayRefreshRate. This is useful for use cases such as
keyguard where the refresh rate should be limited to a single value,
and using preferredDisplayModeId would not lock the display
refresh rate, as frame rate override might be enabled.
Test: atest RefreshRatePolicyTest FrameRateSelectionPriorityTests DisplayModeDirectorTest
Bug: 183226498
Bug: 184176119
Change-Id: I343569b3cbccd73001703dca78f0f99e196a4d52
We enable the logs dump in debug rom, we should only dump logs when
the debug flag is on.
Bug: 182433547
Test: Make sure the flag is disable after test and enable during test.
Change-Id: I0a719ee9c545b4e66f3414d7f57f3d959004071e
A native transaction passed from webview is sent back to native side, so java side does not manage the life cycle of the transaction.
Bug: 191414767
Test: Play a video, switch to another app, wait for 10 seconds
Change-Id: I013052c202b445438d6cb6497f5f9a2fc22a2b85
Since setLocusContext() usually manually set/reset by developer to update
the app state, it makes sense to trigger a flushing to deliver the
update events immediately.
Bug: 191169236
Test: manual, check the events flush immediately
Test: atest CtsContentCaptureServiceTestCases
Change-Id: I0c367ec083b96d60600ca375c2d70c53224e9b62
Previously, leashes would be only released by GC in some cases, but the
timing could be late. This CL proactively release them as long as they
are not needed. The cases were:
1. The leashes in DisplayImeController. It didn't release leashes while
receiving a new one.
2. The leashes returned from addWindow/relayoutWindow. The leashes would
be copied to prevent others from releasing them before writeToParcel.
The copied leashes could be redundant after writeToParcel.
3. The leashes held by the client whose window is removed. If a window
is removed, the server won't invoke mClient.insetsControlChanged, so
the client would never get notified about losing control to release
the leashes. This could happen if the window doesn't have an exiting
animation.
Fix: 175851610
Test: Steps in the bug.
Test: Show and dismiss a dialog which doesn't have FLAG_ALT_FOCUSABLE_IM
or any window animation. Repeat this thousands of times. And see
if there are many insets leashes as offscreen layers in `dumpsys
SurfaceFlinger`
Change-Id: I5eb774ac071154a8d7205dbd1ab4a5f8eca215c3
Previously, we only dispatched onEnd if onStart was already dispatched. However,
some animations might get cancelled after onPrepare but before onStart. In that
case, it is rather tricky for apps to actually cancel the animation.
Now we always dispatch onEnd if onPrepare has been dispatched already.
Fixes: 177983907
Test: atest WindowInsetsAnimationControllerTests
Change-Id: I3fa142110bd5593679f87561c138ed3318034fca
Currently, if the view has a TEXT_CHANGED event in the buffer with the
same text, the new event is ignored, even if the Composing or Selection
span is changed.
Bug: 184311217
Test: manual - move cursor quickly and check flushed event
Test: atest android.contentcaptureservice.cts.LoginActivityTest
Change-Id: I4de28576b138225f4e64ed93bcb0b9dd3ed0095c
* This is follow up from previous patch to fix an unresolved
comment.
* We're still changing the clearEvents mechanic to not null the list but
actually clear the list of events. We also change when the
flush->clearEvents call happen during the destroy process so it occurs
on the handlerThread when each session does its own cleanup.
Bug: 185162720
Test: atest CtsContentCaptureServiceTestCases
Change-Id: Ide5490903deec8c4bc8aae5dc76b1fadca29dbd0
Got the wrong number when the window isn't at 0,0.
Bug: 183045126
Test: Examined logs to observe the window's insets didn't affect
position in window.
Change-Id: Id3190a7422a56cbefc64d30a9961674b4822fcc3
Set the root surface control transparent, and set the z order of the newly created child surface control to -1.
A new callback is needed to update root surface control in sync from Java side.
Bug: 186750329
Test: use latest APKs from Webview team, play a video, mini toolbar should be visible
Change-Id: I0b37ee8f83fd2b41ff4f2856dbadd31ff6170baf
Keep onTranslationResponse() only to save TranslationResponse. We can
move set TransformationMethod logic to TextViewTranslationCallback.
With the current implementation, if the developers overrides
onTranslationResponse(), they don't have a chance to use the TextView
default ViewTranslationCallback implementation because they don't set
the TranslationTransformation, they must implement their solution. If
we move logic to TextViewViewTranslationCallback and the developers
only overrides onTranslationResponse(), they still have a chance to
use the default TextViewViewTranslationCallback if the developers set
the TranslationResponse for View.
Bug: 178353965
Test: manual to make sure translation still works.
Test: atest CtsTranslationTestCases
Change-Id: Iada7f3efbbc7705ecf962c78e275ed942816707f