Commit Graph

17487 Commits

Author SHA1 Message Date
Chavi Weingarten
e0bd53631d Merge "Use BBQ syncing instead of blocking in VRI" 2021-10-20 14:06:22 +00:00
Kedar Chitnis
85a3d2366e Removed a extra "the" in comments in file ViewRootImpl.java
Bug: 202689392
Test: N/A
Change-Id: I974d6eb12e007d60b4a48e6e6884229823bcbb9d
2021-10-20 05:31:20 +00:00
Brian Isganitis
b72d2aa8b7 Merge "Expose mirror of wallpaper surface in WindowManagerGlobal." into sc-v2-dev am: e712904779 am: ed2b962341
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16079508

Change-Id: Ib2a951d63da6884ec409c3028bfdcf1f47081e6c
2021-10-20 00:17:46 +00:00
Brian Isganitis
e712904779 Merge "Expose mirror of wallpaper surface in WindowManagerGlobal." into sc-v2-dev 2021-10-19 23:47:17 +00:00
Brian Isganitis
5e3d35c102 Expose mirror of wallpaper surface in WindowManagerGlobal.
Test: Manual
Bug: 188222480
Change-Id: I92302053a797de76aec3c2a25e5d895cfc85e6d5
2021-10-19 15:27:55 -04:00
Tiger Huang
7850aa893b Merge "Move logic about computing window frames to the client side" 2021-10-19 18:20:41 +00:00
Tiger Huang
bd6a43f1eb Move logic about computing window frames to the client side
This CL moves the logic about clipping window frames by display cutouts
to the client side. Without this, the very first window frame might be
incorrect, and that can make the framework dispatch the wrong insets to
the app.

This CL is also a step to layout windows at the client side, and
introduces a new class, WindowLayout, which will contain all the logic
about computing the window frame. For now, it only computes the
display frame and the parent frame, but eventually, it will compute the
window frame.

Bug: 197245443
Bug: 161810301
BUg: 175858823
Test: 1. Steps in b/197245443
      2. atest DisplayPolicyLayoutTests
Change-Id: Icafe76112547f4558c7397a1fc5fd08d87639a4d
2021-10-19 17:48:07 +00:00
Riley Jones
166cf61cdd Merge "Adding definitions for AccessibilityAction directional swipes. Test: CL adds definitions - existing unit tests should still work." 2021-10-19 17:07:27 +00:00
Pablo Gamito
a5e331306c Merge "Add API to allow SysUI/launcher to customize legacy task transition animations" 2021-10-19 12:41:35 +00:00
Sally Yuen
d6a53cc866 Merge "Add drag and drop event ids to intdef" into sc-v2-dev am: 349f251acf am: ac737ddfe9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16032747

Change-Id: Ieadd15d2a3a684072717fba05c2f72e4216a0042
2021-10-18 22:05:14 +00:00
Sally Yuen
349f251acf Merge "Add drag and drop event ids to intdef" into sc-v2-dev 2021-10-18 21:37:45 +00:00
John Reck
a8046acca1 Merge "Fix drawing translationZ to software canvas" 2021-10-18 17:36:28 +00:00
TreeHugger Robot
67a7208574 Merge "Synchronize screen turning on and unfold overlay" into sc-v2-dev am: 6ba778585f am: 89c0796657
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15920768

Change-Id: If231208769fe0115f2c00a181ac3ed08486f6d4b
2021-10-18 12:56:05 +00:00
TreeHugger Robot
6ba778585f Merge "Synchronize screen turning on and unfold overlay" into sc-v2-dev 2021-10-18 12:28:26 +00:00
Riddle Hsu
cb239e078f Remove IApplicationToken
It doesn't expose any function for a long time. So it can be a
simple private inner class only for referencing ActivityRecord.

Bug: 163976519
Test: CtsActivityManagerDeviceTestCases
Change-Id: Id773ac3f0afea198ad4f8b4594d7a4cf0ad98ea8
2021-10-16 00:47:30 +08:00
John Reck
3d7ac279a5 Merge "Mark startRenderingCommandsCapture @UnsupportedAppUsage" 2021-10-15 14:12:25 +00:00
Nick Chameyev
c055dbb324 Synchronize screen turning on and unfold overlay
Changes unfold overlay implementation from a window
to surface control view host. To make sure that the
unfold overlay is drawn by the time when we remove
screen blocker we synchronously apply a transaction
with drawn overlay and apply another empty transaction
with vsyncId+1.

