Commit Graph

18251 Commits

Author SHA1 Message Date
Jacqueline Bronger
d2a5274d11 Merge "Implement custom PiP close action on TV." into tm-dev am: 3c5b9738c7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17046344

Change-Id: I3735f5a2a7400f155708c95116a0e7b738ebb9e5
2022-03-21 08:10:42 +00:00
Jacqueline Bronger
3c5b9738c7 Merge "Implement custom PiP close action on TV." into tm-dev 2022-03-21 07:56:37 +00:00
Tiger Huang
c3813c81a0 Merge "Push drag-resize mode to the client" into tm-dev am: 883190cdb3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17222863

Change-Id: Ib2c9262b0229579ebe14f4a5b77986b6efa2045d
2022-03-21 06:08:46 +00:00
Tiger Huang
883190cdb3 Merge "Push drag-resize mode to the client" into tm-dev 2022-03-21 05:51:13 +00:00
Tiger Huang
3e194cc9fa Push drag-resize mode to the client
The goal of this CL is to remove RELAYOUT_RES_DRAG_RESIZING_DOCKED and
RELAYOUT_RES_DRAG_RESIZING_FREEFORM, which is a step to make relayout an
oneway binder call.

When the resize mode is changed at the server side, the server will send
the new mode to the client via IWindow#resized, so the client doesn't
need to obtain the resize mode from the flags returned from relayout.

Bug: 161810301
Test: Perform drag-resize and drag-move on a freeform task and see if
      there is any unexpected behavior.
Change-Id: I450abc113932b6c1dc0ce0e2b76bebdf85a60777
2022-03-20 14:36:19 +08:00
Mark Punzalan
bfba432fad Merge "Add package name to all UiTranslationStateCallback methods." into tm-dev am: dc59b8781e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17262916

Change-Id: Ib173b4be60ccb6fbeabf00e3ec050db1a7e2fcea
2022-03-19 23:32:51 +00:00
Mark Punzalan
dc59b8781e Merge "Add package name to all UiTranslationStateCallback methods." into tm-dev 2022-03-19 23:26:16 +00:00
Rob Carr
65a8e6e618 Merge "Async BLAST Sync [2/N]: Introduce seqId" into tm-dev am: 3e6bd44753
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17100718

Change-Id: I8d168e73e7b921ad46776200c8c9d71eae035a5d
2022-03-19 20:12:00 +00:00
Rob Carr
3e6bd44753 Merge "Async BLAST Sync [2/N]: Introduce seqId" into tm-dev 2022-03-19 20:06:11 +00:00
Ahaan Ugale
9f4a06f7ed Merge "Allow AutofillService can identify if fill dialog presentation is needed." into tm-dev am: ff1e4a4680
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17229068

Change-Id: I413ee7c38ffdb10699c348151641f1aee515023a
2022-03-19 06:16:24 +00:00
Ahaan Ugale
ff1e4a4680 Merge "Allow AutofillService can identify if fill dialog presentation is needed." into tm-dev 2022-03-19 06:11:51 +00:00
Mark Punzalan
49525ccb14 Add package name to all UiTranslationStateCallback methods.
This will be used by clients such as Gboard to ensure they are
responding to translation events for the correct activity. Ideally we
would include the activity token, in case there are multiple activities
being translated in an app, but that isn't supported right now and it
requires changes to EditorInfo (in Input Method Framework) to get the
activity token.

Also fixed an issue where the callback methods are invoked twice when
the IME itself is the translated app is registering a callback for
itself. Note: This happens in UiTranslationManagerTest where the test
activity and IME have the same uid, but shouldn't happen outside of
tests.

Bug: 223979041
Test: atest CtsTranslationTestCases
Change-Id: Id99f501b065b92fe3358c2ae525175ad3ea4b119
2022-03-19 05:28:21 +00:00
John Reck
302cf42988 Merge "Add setBuffer w/ release callback" into tm-dev am: bb0809e758
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17242896

