Commit Graph

18155 Commits

Author SHA1 Message Date
Chavi Weingarten
8b58626267 Merge "Changed setSyncTransaction to syncNextTransaction with callback logic." into tm-dev am: 53f62e57cf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16988100

Change-Id: Ifdde57c9a8dd37be46dae07ed37629c8a94fcc49
2022-03-03 22:21:08 +00:00
Chavi Weingarten
53f62e57cf Merge "Changed setSyncTransaction to syncNextTransaction with callback logic." into tm-dev 2022-03-03 22:14:41 +00:00
Riley Jones
d903b03530 Merge "Revert 'Adding definitions for AccessibilityAction directional swipes.'" 2022-03-03 20:04:51 +00:00
Chavi Weingarten
8a93d1378a Merge "SurfaceView: Synchronize all surface view changes with VRI draw" into tm-dev am: 5dcd46d356
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17051013

Change-Id: I8081b90e365829921634576d05b770ea5d572898
2022-03-03 18:25:15 +00:00
Chavi Weingarten
5dcd46d356 Merge "SurfaceView: Synchronize all surface view changes with VRI draw" into tm-dev 2022-03-03 17:57:05 +00:00
Vishnu Nair
797aa0066c SurfaceView: Synchronize all surface view changes with VRI draw
Re landing with the following changes:
We initially cloned the SurfaceControl handle to avoid locking when
accessing the SurfaceControl from the position listener callbacks
running from RT workers. But this meant the last reference to the
layer handle would only be released by GC. If SurfaceViews are
created and destroyed rapidly, we would be at the mercy of GC to
release buffers.

Original change:

There are three transaction queues that can submit SurfaceView
changes.

1. Buffer updates via BBQ apply token
2. SCC apply token
3. ViewRootImpl BBQ apply token

It makes sense for most SurfaceView changes to be synchronized with
ViewRootImpl draws since the caller can optionally synchronize the
change with main window content.

This change eliminates the tmp transaction that is applied directly
via the SCC apply token and instead applies them with the ViewRootImpl
draw transaction.

Also take the opportunity to scope down mSurfaceControlLock usage.

Test: atest SurfaceViewSyncTest
Test: go/wm-smoke
Test: run mem tests via forrest
Bug: b/217973491, b/221631942
Change-Id: Idba712d146e62d7346920dc4f060cba92d47fada
2022-03-03 16:07:15 +00:00
TreeHugger Robot
dc71c6ebf3 Merge "Incorporate API feedback: CAI requestCursorUpdates()" into tm-dev am: 33a2b4bacd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16977626

Change-Id: I29837bf7a2474d1e1f8e4562a54ecc94d50f027b
2022-03-03 13:38:47 +00:00
Robert Horvath
ab0653f04d Merge "Mark focused Views as keep clear areas" into tm-dev am: 1b0ffb5b13
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16932089

Change-Id: Ibcb8325ab419ab29788512162bcd1bc20d45ad25
2022-03-03 13:37:17 +00:00
TreeHugger Robot
33a2b4bacd Merge "Incorporate API feedback: CAI requestCursorUpdates()" into tm-dev 2022-03-03 13:27:04 +00:00
Robert Horvath
1b0ffb5b13 Merge "Mark focused Views as keep clear areas" into tm-dev 2022-03-03 13:14:56 +00:00
Naomi Musgrave
769b37a901 Merge "MediaProjection sets content recording details in WM directly." into tm-dev am: 3302797586
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16933664

Change-Id: Ied0cd35f5fb924b0a47ffa862c9a19c82621606b
2022-03-03 10:52:52 +00:00
Naomi Musgrave
3302797586 Merge "MediaProjection sets content recording details in WM directly." into tm-dev 2022-03-03 10:45:36 +00:00
Vadim Caen
264ed1adbe Merge "Move OnBackInvokedCallback to window package." into tm-dev am: 8fa5667732
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17013983

Change-Id: Id59bf47b6ff48a22218519504c3994804f5cce06
2022-03-03 10:19:19 +00:00
Vadim Caen
8fa5667732 Merge "Move OnBackInvokedCallback to window package." into tm-dev 2022-03-03 10:03:41 +00:00
Robert Horvath
2a9f214e40 Merge "Keep custom keep-clear Rects if preferKeepClear is set" into tm-dev am: e867127174
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16988386

