Commit Graph

16708 Commits

Author SHA1 Message Date
TreeHugger Robot
c406ed409f Merge "AttachedSurfaceControl: Respond to API feedback." into sc-dev am: ab367ab510
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14443528

Change-Id: I5379ca05d097ffd510245f611bdd90263b901206
2021-05-11 19:46:19 +00:00
TreeHugger Robot
ab367ab510 Merge "AttachedSurfaceControl: Respond to API feedback." into sc-dev 2021-05-11 19:13:05 +00:00
TreeHugger Robot
ed63ba4f24 Merge "Add android: to text constant to prevent namespace conflicts." into sc-dev am: d85097d1ad
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14444768

Change-Id: Ia43e71acb33caf6c417d0c9857f651b758e77dc2
2021-05-11 12:55:06 +00:00
TreeHugger Robot
d85097d1ad Merge "Add android: to text constant to prevent namespace conflicts." into sc-dev 2021-05-11 12:50:54 +00:00
Rob Carr
b29c9c0a5d Merge "SyncRtSurfaceTransactionApplier: Improve thread safety" into sc-dev am: 84c2f5bf21
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14445476

Change-Id: I1b95bcd15fd06fa5af3ac61b1cdfe51fe6c088f8
2021-05-07 22:26:46 +00:00
Adam He
b9cdc84c87 Add android: to text constant to prevent namespace conflicts.
Fixes: 187219011
Test: atest CtsTranslationTestCases
Change-Id: I980156c8653581aa5020afaa5bcb97e909d291df
2021-05-07 15:14:30 -07:00
Rob Carr
84c2f5bf21 Merge "SyncRtSurfaceTransactionApplier: Improve thread safety" into sc-dev 2021-05-07 22:11:00 +00:00
TreeHugger Robot
c2e0167133 Merge "Add NO_FOCUS_CHANGE flag to MotionEvent" into sc-dev am: 14449b8794
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13837775

Change-Id: Ie3c4a1ab687f24f01516de877baada85461bbad1
2021-05-07 21:14:16 +00:00
TreeHugger Robot
14449b8794 Merge "Add NO_FOCUS_CHANGE flag to MotionEvent" into sc-dev 2021-05-07 20:54:30 +00:00
Robert Carr
e9ea91f47d SyncRtSurfaceTransactionApplier: Improve thread safety
If the calling thread releases the SurfaceControl passed
to SyncRtSurfaceTransactionApplier concurrently with the
applier preparing the transaction, this can lead to a
synchronization error and a crash. Once the state is
inside the transaction no further synchronization is required
as the native transaction will hold its own sp<SurfaceControl>
reference. By constructing the Transaction on the calling thread
and deferring application to the RenderThread we enable the calling
thread to not have any release synchronization requirements with
RenderThread.

Bug: 186391509
Change-Id: I585e1a9d3baf9ea384b00408b6253f34487d5037
2021-05-07 18:53:00 +00:00
TreeHugger Robot
7193a0e774 Merge "Add a default implementation of UiTranslationStateCallback#onResumed." into sc-dev am: d8ef2b30f4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14456467

Change-Id: I6ff6957ae56a8dc8326c55781c8363178fe1d854
2021-05-06 23:22:23 +00:00
TreeHugger Robot
d8ef2b30f4 Merge "Add a default implementation of UiTranslationStateCallback#onResumed." into sc-dev 2021-05-06 23:07:12 +00:00
Evan Rosky
2a81664af7 Merge "Compat-rotate motion-events injected into dispatcher" into sc-dev am: afb641756c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14420416

Change-Id: Ia10e95c5b2333c6ec8e756716288afe38491c71d
2021-05-06 22:14:17 +00:00
Evan Rosky
afb641756c Merge "Compat-rotate motion-events injected into dispatcher" into sc-dev 2021-05-06 22:08:20 +00:00
Ahaan Ugale
ebc8d5154a Add a default implementation of UiTranslationStateCallback#onResumed.
This is temporary, to avoid breaking clients that already implemented
the API before onResumed was added.

Bug: 185274258
Test: manual
Change-Id: Icd2c392e248f01c22b95e0b88ba56847ae71f10a
2021-05-06 13:48:58 -07:00
Evan Rosky
1476d63b2b Compat-rotate motion-events injected into dispatcher
With the flag, dispatcher operates in physical space, so
if injecting into dispatcher, the events need to be 'un'rotated.

Bug: 179274888
Test: atest Launcher3Tests:com.android.launcher3.ui.TaplTestsLauncher3
Change-Id: I9abdfd0540354ab6e3eac34ae15b784c0fcf6e2e
2021-05-06 12:18:42 -07:00
Evan Rosky
393d5343f8 Merge "Revert "Add reporting to monitor apps incorrectly using getRaw"" into sc-dev am: 0214d012f6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14443843

Change-Id: I3d1fe904c92e2f603afb5b2edf95e2c69e4f3b83
2021-05-06 17:19:14 +00:00
Evan Rosky
abc24090f0 Revert "Add reporting to monitor apps incorrectly using getRaw"
This reverts commit 8b82086722.