Change-Id: I4b69be05b9c57fe5f9c13b5a3b5074d6d25a5d62
2022-03-19 01:50:06 +00:00
John Reck
bb0809e758 Merge "Add setBuffer w/ release callback" into tm-dev 2022-03-19 01:32:25 +00:00
Chavi Weingarten
a4c9a12878 Merge "Replace VRI and SV sync logic with SurfaceSyncer" into tm-dev am: ef3f71bfa8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17014559

Change-Id: I6e5399341b6906f59f2c294d0cfcaa3a62a6c44d
2022-03-19 00:18:02 +00:00
Joanne Chung
23668c560e Allow AutofillService can identify if fill dialog presentation is needed.
If the fill dialog is available for the field, the FillRequest flags
will contain FLAG_ACIVITY_START. The field is hidden originally but
it needs to be get from AutofillService to avoid creating unnessary
fill dialog presentation. Rename the flag because the it's not clear
to combine the relationship with fill dialog.

Bug: 223472039
Test: manual. Build and boot pass.

Change-Id: I52c367e75100f6af2ab782f58755bc5727b1dd72
2022-03-18 22:57:51 +00:00
Chavi Weingarten
ef3f71bfa8 Merge "Replace VRI and SV sync logic with SurfaceSyncer" into tm-dev 2022-03-18 21:18:26 +00:00
TreeHugger Robot
faa01fa2d9 Merge "Add display committed state to DisplayInfo" 2022-03-18 18:10:19 +00:00
John Reck
f6fb6f6288 Add setBuffer w/ release callback
Also tweak SyncFence#getSignalTime javadocs

Fixes: 220897032
Bug: 222095580
Test: SurfaceControlTest
Change-Id: I83c000e1699c95b73ac7b41815e1798475c1a778
2022-03-18 13:42:09 -04:00
TreeHugger Robot
98864c697a Merge changes from topics "presubmit-am-859dd3744ae243f9a8cb2f6234a9ef1e", "register_api" into tm-dev am: 1b58550351
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17182885

Change-Id: I4807ab3b2b84b866535ca919486e555b7dfc27ff
2022-03-18 17:11:23 +00:00
TreeHugger Robot
1b58550351 Merge changes from topics "presubmit-am-859dd3744ae243f9a8cb2f6234a9ef1e", "register_api" into tm-dev
* changes:
  Change parameter order to make it SAM compatible
  Fix a problem that Dialog does not close in new dispatch.
2022-03-18 17:04:05 +00:00
Vadim Caen
3686891611 Change parameter order to make it SAM compatible
Move the callback as the last paramter to registerOnBackInvokedCallback

Test: Existing
Bug: 224562951
Change-Id: I8608a03b53baa04bedee81d2e86b2339abd6c594
2022-03-17 22:19:54 +01:00
Robert Carr
5109c0dadf Async BLAST Sync [2/N]: Introduce seqId
We introduce a seqId and use it to replace the
RELAYOUT_RES_BLAST_SYNC flag. The server code block that
produces RELAYOUT_RES_BLAST_SYNC is guarded by
mNextRelayoutUseSync, and sets it to false when executed.
This block is the only place that sets it to false. We replace
every place where it is set to true, with incrementing a seqId
stored on the integer. We change this block to not check
mNextRelayoutUseSync but instead check if the seqId has changed
since we reached the block. This is evidentally equivalent conditions
and in these cases we send the client the seqId. In the else block
where we wouldn't have sent RELAYOUT_RES_BLAST_SYNC we send -1.
On the client side, we replace the USE_BLAST_SYNC conditional
with a check if the SeqId we received has increased. It's clear
that this will never execute in cases where the seqId is -1. Likewise
its clear that if the seqId has increased, it will execute. Since the
seqId increases in all cases where the server would have returned
RELAYOUT_RES_BLAST_SYNC this change is a noop by itself.

Bug: 161810301
Bug: 175861051
Bug: 175861127
Bug: 200285149
Change-Id: Ib2e45cae7709519251e4bfcc2b8adc689c590a00
2022-03-17 11:20:02 -07:00
Naomi Musgrave
d34b99fe44 Merge "Capture the contents of a single task" into tm-dev am: 4b563a2d37
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17007808