Also these changes disable the unfold transition when
using power button by filtering only first screen turning
on events after unfolding the device.

Bug: 197538198
Test: manual fold/unfolds
Test: killing SysUI process, checking rotation animation, magnification
Test: atest com.android.systemui.unfold.updates.DeviceFoldStateProviderTest
Change-Id: I8e0bc635b041595602145b313548b14fcabd157e
2021-10-15 12:55:16 +00:00
Sally Yuen
0845dffbee Merge "check for null listenerInfo for drag&drop" into sc-v2-dev am: d05867d498 am: e6491c7ec5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16032676

Change-Id: Icebd889a2befe923addcbd77c127e6365a78d2ca
2021-10-15 09:44:54 +00:00
Sally Yuen
d05867d498 Merge "check for null listenerInfo for drag&drop" into sc-v2-dev 2021-10-14 20:35:23 +00:00
John Reck
d4021ca678 Mark startRenderingCommandsCapture @UnsupportedAppUsage
This is to opt-out of hidden api enforcement essentially as
Studio needs to be able to access this symbol regardless
of if it's in an instrumentation test or not.

The API itself isn't really stable, nor a system API,
so making it public & @SystemApi respectively was discouraged.

So keeping it a @TestApi, indicating it's clearly coupled
to the current platform version, and using @UnsupportedAppUsage
to opt-out of hidden api enforcement seems to be the least-worst
combination.

Test: none
Change-Id: Id297107595cc7dfce62661940d5d61ee5efe4d7b
2021-10-14 15:48:10 -04:00
chaviw
76fca86c3d Use BBQ syncing instead of blocking in VRI
BBQ can handle syncing, where it will prevent out of order frames and
ensure multiple syncs can be handled. Therefore, remove the code in VRI
where it blocks for blast sync and instead let BBQ handle it.

Test: Split, Pip
Bug: 200285149
Change-Id: Ia0e403cb36aa3e34b5dd02eef965a3261ba6536a
2021-10-14 11:11:22 -05:00
Vishnu Nair
f57f71db03 Merge "ViewRootImpl: Replace usage of orientation with buffer transform for transform hint" into sc-v2-dev am: fb19c89e4d am: dd8c200bd2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16040767

Change-Id: If7b74fa458c0a2ee14b876a2b3b8fe393fcc85cb
2021-10-14 15:00:03 +00:00
Vishnu Nair
fb19c89e4d Merge "ViewRootImpl: Replace usage of orientation with buffer transform for transform hint" into sc-v2-dev 2021-10-14 14:38:56 +00:00
Naomi Musgrave
2e398596ab PossibleMaximumWindowMetrics reports physical display insets for each am: a77d7425a4 am: 992523e826
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15982549

Change-Id: Iaad54f5a313171ff92f38c1cd65800309be1ef9a
2021-10-14 11:07:00 +00:00
Bernardo Rufino
8e45e3a117 Adjust docs around obscured flags and filter touches API
Only one of FLAG_WINDOW_IS_OBSCURED or FLAG_WINDOW_IS_PARTIALLY_OBSCURED
is ever applied (not both). Updated docs around
setFilterTouchesWhenObscured() to clarify that touches on the view whose
window is obscured *at the touched location* are filtered.

Change-Id: Icaac3373c27d8a79bb0ba0c303d9b61d9e79c6a3
Fix: 185132725
Fix: 162501914
Test: TH passes
2021-10-14 09:59:39 +00:00
Naomi Musgrave
a77d7425a4 PossibleMaximumWindowMetrics reports physical display insets for each
DisplayInfo (current and non-current display)

Changes behaviour from dumbly applying the insets of the current
DisplayInfo to all other DisplayInfo, to reading the insets of each
DisplayInfo into WindowMetrics. Additionally, applies the appropriate
rotation to the insets of each DisplayInfo, so the WindowMetrics
contain the correctly-rotated insets.

Bug: 201546646
Test: Manual
Change-Id: I5756a768b7544939d55d5759f838b27278ca1da6
2021-10-14 07:57:39 +00:00
John Reck
e7c128f492 Fix drawing translationZ to software canvas
Bug: 200578756
Test: DrawingOrderTest#testTranslationZOrder
Change-Id: Ie53a8ab3bcaedfb47f1e109556bf3a649e8a48f4
2021-10-13 13:49:53 -04:00
sallyyuen
9e99ecb34d Add drag and drop event ids to intdef
Also add events to string method

