Currently InsetsAnimationControlImpl is heavily rely on
InsetsSourceConsumer and InsetsController on the client side, which
caused difficulties to the server to re-use the code. Decoupling it to
make it re-usable.
This patch made the following changes:
1. Introduce a callback interface to let InsetsAnimationControlImpl talk
to InsetsController.
2. Use InsetsSourceControl instead of InsetsSourceConsumer in the
InsetsAnimationControlImpl.
3. Remove all the consumers in the InsetsAnimationControlImpl.
Test: atest InsetsAnimationControlImplTest
Test: manual test with the new insets API, it works as expected.
Test: go/wm-smoke
Test: atest FrameworksCoreTests:InsetsControllerTest
Change-Id: I30f5aa73ff31e07c0dd8d61edbb208f16c5a6775
There was no need for regionId in the request since you can just replace
the previous region with a new one. This reduces confusion and
simplifies the code. This also allowed TapExcludeRegionHolder to get
deleted and just store the excluded region in the WindowState.
Additionally, this fixed a bug where the excluded region would get
overwritten when the window region was smaller. If the window region was
resized later, the exclude region would remain small.
This is also preparing for more uses of this API with embedded windows
and window magnification.
Test: ActivityViewTest
Change-Id: Ia151115b5a5e8f2ce5e606fe627821dcfef5d9b5
Dispatch the copied insets states and controls if the client and the
server are in the same process. Otherwise, changing them at the server
side will affect ones at the client side, and vice versa.
Bug: 118118435
Test: atest InsetsSourceProviderTest InsetsStateControllerTest
InsetsPolicyTest WindowStateTests CommandQueueTest
RegisterStatusBarResultTest InsetsFlagsTest
LightBarControllerTest RegisterStatusBarResultTest
ViewRootImplTest DisplayPolicyLayoutTests
DisplayPolicyInsetsTests DisplayPolicyTests
TaskSnapshotSurfaceTest NavigationBarColorTest
Change-Id: Iabe9fb1f345f576f08b156f32aa9bd3989911149
This API allows applications to instruct the connected display to do minimal
post processing on the produced image or video frames. This will switch the
display to a low latency mode (ALLM, Game mode or some other custom
implementation thereof), reducing lag in the final images. Thus, minimal post
processing would greatly enhance performance for gaming and video
conferencing applications. It would not, however, suit applications that
prioritise image quality over performance.
This CL adds 2 public method:
- Window.setPreferMinimalPostProcessing()
(this can also be set in WindowManager.LayoutParams.preferMinimalPostProcessing)
If minimal post processing is preferred, the connected display will be requested
to go into low latency mode, which reduces image processing, resulting in better
performance for gaming applications. If the Display sink is connected via HDMI,
the device will begin to send infoframes with Auto Low Latency Mode enabled and
Game Content Type. This will switch the connected display to a lower latency
mode (if available).
For more information, see HDMI 2.1 specification.
If the Display sink has an internal connection or uses some other protocol than
HDMI, effects may be similar but implementation-defined.
- Display.isMinimalPostProcessingPreferred()
Returns true if the connected display supports either Low Latency Mode (ALLM or
some other custom low latency implementation) or Game content type.
Bug: 135116095
Test: make -> flash on ATV OTT device -> open an activity which requests minimal
post processing -> check SurfaceControl logs -> verify correct signals are
passed to native
Change-Id: I5508bb9e5c138b0f2b42d8f8fab10e1915ba3cb6
TaskPositioner attaches the InputEventReceiver to the animation thread.
This CL makes it to dispose the receiver in the same thread to avoid
race conditions.
This CL also makes InputEventReceiver.finalize call dispose from the
right thread.
Bug: 122054478
Fix: 122096091
Test: 1. Make a task enter free-form mode.
2. Drag and drop the task.
3. Check if InputEventReceiver.dispose and finishInputEvent are
executed in the same thread.
Change-Id: I2f8831e7fccca4f96562f2abe4962811339d02e9
Index 4 has already been used for METADATA_MOUSE_CURSOR.
The CL fixes the index for a11y ID from 4 to 5.
Bug: 143734779
Test: None
Change-Id: I295f8d327101c58c0034cf2a39d428d2bb397d0b
Jetpack compose UI wants to respond to the developer setting
that shows the layout bounds of Views to show layout bounds
of it sub-elements. This API gives access to that value.
Bug: 146676765
Test: New CTS test
Change-Id: I1c45f9e6f0ab1192f231ad34df88e392214fa061
- Remove the remote animation definition when the associated process dies
- Also expose method to unregister any registered animation defs
Bug: 139137636
Test: Kill launcher, ensure the remote animation ref is removed
Change-Id: Ia38d037397703221c17c8258ec1a245055d5896d
Also included in this CL
- Cleanup all bounds calculation in PinnedStackController
- Move PipSnapAlgorithm to SysUI
Bug: 139016833
Bug: 139016576
Bug: 145133340
Test: atest PinnedStackTests
Test: atest MultiDisplayActivityLaunchTest
Test: atest MultiDisplaySystemDecorationTests
Change-Id: Ifa0621a1cb69e76498e020aef7d8fa815df4ce48
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.
Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I5be7335b23a92b8ac80d2fd890198273b66ad644
Add a subclass of SurfaceControl.Transaction which can be given a monitor
object at construction. If the monitor is not held when other methods are
called the method will throw an exception. This should help us debug those
hard to find unlocked Transaction access issues that frequently show up. I think
this has been common enough that it's worse keeping a utility around in trunk.
Bug: 146473344
Test: Builds
Change-Id: I3617181745b452fbf9a575fd8e55760df900dd6f
All insets side may want to animate with transparency with or without
insets. This change allows any side to do that.
Also, this CL adds fade to IME when its not controlled by app.
This tries to replicate original IME animation.
Bug: 111084606
Test: Manually using test app.
Change-Id: I1ecd4715336a58cd904b2898bb36462e5ce2b6ab
Introduce HardwareRendererObserver to isolate the android.graphics
package from the android.view package. The native code that
interacts with the observer was also moved from libandroid_runtime to
libandroid_graphics to keep it within the confines of the UI Rendering
module.
Bug: 137655431
Test: CtsUiRenderingTestCases
Change-Id: Ibccecbeda0c4d9501d86514a53eb98548233ba6a
Check if the system wallpaper is wcg and request a wcg surface if yes.
Also take multiple display case into account.
Bug: 136338733
Bug: 74008618
Test: Manually
Change-Id: I830dca97be61401453dffb892a7beb8afc0a32f4
This completes the recent work to switch from a list of allowed display
configs to a default config + min/max frame rate.
Bug: 142507213
Test: Ran on a device with refresh rate switching, confirmed expected
60/90 switching behavior when touching the screen.
Test: Launched Google Maps on a device with 60/90 switching, confirmed
the device stays at 60fps.
Test: Checked dumpsys output, confirmed new display config specs
formatting looks good.
Test: Ran on a device with refresh rate switching disallowed via the
ro.surface_flinger.refresh_rate_switching sysprop, and confirmed
we don't do refresh rate switching.
Test: Ran on a device that doesn't support refresh rate switching, and
confirmed normal behavior.
Test: Tested surface flinger's display config back door, confirmed it
still works.
Test: Inspected log output, made sure there's nothing weird.
Test: Ran unit tests for DisplayModeDirector, LocalDisplayAdapter, and
RefreshRateConfigs.
Test: atest FrameworksServicesTests
Test: atest FrameworksMockingServicesTests
Test: adb shell /data/nativetest64/libgui_test/libgui_test
Test: adb shell /data/nativetest64/libsurfaceflinger_unittest/libsurfaceflinger_unittest
Change-Id: If1417dbb5723df3386db15b2d968cfd164c2615b
Fixed a clear copy/paste error, docs had said "call getHeight() to
get the width" when it should have been "...to get the height".
Skipping staging since it's a simple text change.
Change-Id: Ic06557ac38517f409943585054835d774240ccf3
Test: make ds-docs
Exempt-from-owner-approval: Docs-only change
Bug: 144537947
- Rename WindowInsetsAnimationListener to
WindowInsetsAnimationCallback
- Make onAnimation WindowInsetsAnimationCallback.onStarted
hierarchical by giving the client a chance to consume
AnimationBounds, which then will be dispatched to its children.
- Clarify that WindowInsetsAnimationController insets are always
relative to the window.
- Introduce progress variable for inset animations. Since
DecorView will be consuming insets, apps still need a way to
calculate the full progress. Instead of also dispatching the root
insets, we offer a animation progress instead.
Bug: 111084606
Test: CTS will be added in the future
Change-Id: I7df27581d01c1db0118eef469ec089249012ba5f