Change-Id: I6478ac55fcc4f349399733c1dc412279358fd844
2022-03-17 17:06:43 +00:00
Naomi Musgrave
4b563a2d37 Merge "Capture the contents of a single task" into tm-dev 2022-03-17 17:03:48 +00:00
chaviw
f37c024b00 Replace VRI and SV sync logic with SurfaceSyncer
Instead of using the count to keep track of sync information in VRI, use
the SurfaceSyncer to handle this. This also means changing SV since SV
would also increment the VRI counter. This cleans up the logic since
code that's used for the SurfaceSyncer can be re-used in VRI.

Test: seamless rotation, launching apps
Bug: 200284684
Change-Id: Ia3c1a13b42ceba29a75425295e41e543a00436a3
2022-03-17 10:13:09 -05:00
Nicolo' Mazzucato
07c6ebdd97 Add display committed state to DisplayInfo
This adds the committed state to the display.
The `state` is used to set the correct power state (e.g. turning display on/off), however there was no way to know when this power state change finished. This new "committedState" aims to fulfill this gap.

DisplayListeners receives a `onDisplayChanged` callback whenever the power state change is fully committed, and can get this information from DisplayInfo.

This will be used in a follow up cl to improve unfold latency performances.

Bug: 223808403
Bug: 220690092
Bug: 197515205
Test: atest LocalDisplayAdapterTest && manual
Change-Id: Ia2fbab768b696c59578d974c88157ee3c8f3ddde
2022-03-17 15:04:22 +00:00
Haoyu Zhang
9c2d22049e Merge "Use long click timeout for handwriting" into tm-dev am: 8987377b63
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17198623

Change-Id: I4d20b727083e15c5dbbe30d12f39ea139273bfff
2022-03-16 23:16:01 +00:00
Haoyu Zhang
8987377b63 Merge "Use long click timeout for handwriting" into tm-dev 2022-03-16 23:01:21 +00:00
Haoyu Zhang
bda185a37c Use long click timeout for handwriting
We've received several feedbacks that the current tapTimeout is too short,
making it very hard to initiate handwriting. To unblock us from bug bash,
this CL temporarily use long lick timeout for handwriting timeout.
Once UX decided the final value for handwriting timeout, we will create
another CL.

Bug: 217603538
Test: atest FrameworksCoreTests:android.view.stylus.HandwritingInitiatorTest
Change-Id: Icb9f49b8b2a49c6c2a13fa377c20a3d1b3bd782c
2022-03-16 21:30:19 +00:00
Jacqueline Bronger
aa3a7e6273 Implement custom PiP close action on TV.
The custom close action will replace the system close action and
the button in the menu will be colored red to be able to tell it
apart.
If one of the custom actions matches the close actions it will be
removed to avoid duplicates resulting from the custom close action.

If the app doesn't close the PiP after five seconds the system will
continue to close the PiP as normal.

Bug: 218487423
Test: manual
Change-Id: Ic3c520c50ac0e3d2f0e73cf2f71d47a4f548f861
2022-03-16 16:32:02 +01:00
Tiger Huang
d200195dad Merge "Remove RELAYOUT_RES_IN_TOUCH_MODE" into tm-dev am: d943f85a2a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17184492

Change-Id: I0d0d26d59d2ed0a26b0582d0ace4871a1e76f94b
2022-03-16 04:29:51 +00:00
Tiger Huang
d943f85a2a Merge "Remove RELAYOUT_RES_IN_TOUCH_MODE" into tm-dev 2022-03-16 04:05:42 +00:00
Garfield Tan
3a6b9741ea Merge "Add argument checks in setScale and setCrop" into tm-dev am: bce590e356
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17127507

Change-Id: I531f9cecd78fb9cecc3f21335c206fa8da87533a
2022-03-15 20:54:43 +00:00
Garfield Tan
bce590e356 Merge "Add argument checks in setScale and setCrop" into tm-dev 2022-03-15 20:53:04 +00:00
Tiger Huang
0cf0d27184 Merge "Use ClientWindowFrames to collect frames computed by WindowLayout" into tm-dev am: c1cf2472f6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17184386

