Commit Graph

19326 Commits

Author SHA1 Message Date
Chavi Weingarten
1e8b7d543a Create DMS wrapper around hidden SC APIs
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
2022-09-16 17:25:36 +00:00
TreeHugger Robot
f2e5051e78 Merge "Support to set the density with uniqueId from WM command" 2022-09-16 01:05:50 +00:00
TreeHugger Robot
797fe18d76 Merge "Don't default accessibilityDataPrivate when the window is FLAG_SECURE." 2022-09-15 20:56:45 +00:00
Sally Yuen
60650c6ea7 Merge "Improve pane javadocs" 2022-09-15 20:41:43 +00:00
Taran Singh
0046013807 Merge "Introduce Scribe Select/DeleteRangeGesture" 2022-09-15 18:00:37 +00:00
Chavi Weingarten
4960560d62 Merge "Migrate screen capture code to ScreenCapture file" 2022-09-15 17:35:56 +00:00
TreeHugger Robot
d0efd7dbee Merge "Add unit tests for BaseInputConnection" 2022-09-15 14:06:02 +00:00
Arthur Hung
e3f0561b7d Merge "Clear default focus highlight when lost window focus or re-enter touch mode" 2022-09-15 01:53:13 +00:00
Taran Singh
85a57bc143 Introduce Scribe Select/DeleteRangeGesture
Add new APIs for select and delete with two rectangles.

Test: atest InputConnectionEndToEndTest
Test: atest StylusHandwritingest
Bug: 239783077

Change-Id: Ia7240d3eaac8610c774c3a4aad074a4b84b71521
2022-09-15 00:36:40 +00:00
Sally Yuen
888772b3f1 Merge "Update View with warnings about settings focus" 2022-09-14 18:56:56 +00:00
Prabir Pradhan
6fa2f081b4 Merge "Clean up some input interfaces" 2022-09-14 18:56:41 +00:00
Sally Yuen
ac24156ed2 Merge "Update View#setContentDescription to advise not setting type or state" 2022-09-14 18:52:42 +00:00
Chavi Weingarten
2b7f2aee30 Migrate screen capture code to ScreenCapture file
Test: ScreenshotTests
Bug: 242714168
Change-Id: I8061f1717cc4e293ee07672d6d415c2c36010ccd
2022-09-14 15:35:46 +00:00
Arthur Hung
5fc73f8f2f Clear default focus highlight when lost window focus or re-enter touch mode
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
2022-09-14 06:43:22 +00:00
Justin Ghan
e4c0e42c12 Merge "APIs for remove space gesture, and join or split gesture" 2022-09-13 22:35:33 +00:00
Prabir Pradhan
0c89829720 Clean up some input interfaces
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
2022-09-13 21:54:55 +00:00
Rachel Lee
148ddcf6b4 Merge "Update vsync info on late frame (Choreographer)." 2022-09-13 20:21:30 +00:00
Sally Yuen
e93fe8da78 Update View#setContentDescription to advise not setting type or state
Bug: 244787982
Test: n/a
Change-Id: Icf2ae256bae7febe7e6750aa9b5dec66968d3883
2022-09-13 00:26:38 +00:00
Sally Yuen
2577cc6ceb Improve pane javadocs
Suggest activity titles in setAccessibilityPane
Reference panes in Fragment

Bug: 244788390
Test: n/a
Change-Id: I8d12fe3879d2d05f49e68660af3b181d1dfca229
2022-09-12 23:53:24 +00:00
TreeHugger Robot
a63c368bd3 Merge "Add Builder to InputDevice for testing" 2022-09-12 20:19:58 +00:00
Justin Ghan
d12fdde387 APIs for remove space gesture, and join or split gesture
Bug: 240436909
Test: atest InputConnectionEndToEndTest
Change-Id: I2f8c511748c9de3a25bd6a17fcf33cc5017dd0e8
2022-09-12 11:13:11 -07:00
Zeyin Wu
8d937f340a Merge "Send AccessibilityEvent.CONTENT_CHANGE_TYPE_INVALID when TextView set errors" 2022-09-12 16:45:38 +00:00
Yeabkal Wubshit
4a8abca2d8 Merge "Reland "Conform to 1D VelocityTracker" (--try 2)" 2022-09-10 04:24:20 +00:00
Yeabkal Wubshit
8fa896d098 Reland "Conform to 1D VelocityTracker" (--try 2)
b7977568d0

Topic for the revert which is being rolled-forward: https://googleplex-android-review.git.corp.google.com/q/topic:revert-19762050-generic_vt-XWGGUQUHYR

Bug: 32830165
Test: android.view.cts.VelocityTrackerTest unaffected; touch fling works

Change-Id: Ifc1e5c3efa06656609ea2021b93706026165af8e
2022-09-09 22:07:35 +00:00
Mark Punzalan
c55c501d92 Merge "Don't reset translation callback with other state" into tm-qpr-dev am: 1eaf0fadf2 am: 017c4aa3f2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19622802