Bug: 202102219
Test: n/a
Change-Id: Ia094f0b007a5158eb6b6911d834d35ef31795776
2021-10-13 06:52:18 -07:00
Wei Sheng Shih
f754d5df69 Merge "Fixes the flicker when transfer splash screen view to client" into sc-v2-dev 2021-10-13 09:32:59 +00:00
Pablo Gamito
d95860a707 Add API to allow SysUI/launcher to customize legacy task transition animations
Launcher needs to be able to customize the task transition to:

1. set the background color during task transitions to the taskbar color when the taskbar is visible.

and, temporarily, at least until tasks have rounded corners rather than being an overlay in the taskbar, we need:

2. a way to specify how much to crop the task by so that the task's rounded corners are visible above the taskbar during animation

3. a way to specify how much to crop the taskbar by so that the taskbar's rounded corners overlay is not visible over the tasks during the animation

Test: None
Bug: 200675009
Bug: 196387647
Change-Id: Ifb7f89e7fde47155eb987161fbbe30e7144103ab
2021-10-12 18:46:30 +00:00
Vishnu Nair
1cc70404b1 ViewRootImpl: Replace usage of orientation with buffer transform for transform hint
Fixes: 202797234
Test: atest VulkanPreTransformTest#testVulkanPreTransformNotSetToMatchCurrentTransform
Change-Id: Iddb2e0b045096b4b86c0bc3f8222b61de67994bc
2021-10-12 09:44:15 -07:00
TreeHugger Robot
5ec5463417 Merge "Rename getSurfaceTransformHint API and switch to using NDK transform constants" into sc-v2-dev am: 492bdf0074 am: 030cee8122
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15937682

Change-Id: Ib479110b56925fc373eeee1a2398fd9ad2e46fb7
2021-10-12 01:05:29 +00:00
TreeHugger Robot
492bdf0074 Merge "Rename getSurfaceTransformHint API and switch to using NDK transform constants" into sc-v2-dev 2021-10-12 00:35:32 +00:00
Vishnu Nair
8eb0c64cf4 Rename getSurfaceTransformHint API and switch to using NDK transform constants
NDK exposes ANativeWindowTransform/NATIVE_WINDOW_TRANSFORM_*. These
constants are aligned with HAL definitions and are used internally to
specify buffer transforms. Native consumers of the transform hint
 are expected to generate ANativeWindowTransform from the hint.

Aligning the SDK and the NDK transform values will make the API
less confusing.

Bug: 196167822
Test: atest AttachedSurfaceControlTest
Change-Id: Ib20be045f6c8c6d7befef93a839a27098da55ffa
2021-10-11 16:28:20 -07:00
sallyyuen
84bcd89352 check for null listenerInfo for drag&drop
Bug: 201778218
Test: n/a
Change-Id: I9c50a429ee409e4a040c03bba9ac28729720a929
2021-10-11 07:23:08 -07:00
Joanne Chung
bcfaf36b3e Merge "Fix not show translation if call startTranslation after pauseTranslation" into sc-qpr1-dev am: e82a38a8ee am: d8b714a0ec am: 804a1c3cdb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16001112

Change-Id: Ic67b20c8d27e1ac8ed1c84e9ddb3a081f92ec0af
2021-10-09 03:12:05 +00:00
Joanne Chung
804a1c3cdb Merge "Fix not show translation if call startTranslation after pauseTranslation" into sc-qpr1-dev am: e82a38a8ee am: d8b714a0ec
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16001112

Change-Id: I8ded71f8811d8d95f7e39c4fa7d4f3177f0ffb3a
2021-10-09 03:01:34 +00:00
Joanne Chung
094b2085be Merge "Fix not show translation if call startTranslation after pauseTranslation" into sc-qpr1-dev am: e82a38a8ee
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16001112

Change-Id: Iaad1e9005b2442bd88a6f767fd774fea94bb26d9
2021-10-09 02:42:24 +00:00
Riley Jones
0de71ca543 Adding definitions for AccessibilityAction directional swipes.
Test: CL adds definitions - existing unit tests should still work.

Change-Id: I624821a366b663adc35d98e3db8d68d324efdf1b
2021-10-07 20:30:00 +00:00
Mark Renouf
3d60f471e7 Ensure cleanup when interrupting scroll capture
A batch of related cleanups and fixes:

 * Connects cancellation signals between the layers of scroll capture.

 * Handles cancellation on dismissal, ensuring clean shutdown of session.

 * Ensures any pending operation is cancelled on the client side and the
   connection is closed.

 * App side of connection handles a crash of SystemUI, ensure close()

 * ScrollCaptureController:
   Moves onCaptureResult to a background thread; it calls into binder.

 * Fixes accuracy and category of some log messages about dismissal
   gesture.

