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
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
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
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
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
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
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
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
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
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
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
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
This CL removes the logic related to the legacy ActivityView.
Bug: 179161778
Bug: 161810301
Test: build and boot to home.
Change-Id: I757769d3cac89ebddbdc467f533fed99c74941ee
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
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)