Reason for revert: Metrics no-longer needed, we are adding compat for this.

Bug: 187153492
Test: N/A
Change-Id: I31bbe36378a2da969a094405b0e0a7b7b9cde3a0
2021-05-06 01:44:51 +00:00
Robert Carr
599f912e4e AttachedSurfaceControl: Respond to API feedback.
"Root" is eliminated from the interface name as it is a property
of the object and not the interface, but remains highlighted in the
getters to express the relationship between the called and returned
object.

Bug: 185365821
Test: Existing tests pass
Change-Id: I163fc23f2c37c984ef3ffeb7514c4d8c1c1a3f90
2021-05-05 14:28:25 -07:00
John Reck
ec5d34c9a4 Merge "Don't animate invisible views" into sc-dev am: bd78fd02de
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14427876

Change-Id: I6e31a282673b89e79d9dad68a547d068d39344fc
2021-05-05 18:39:27 +00:00
John Reck
bd78fd02de Merge "Don't animate invisible views" into sc-dev 2021-05-05 18:19:40 +00:00
Joanne Chung
fd86960f3c Merge "API feedback: seperate start and resume state for UiTranslationStateCallback" into sc-dev am: bd351242a9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14410478

Change-Id: I6b33f2e4c08969931efcabac95f4433f555c5dda
2021-05-05 07:02:11 +00:00
Joanne Chung
bd351242a9 Merge "API feedback: seperate start and resume state for UiTranslationStateCallback" into sc-dev 2021-05-05 06:36:24 +00:00
Lucy Chang
5890261035 Merge "Correct typo in TYPE_SYSTEM description" into sc-dev am: bb52fabf07
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14419583

Change-Id: I62b71e16c3ce071b34fe500216e0c3857a036453
2021-05-05 04:33:05 +00:00
Joanne Chung
8e9d678ff0 API feedback: seperate start and resume state for UiTranslationStateCallback
Bug: 185274258
Test: manual
Test: atest android.translation.cts.UiTranslationManagerTest

Change-Id: Ic2246a9ef64a214ce39e187056a9add56e616d1a
2021-05-05 12:31:25 +08:00
Lucy Chang
bb52fabf07 Merge "Correct typo in TYPE_SYSTEM description" into sc-dev 2021-05-05 03:36:26 +00:00
Lucy Chang
4aabd635cc Merge "Clarify javadoc for ACTION_LONG_CLICK" into sc-dev am: 4bdb297c10
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14419580

Change-Id: Ia367ff12d9bfd6bdda43ba56aafc437f3c9642ea
2021-05-05 03:22:24 +00:00
Lucy Chang
4bdb297c10 Merge "Clarify javadoc for ACTION_LONG_CLICK" into sc-dev 2021-05-05 03:17:36 +00:00
Nader Jawad
af62127679 Merge "Update hole punch logic in HWUI" into sc-dev am: 603d612707
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14244206

Change-Id: I25572446223bf7266c05d6442e0415065f774a83
2021-05-05 03:05:11 +00:00
Nader Jawad
603d612707 Merge "Update hole punch logic in HWUI" into sc-dev 2021-05-05 02:59:18 +00:00
Adam He
b1c38e934a Merge "Remove logging of translation requests/responses/chat related views." into sc-dev am: 20e9693c3e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14344117

Change-Id: I5ab1f6d327c1c44ab2af1999811297caefca0945
2021-05-05 02:08:29 +00:00
Adam He
20e9693c3e Merge "Remove logging of translation requests/responses/chat related views." into sc-dev 2021-05-05 01:26:30 +00:00
John Reck
12bb4739d2 Don't animate invisible views
Bug: 184230269
Test: wasn't
Change-Id: Iec6eefedc2c82750ea721ae3d1184be1939066ef
2021-05-04 13:53:01 -04:00
Joanne Chung
6794cd3279 Merge "Fix UiTranslationStateCallback crash due to null locales." into sc-dev am: 2c6a3b5cd0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14419522

Change-Id: I512192dc55bfac4cd62a27cd12bee182aa21acaa
2021-05-04 13:43:44 +00:00
Joanne Chung
2c6a3b5cd0 Merge "Fix UiTranslationStateCallback crash due to null locales." into sc-dev 2021-05-04 13:26:01 +00:00
Jorim Jaggi
40b4218c1a Merge "Mark first frames in metrics properly" into sc-dev am: a4d6988f12
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14411196

Change-Id: Ie450ade8a74dfadcc84918882b026cd0710d462b
2021-05-04 11:16:35 +00:00
Jorim Jaggi
a4d6988f12 Merge "Mark first frames in metrics properly" into sc-dev 2021-05-04 10:55:59 +00:00
lucychang
272103f2b7 Correct typo in TYPE_SYSTEM description
Correct typo in TYPE_SYSTEM description