Change-Id: I481575724a5d56493e70f20d66a407f9092e3d4f
2022-03-03 09:17:46 +00:00
Robert Horvath
e867127174 Merge "Keep custom keep-clear Rects if preferKeepClear is set" into tm-dev 2022-03-03 08:37:14 +00:00
Rachel Lee
c04d5b9cb1 Merge "Cleanup Extended frame -> Vsync callback." into tm-dev am: acd10a9a97
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17037018

Change-Id: I700e0a19b6a26cebef3a921491103094e871145b
2022-03-03 01:15:35 +00:00
Rachel Lee
acd10a9a97 Merge "Cleanup Extended frame -> Vsync callback." into tm-dev 2022-03-03 01:05:52 +00:00
Rob Carr
898cb500c5 Merge "ViewRootImpl: Don't pause HWUI so much" into tm-dev am: c406f6afa7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16981759

Change-Id: I7eb53bd945a24bc55f54c7abc3ef83028da8ba60
2022-03-02 21:27:25 +00:00
Rob Carr
c406f6afa7 Merge "ViewRootImpl: Don't pause HWUI so much" into tm-dev 2022-03-02 21:20:46 +00:00
Mark Punzalan
aa26523c55 Merge "Don't cache created Translators in TranslationManager." into tm-dev am: a88f5b74f2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16991523

Change-Id: I304c392af8bcd2ef9205c46c7c09e3612f44f05f
2022-03-02 21:04:06 +00:00
Mark Punzalan
a88f5b74f2 Merge "Don't cache created Translators in TranslationManager." into tm-dev 2022-03-02 20:36:09 +00:00
Naomi Musgrave
27655e1fc3 MediaProjection sets content recording details in WM directly.
Content recording relies upon a class describing current state.
rather than passing around details from media > display > wm.
WMService keeps track of the session in ContentRecordingController.
ContentRecordingController manages hand-off between different
DisplayContent instances, as the session details are changed.

Manually tested that fold/unfold handling when screen recording
from QS tile still works, and that taking over a screen cast
with a screen recording works.

Refactoring logic from DisplayContent into new recording
delegate will come in a future change.

Bug: 216756854
Test: atest FrameworksCoreTests:ContentRecordingSessionTest
Test: atest WmTests:DisplayContentTests
Test: atest WmTests:ContentRecordingControllerTests
Change-Id: Ib4f125dd703d362ac13fcbe469d00b345827e706
2022-03-02 18:32:34 +00:00
Ameer Armaly
34f063c663 Merge "Fix speech state event javadocs per API review." into tm-dev 2022-03-02 17:45:17 +00:00
Tianhao Yao
5ecd6d37de Changed setSyncTransaction to syncNextTransaction with callback logic.
Modified SurfaceView and ViewRootImpl to provide callbacks when syncing
a transaction instead of sending transactions. This will ensure a clear
ownership of the transaction object since it will be provided in the
callback when BBQ adds a buffer into the transaction. Modified JNI to
add compatibility for native functions.

Test: Manual testing from go/wm-smoke.
Test: BLASTBufferQueueTest
Bug: 210714235.
Change-Id: I1f872d6b2846b0d64d5b33b8866d0b2ec7126c8c
2022-03-02 09:55:46 -06:00
Vadim Caen
72077726f5 Move OnBackInvokedCallback to window package.
Originally, View was implementing onBackInvokedDisptacherOwner, but now
only Activity and Dialog and since back event are related to the
window, it makes sense to move them into the android.window package

This follow up comment at:
ag/c/platform/frameworks/base/+/16764116/comments/e131f3ef_e3e1d2e0

Test: atest BackNavigationTests
Bug: 221401221
Change-Id: Ia2f26162beb6a41b6e162b31e599e882f8bf7320
2022-03-02 16:28:57 +01:00
Robert Horvath
52ba29fd8e Mark focused Views as keep clear areas
Mark/unmark Views as keep clear areas as they gain/lose focus
with a small delay.