Change-Id: I647a5c1ac900ec110362884eca1d4c1f87752a64
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-09 21:34:13 +00:00
Sally Yuen
45ff81dfcb Update View with warnings about settings focus
Bug: 229991765
Test: n/a
Change-Id: I76b342bde5fc56eb297a0957028c7ea4e1303a16
2022-09-09 21:25:41 +00:00
Mark Punzalan
017c4aa3f2 Merge "Don't reset translation callback with other state" into tm-qpr-dev am: 1eaf0fadf2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19622802

Change-Id: I28d6c241788c00e6c37da211daad7786723002b6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-09 21:16:31 +00:00
Mark Punzalan
1eaf0fadf2 Merge "Don't reset translation callback with other state" into tm-qpr-dev 2022-09-09 20:56:27 +00:00
Xiaowen Lei
f1eee58e12 Merge "Add AppTransition type and remote animation for Dream in occluding Keyguard." 2022-09-09 20:42:05 +00:00
Treehugger Robot
7b03ffc272 Merge "make sure mSurfaceLock.unlock can be executed in unlockCanvasAndPost" am: dcef1fb28a am: e7237b1cfb am: 625d9387a5 am: a1e5845ba5 am: cecb02a175
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2206140

Change-Id: I0f70a7bf51357626a0ff2e0ebbc617be68397ffd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-09 20:06:49 +00:00
Treehugger Robot
cecb02a175 Merge "make sure mSurfaceLock.unlock can be executed in unlockCanvasAndPost" am: dcef1fb28a am: e7237b1cfb am: 625d9387a5 am: a1e5845ba5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2206140

Change-Id: I76d38354459c90f7d932b8f99ad63b4edb5d1ca7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-09 19:37:01 +00:00
Alec Mouri
9f935c2810 Merge "Revert "Support alpha for SurfaceView"" 2022-09-09 19:06:03 +00:00
Yeabkal Wubshit
ab2c164250 Merge "Revert "Conform to 1D VelocityTracker"" 2022-09-09 16:30:16 +00:00
John Reck
09dc5e1e7e Merge "Somewhat improve software drawing" 2022-09-09 13:23:30 +00:00
Sam Dubey
b7977568d0 Revert "Conform to 1D VelocityTracker"
Revert submission 19762050-generic_vt

Reason for revert: b/245842062
Reverted Changes:
I181af7a03:Make VelocityTracker 1D
Ib0be0fc38:Conform to 1D VelocityTracker

Change-Id: Ic669d9988a4807751554e3c57520b33698716fc3
2022-09-09 05:09:34 +00:00
Prabir Pradhan
4310f5d1d3 Add Builder to InputDevice for testing
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
2022-09-09 00:47:35 +00:00
Xiang Wang
9288af93f7 Merge "Scale up the drag drop offsets and surface size" 2022-09-09 00:28:23 +00:00
Prabir Pradhan
3b307a5a26 Merge "Add InputDeviceBatteryListener to InputManager" 2022-09-08 23:51:12 +00:00
Yeabkal Wubshit
77d9c13f08 Merge "Conform to 1D VelocityTracker" 2022-09-08 23:35:04 +00:00
Vaibhav Devmurari
3884f99abe Merge "Add new keycodes to support keyboard backlight up/down/toggle" 2022-09-08 22:48:36 +00:00
Xiang Wang
1e0a4edcc3 Scale up the drag drop offsets and surface size
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
2022-09-08 14:42:54 -07:00
Zeyin Wu
7f8a4a2ff3 Send AccessibilityEvent.CONTENT_CHANGE_TYPE_INVALID when TextView set
errors

Bug: 230141621
Test: atest android.widget.cts.TextViewTest & verified on talkback_tests
Change-Id: I35f60820a5f366f186ff500cbbc77f45c278660d
2022-09-08 19:52:12 +00:00
Rachel Lee
5fa57fc2d8 Update vsync info on late frame (Choreographer).
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
2022-09-08 12:22:33 -07:00
Yeabkal Wubshit
67c8fa68a6 Conform to 1D VelocityTracker
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
2022-09-08 18:21:39 +00:00
Vaibhav Devmurari
bb12898ad3 Add new keycodes to support keyboard backlight up/down/toggle
Test: None
Bug: 245506418
Change-Id: I54b363cb8ae51e7c828cbc9d9dff1d6eb6050e6f
2022-09-08 16:25:12 +00:00
Samiul Islam
3fde6cee3c Revert "Support alpha for SurfaceView"
Revert submission 19562144-surfaceview-alpha

Reason for revert: Presubmit breakage b/245651921
Reverted Changes:
I7510a3a6c:Add CTS for applying alpha for SurfaceView
Ibc14b18f1:Support alpha for SurfaceView

Change-Id: I498c98951a53e6bb1c1251dceb9d150311b07cc8
2022-09-08 14:15:33 +00:00
Lan Wei
1c10a5c2f5 Add unit tests for BaseInputConnection
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
2022-09-08 21:11:28 +08:00
TreeHugger Robot
7b1c680e16 Merge "Populate display id in A11yWindowManager" 2022-09-08 08:56:55 +00:00
Hiroki Sato
58b04e9947 Populate display id in A11yWindowManager
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
2022-09-08 15:11:45 +09:00
TreeHugger Robot
284aecda62 Merge "Move dumpViewInfo from InputMethodManager to InputMethodDebug" 2022-09-08 05:08:49 +00:00