Bug: 149000879
Test: manual test
Change-Id: Id98036af9b23de31e0980c80129c0d69452ccfa7
2021-05-04 16:34:35 +08:00
lucychang
de719fd8cf Clarify javadoc for ACTION_LONG_CLICK
Clarify in javadoc that ACTION_LONG_CLICK does not include coordinate
information.

Bug: 179692809
Test: manual test
Change-Id: I6a4edda48e140f9ba444fdef67feca4d3ed3d146
2021-05-04 15:26:37 +08:00
Ahaan Ugale
e19085a0cd Fix UiTranslationStateCallback crash due to null locales.
The locales aren't available on a RESUMED event; now they're stored on a
STARTED event. The crash happens because the default Callback impl
converts the Locale to a string to support a deprecated method.

Fix: 186392998
Test: manual - install test apk which triggers the crash. no crash with
 this change.
Change-Id: Iaceca8d29f4c2b0d692c8f6780b0ab963e4e2243
2021-05-04 05:35:26 +00:00
Nader Jawad
197743ff9c Update hole punch logic in HWUI
--Updated HWUI holepunch logic for SurfaceView to
also apply the stretch to the hole punch
--Updated RenderNode callbacks to also include
an offset from the ancestor RenderNode that also
has a stretch configured on it
--Added new test activity to verify hole punch
logic

Bug: 179047472
Test: manual
Change-Id: Ibbaf8248a31839ba9dc352ecb9fef54e1276918e
2021-05-03 18:08:47 -07:00
Adam He
7fa1b19c86 Remove logging of translation requests/responses/chat related views.
Bug: 176208267
Test: manual verification
Change-Id: Id76ac895c263a32506df6a6dc6a09495904e20cb
2021-05-03 17:29:10 -07:00
Nikita Dubrovsky
5dd1d1490a Merge "Release drag-and-drop URI permissions on gc if not tied to an activity" into sc-dev am: f3c059b9f0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14344094

Change-Id: If433da500c2b48ccb3825c096920ccc0ce93fb42
2021-05-03 22:15:07 +00:00
Nikita Dubrovsky
f3c059b9f0 Merge "Release drag-and-drop URI permissions on gc if not tied to an activity" into sc-dev 2021-05-03 21:53:10 +00:00
Nikita Dubrovsky
f333d26f0d Release drag-and-drop URI permissions on gc if not tied to an activity
The implementation for drag-and-drop provides two ways of taking URI
permissions: a public API that ties permissions to an activity and
an internal API that grants "transient" permissions. The latter is
used in a single code path: dropping content into an editable
TextView (implemented in android.widget.Editor).

The transient code path was previously (Android R and below)
implemented using a try/finally block in Editor.onDrop. The change
I7ae38069fb741925211b42c7ff28784eb9722ce3 had updated that logic to
tie permissions to the app process lifecycle instead, to account for
the new OnReceiveContentListener which apps can use to implement
custom drop handling (and use a background thread to do the processing
of the content). The problem with having permissions tied to the app
process lifecycle is that the app process could potentially be
long-running.

This change updates the logic to tie transient permissions to the
DragAndDropPermissions object lifecycle (release whenever there are no
more reference to the object and it is garbage collected). This
follows the same approach as used for IME permission grants
(InputContentInfo.java and InputContentUriTokenHandler.java).

Bug: 181178998
Test: atest CtsWindowManagerDeviceTestCases:CrossAppDragAndDropTests
Test: Manually verified using development/samples/ReceiveContentDemo
Change-Id: I950d4572ee19af64da1ace1572fe12e17d09c609
2021-05-03 16:36:56 +00:00
TreeHugger Robot
199336b156 Merge "Fix SurfaceControl.setDisplayBrightness error msg" into sc-dev am: fe4a41f16b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14394893

Change-Id: I208d29c98cc1adaf61a3af86985cfb2d1b7d787d
2021-05-03 16:07:58 +00:00
TreeHugger Robot
fe4a41f16b Merge "Fix SurfaceControl.setDisplayBrightness error msg" into sc-dev 2021-05-03 16:02:07 +00:00
Jorim Jaggi
9516605d63 Mark first frames in metrics properly
Such that we only set the flag in case window visibility actually
changes. There are a lot of other cases where we need to do a
window relayout which can lead to visible jank.

Test: FrameMetricsListenerTest, manual
Bug: 185902609
Change-Id: Ia09ce640f3a89bf9dd4ff0f4e4469e88a513709a
2021-05-03 15:49:25 +02:00
TreeHugger Robot
93647df771 Merge "Make IInputMethodManager#reportActivityViewAsync() truly async" into sc-dev am: 096c8547d3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14391522

Change-Id: Iff394739d5d27e0cc1ceb15e42c37589b07f092f
2021-05-01 08:05:35 +00:00
TreeHugger Robot
096c8547d3 Merge "Make IInputMethodManager#reportActivityViewAsync() truly async" into sc-dev 2021-05-01 07:51:21 +00:00