Test: atest KeepClearRectsTests
Bug: 218494300
Change-Id: I33c89b5d2ed6707f95eca8ec4b5604c9193aec05
2022-03-02 11:21:27 +01:00
Robert Horvath
9a7444cec5 Keep custom keep-clear Rects if preferKeepClear is set
Since ViewParents can be set to not clip their children, custom
keep clear areas can extend beyond the bounds of its hosting View.
If preferKeepClear is set, add the View's bounds as a keep clear area,
but also keep the custom Rects.

Bug: 221073574
Test: atest KeepClearRectsTests
Change-Id: I85a4e4a223fbba787c5afebf2689a031243808d4
2022-03-02 11:20:33 +01:00
Mark Punzalan
e859f4655e Don't cache created Translators in TranslationManager.
Bug: 208599087
Test: atest CtsTranslationTestCases
Change-Id: I0c2f606ef8acc7001beafdd02b48e37e9734182e
2022-03-02 09:10:10 +00:00
Daniel Hsieh
6e6d19d9ee Merge changes from topics "presubmit-am-6d6a4b4f29394bb498818c2f4488d08d", "presubmit-am-b0e37416e8c743989854206f0e1f2acb" into tm-dev am: 6fbd9e7755
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17041346

Change-Id: Iec7fa909df30061c0edc4f00f635a70314aff7a2
2022-03-02 06:40:15 +00:00
Galia Peycheva
9c30808a3c Merge "Add SystemApi to set unrestricted keep-clear rects" into tm-dev am: 96c65d7c31
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16988728

Change-Id: Ib018c06dcf82119f5e0e99ea0ca99e72b1d39ba3
2022-03-02 06:29:37 +00:00
Daniel Hsieh
6fbd9e7755 Merge changes from topics "presubmit-am-6d6a4b4f29394bb498818c2f4488d08d", "presubmit-am-b0e37416e8c743989854206f0e1f2acb" into tm-dev
* changes:
  Add a condition of ime should be visible on tracking typing focus.
  Disables tracking focus on move a11y actions.
2022-03-02 06:28:44 +00:00
Galia Peycheva
96c65d7c31 Merge "Add SystemApi to set unrestricted keep-clear rects" into tm-dev 2022-03-02 06:08:37 +00:00
Ameer Armaly
da8ef6e5a3 Fix speech state event javadocs per API review.
Fix: 219740393
Test: N/A
Change-Id: I1b3be67cdb3986426ef83726ebbc316654012996
(cherry picked from commit c025739eda)
2022-03-02 01:53:24 +00:00
TreeHugger Robot
4c90a34125 Merge "Close Transactions explicitly" into tm-dev am: 6d990b1296
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17047740

Change-Id: I14d40ff05c6b282129061100b8a31d45040c4fab
2022-03-02 01:51:31 +00:00
TreeHugger Robot
6d990b1296 Merge "Close Transactions explicitly" into tm-dev 2022-03-02 01:40:39 +00:00
Daniel Hsieh
711ba689bb Merge changes from topics "presubmit-am-8e1f6f3832184ab4980013d926d31388", "presubmit-am-a0b2814b27254513b7a62e0a1e0044ff" into tm-dev am: 6f06d92d77
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17010923

Change-Id: Id2f1e796c03fc90f14c5e2149fd477f92ad33d4d
2022-03-02 01:22:26 +00:00
Daniel Hsieh
6f06d92d77 Merge changes from topics "presubmit-am-8e1f6f3832184ab4980013d926d31388", "presubmit-am-a0b2814b27254513b7a62e0a1e0044ff" into tm-dev
* changes:
  Enables following typing functionality when the window magnifier is on again.
  Adds moveWindowMagnifierToPosition method
2022-03-02 01:21:14 +00:00
TreeHugger Robot
97eae7e16c Merge "Revert "SurfaceView: Synchronize all surface view changes with V..."" into tm-dev am: 1f014a4a51
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17048246

Change-Id: I1a66c41dd432f1077bf397c347566ed9d4ce43d7
2022-03-01 23:52:51 +00:00
TreeHugger Robot
1f014a4a51 Merge "Revert "SurfaceView: Synchronize all surface view changes with V..."" into tm-dev 2022-03-01 23:50:49 +00:00
TreeHugger Robot
65e5bf07c2 Revert 'Adding definitions for AccessibilityAction directional swipes.'
This reverts commit 0de71ca543.

Reason for revert: Don't yet have a use for the definitions, and will likely reimplement them differently.
Test: Is a reversion.