Change-Id: I5ad1afca060454de195761d2f2639c81d36a9194
2022-03-15 19:32:56 +00:00
Tiger Huang
c1cf2472f6 Merge "Use ClientWindowFrames to collect frames computed by WindowLayout" into tm-dev 2022-03-15 18:43:37 +00:00
Haoyu Zhang
df4826996d Merge "Address autoHandwriting API review feedback" 2022-03-15 15:04:10 +00:00
Arthur Hung
fcf7bfc3ef Merge "Prevent NPE for onKeyDown and onKeyUp" into tm-dev am: b1c7853e29
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17130385

Change-Id: Ida011e7f03211d9952df7347bf41e3caad8658c0
2022-03-15 14:48:33 +00:00
Arthur Hung
b1c7853e29 Merge "Prevent NPE for onKeyDown and onKeyUp" into tm-dev 2022-03-15 14:31:28 +00:00
Naomi Musgrave
13194c3ca4 Capture the contents of a single task
Introduces layer mirorring of a single task, given the task is both
identified (future work - dependency on setup flow in SysUI) and the
flag is enabled (currently disabled).

Error handling (tearing down the VirtualDisplay if task recording setup failed)
will come in a future change

Bug: 216625226
Test: atest WmTests:DisplayContentTests
Test: atest WmTests:ContentRecorderTests
Change-Id: I16abd55ce75537ff8fbbb379e4970668ea02a230
2022-03-15 14:13:11 +00:00
Tiger Huang
3072d027ec Remove RELAYOUT_RES_IN_TOUCH_MODE
When WindowManagerService.mInTouchMode is changed, we will set the new
mode to InputManagerService, and clients will be notified via
ViewRootImpl.WindowInputEventReceiver#onTouchModeChanged. We don't need
the flag to bring the information to the client.

This is also a step to make relayout an oneway binder call.

Bug: 161810301
Test: Invoke View#requestFocusFromTouch on one window and see if another
      window can receive OnTouchModeChangeListener#onTouchModeChanged.
Change-Id: Ic149c95bee89b2be83a85eb4858131224b63a7c8
2022-03-15 18:48:07 +08:00
Tony Huang
5f79687ab2 Merge "Fix divider disappear when rotation on shell transition" into tm-dev am: d5cdea4800
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17055968

Change-Id: Ie9e02fafb29785f6fc6a550192942d984e96a72e
2022-03-15 07:52:00 +00:00
Tony Huang
d5cdea4800 Merge "Fix divider disappear when rotation on shell transition" into tm-dev 2022-03-15 07:25:57 +00:00
Haoyu Zhang
f60513917f Merge "Fix: Handwriting only initiate for the first time" into tm-dev 2022-03-15 02:51:33 +00:00
Haoyu Zhang
5159edd4d2 Address autoHandwriting API review feedback
Bug: 218860199
Test: N/A
Change-Id: Ia53b24b9ad4cae5bac547a20bc32749c5eee378a
2022-03-14 19:28:06 -07:00
Rob Carr
9f33e09f0a Merge "WMS/ViewRoot: Prepare for Async BLAST Sync [1/N]" into tm-dev am: 6caacdcf72
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17100717

Change-Id: Ib978f36892c86f7a5544aefd39a61654fc0ebfd5
2022-03-14 23:03:08 +00:00
Rob Carr
6caacdcf72 Merge "WMS/ViewRoot: Prepare for Async BLAST Sync [1/N]" into tm-dev 2022-03-14 22:48:21 +00:00
Haoyu Zhang
1a458ba0ca Fix: Handwriting only initiate for the first time
Handwriting initiator accidentally changes the View's handwriting area.
As a result, it stops working after startHandwriting is called for the
View once. This CL fixed the issue by not exposing the internal
handwriting area Rect object in the View.

Bug: 222117485
Test: manually tested
Change-Id: I5cb6231361fbd7566edddb1aebf7b99330c3a8d8
(cherry picked from commit b1ba2dae29)
2022-03-14 20:23:52 +00:00
TYM Tsai
94fd7386cf Merge "API feedback: Modify javadoc for showAutofillDialog" into tm-dev am: 09e748be5d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17072245

Change-Id: Ieecf5cc47dd1a515ec180981c06b038d1dc9de49
2022-03-14 20:17:26 +00:00