There are several places that are calling the SC display APIs that were
hidden. They are already protected in SF so all the processes using the
hidden APIs were running as shell. However, we want to remove the APIs
into SF since they create confusion and instead replace with calls to
system server. For now, route the SurfaceControl hidden API calls that
are not used by system server to call through to DMS via the new
MediaProjectionGlobal API.
This will ensure the callers have a release to migrate before we remove
the APIs.
This also partially reverts commit c4bf46c247.
Test: Apps using SurfaceControl hidden display APIs
Bug: 237664947
Change-Id: I859743cb8b10c0352a30280a610b13a4f44f34dc
Add new APIs for select and delete with two rectangles.
Test: atest InputConnectionEndToEndTest
Test: atest StylusHandwritingest
Bug: 239783077
Change-Id: Ia7240d3eaac8610c774c3a4aad074a4b84b71521
The default focus highlight will indicate the focused view in view
system when user navigate the focus without touch.
This CL will clear it if the window focus has lost or it re-entered the
touch mode, so we won't see the wrong highlights in different windows
while using multi-window mode.
Bug: 244273901
Test: atest DefaultFocusHighlightTest
Test: multi-window, use dpad to navigate focus
Change-Id: Iad07c77b4ae16f3c88797eddd749e0aedebdd4fc
Make NativeInputManagerService package-private and remove the
@VisibleForTesting annotation, and update the annotation ordering in the
methods of BatteryState and InputDevice.
Bug: 245989146
Test: Build
Change-Id: I6ea839fac8037c2dd77037aed0d05b0f92ea43e3
Suggest activity titles in setAccessibilityPane
Reference panes in Fragment
Bug: 244788390
Test: n/a
Change-Id: I8d12fe3879d2d05f49e68660af3b181d1dfca229
The InputDevice constructor has many parameters, is used in many tests,
and changes frequently. Use a builder to create InputDevices in tests to
make changing the parameters easier.
Fixes: 245820019
Test: Build, Presubmit
Change-Id: Ic307f112d08805913035ec0d5781cb29030f12c6
The surface size and thumbCenterX/Y use app's coordinate space, which
need to be scaled up on the server side.
Bug: b/239478191
Test: atest DragDropTest DragDropCompatTest
Test: am compat enable DOWNSCALED com.android.dragsource
am compat enable DOWNSCALE_30 com.android.dragsource
Change-Id: Id36caee8aa38885a95f8d237766ac968ef6c8f85
The binder to get latest vsync info is only called if the frame data is
not already available in the current collection of frame timelines. This
means the frame is sufficiently late so it should be fine to call.
Bug: 236889264
Test: atest ChoreographerTest
Change-Id: I4952c2e16cc152f65a513cf340dc2cd9fc694675
The native VelocityTracker has been refactored to allow support of axes
beyond X and Y axes. To conform to this change, we are updating calls to
the native VelocityTracker. Furthermore, to support independent velocity
tracking for separate axes, we are updating the native/JNI methods
accordingly. With these changes, supporting new axes for velocity
tracking would only require changes at the native VelocityTracker level
only (besides creating a public API for our clients).
Bug: 32830165
Test: android.view.cts.VelocityTrackerTest unaffected; touch fling works
Change-Id: Ib0be0fc38c315ade2475cd53597a846e58016d14
Add basic unit tests for BaseInputConnection.
Also some trivial changes in BaseInputConnection:
- Mark some files with @NonNull & @Nullable annotation.
- Fix possible NPE in commitContent().
- Marks public methods for overriding InputConnection interface with @Override.
- Format file via google-java-format.py.
Bug: 240359838
Bug: 241503197
Test: atest FrameworksCoreTests:BaseInputConnectionTest
Test: atest FrameworksCoreTests:SurroundingTextTest
Test: atest CtsInputMethodTestCases:BaseInputConnectionTest
Change-Id: Idf77d69bcd4d84a48742e0d7a24398df3c0ae7f8
When window is removed, there can be a race between a11y and wm,
and sometimes A11yManagerService#sendA11yEvent cannot get a correct
display id.
There's also a case where a11y events for windowless windows don't have
a display id.
This change fixes the issue by populating display id in
A11yWindowManager#DisplayWindowsObserver for windows change events.
Bug: 240888087
Test: AccessibilityWindowManagerTest
Test: CtsAccessibilityServiceTestCases
Change-Id: I441d98e4431913ae24ab354423828d2a031b27b4