Change-Id: I99a71551069069d117039af4708030772b741cea
2022-03-01 22:29:36 +00:00
Jared Duke
0a682bf137 Close Transactions explicitly
Ensure one-shot, scheduled Transactions are closed after application.
While individual Transaction instances aren't all that heavy, this
avoids unnecessary GC pressure and churn.

Bug: 216159702
Test: atest WmTests SystemUITests FrameworksCoreTests
Change-Id: Iec053dd8163fb9b300fd1e9eb9f1472a0d0dd782
2022-03-01 11:39:52 -08:00
Taran Singh
472e5c3825 Incorporate API feedback: CAI requestCursorUpdates()
1. Use intDef for CurosrUpdateFilter
2. overload requestCursorUpdates(mode, filter)
3. additional details in javadoc

Fix: 218314883
Bug: 210039666
Test: atest CtsInputMethodTestCases

Change-Id: I1dc5acac4f968b2a2d1780f2ee6c0145c7dcbbaa
2022-03-01 19:05:50 +00:00
Vishnu Nair
8dfd38ad76 Revert "SurfaceView: Synchronize all surface view changes with V..."
Revert "SurfaceView:  Avoid destination frame updates on multipl..."

Revert submission 16944940-sv-changes-tm-dev

Reason for revert: b/221631942
Reverted Changes:
I0d214e3f7:SurfaceView:  Avoid destination frame updates on m...
I0b5741b37:SurfaceView: Synchronize all surface view changes ...
I5226c304b:SurfaceView: Avoid destination frame updates on mu...

Change-Id: I35b7c1be7202ebe89a5309284a9401c8084e9d79
2022-03-01 18:55:13 +00:00
TreeHugger Robot
78840228ee Merge "Introduce a private flag to extend frame with cutout" into tm-dev 2022-03-01 17:00:29 +00:00
TreeHugger Robot
dc9235a15f Merge "[ShellTransition]: add WMS#setRecentsAppBehindSystemBars for recents" into tm-dev am: b419fc8e09
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16972226

Change-Id: Ic950b51c5f9c8c274f708ff5d05caf91e96a9e10
2022-03-01 09:18:28 +00:00
TreeHugger Robot
b419fc8e09 Merge "[ShellTransition]: add WMS#setRecentsAppBehindSystemBars for recents" into tm-dev 2022-03-01 08:53:12 +00:00
Daniel Hsieh
07229fd519 Disables tracking focus on move a11y actions.
After a user perform a11y action, namely moving up/down/left/right, we
have to disable tracking focus functionality.

We refactor #onDrag to a more general term #onMove to cover any move
action which has to disable tracking focus functionality.

Bug: 218935435
Test: atest WindowMagnificationTest
      atest WindowMagnificationControllerTest
      atest WindowMagnificationManagerTest
Change-Id: I578b301645a08c71e874fe2f4fcf2557202abefd
2022-03-01 08:45:31 +00:00
Daniel Hsieh
0dae9e4f47 Adds moveWindowMagnifierToPosition method
For following typing focus feature, we add a
moveWindowMagnifierToPosition method for a window magnifier to move it
to the center of onRectangleOnScreenRequested.

Apart from calling this method to fulfill movement functionality, we can
separate the movement from calling enableWindowMagnification which is a
temporary replacement for movement functionality. Therefore, we can
distinguish whether the it is enabled by the first time or the further
movement behavior. It would help us differentiate the condition whether
we should reset the following typing focus to on/off state. (b/216394179)

Bug: 219654280
Test: atest IWindowMagnificationConnectionTest
      atest WindowMagnificationTest
      atest WindowMagnificationAnimationControllerTest
      atest WindowMagnificationControllerTest
      atest WindowMagnificationConnectionWrapperTest
      atest WindowMagnificationManagerTest
Change-Id: Iaac3ca6868d948571c1aee54a5f122c9697059d8
2022-03-01 08:05:14 +00:00
Rachel Lee
71ba110d91 Cleanup Extended frame -> Vsync callback.
Non-api cleanups.

Bug: none
Test: atest ChoreographerTest
Change-Id: Ieaf40e60e0a98ae7b4ad7f9c79dc87190384a2b5
2022-02-28 15:09:02 -08:00