Test: atest ScrollCaptureConnectionTest ScrollCaptureControllerTest
Change-Id: I20014a4cb43e28fcb97f6980fb47af8c06deaca2
2021-10-07 09:44:26 -04:00
Joanne Chung
5667540a7d Fix not show translation if call startTranslation after pauseTranslation
It is possible the developer calls pauseTranslation() to show the
original text but it calls startTranslation() to show translated
text. Ideally the developer should call resumeTranslation but it
also make sense to call startTranslation() to show translated text.

When receiving translation response, we avoid showing transaltion
if the view already has the response and it's the same. But it is
good to also check if the view is showing translated text or not.
If the view is not translated text, it is possible developer calls
startTranslation() instead if calling pauseTranslation() to show
translated again, the fixing can resolve this case.

The issue case can be fixed by this change. But there is a deeper
problem about it's useless the caller call finishTranslation(). This
is planned to be fixed in next release.

Bug: 201238016
Test: manual. The issue case is fixed.
Test: manual. Test some chat apps, it still works fine.
Test: atest CtsTranslationTestCases
Change-Id: I699d0fa1d60ac96db094adcc6e17f4203df03214
2021-10-07 06:04:06 +00:00
TreeHugger Robot
b875beaf85 Merge "Remove parent window from display content" 2021-10-06 14:13:42 +00:00
wilsonshih
379994b4f8 Fixes the flicker when transfer splash screen view to client
Use applyTransactionOnDraw to ensure all transaction happen
during the same frame, including
- hide the starting window.
- reparent the remote SurfaceView to client.

Bug: 198593932
Test: continues launch test app several times then verify with winscope
to ensure there is no flicker anymore.

Merged-In: I03c600afdc477ca0c8064b215f2b361468db9f3c
Change-Id: I03c600afdc477ca0c8064b215f2b361468db9f3c
2021-10-06 11:14:11 +08:00
Tiger Huang
ce87a68694 Remove parent window from display content
This CL removes the logic related to the legacy ActivityView.

Bug: 179161778
Bug: 161810301
Test: build and boot to home.
Change-Id: I757769d3cac89ebddbdc467f533fed99c74941ee
2021-10-06 00:25:45 +08:00
wilsonshih
74f1d7ba8f Fixes the flicker when transfer splash screen view to client
Use applyTransactionOnDraw to ensure all transaction happen
during the same frame, including
- hide the starting window.
- reparent the remote SurfaceView to client.

Bug: 198593932
Test: continues launch test app several times then verify with winscope
to ensure there is no flicker anymore.

Change-Id: I03c600afdc477ca0c8064b215f2b361468db9f3c
2021-10-05 18:26:51 +08:00
John Reck
712eae053c Support dump gfxinfo reset for process' without a Window
Bug: 199791928
Test: manual
Change-Id: I995d236c2c9d60194f72275a3da1c82340f77898
2021-10-01 15:51:48 -04:00
Pablo Gamito
b88b5349d6 [DO NOT MERGE] Dump SurfaceControl's layerId to proto
Test: Data appears in Winscope
Bug: 197712697
Change-Id: Ida47f5506a56b19902fcaafc644d1df34ce6c4a3
(cherry picked from commit 120ee45bd0)
2021-09-30 13:31:22 +00:00
Pablo Gamito
865a06b236 [DO NOT MERGE] Expose SurfaceControl's native mLayerId property to Java
Expose the layerId so that we can dump it in WindowManager proto traces. This is to allow us to link windows to their respective layer accurately and consistently from the trace data. This enables Flicker as a Service (go/wm-fass) to tag and assocaite animations across the WindowManager trace and SurfaceFlinger trace and allows us to better display and associate errors across both WM and SF hierarchy views in Winscope.

Test: N/A
Bug: 197712697
Change-Id: Ic11f33b8dc3e134d6c19ac68bfe03f801af04d06
(cherry picked from commit 9e98140a17)
2021-09-30 13:30:42 +00:00
Mark Renouf
508008be17 Merge "Remove weak reference to prevent loss of callback" 2021-09-29 13:34:40 +00:00
Lucy Chang
0803670751 Merge "Add accessibility uniqueId API to platform" 2021-09-29 07:30:21 +00:00