If no window-level handlers have been added, the list is null
(lazily init).
Test: atest com.android.systemui.screenshot.ScrollCaptureTest
Change-Id: I39d4295cebb091fa89f65c5917ba08bc2396ed37
A window with hasFocus set to true, means the window can be focusable.
The current name is confusing when mutliple windows set the field to
true. Rename this to focusable and also remove canRecieveKeys field which
is not used.
Test: presubmit
Test: drag freeform windows
Bug: 151179149
Change-Id: I1b2354da0dc241d5e887e599e43f0426671289b8
The previous logic restores the system bar as long as its insets source
is visible. There can be a timing issue that if the user swipes to show
transient bars while an immersive app just becomes the control target
but the hide-bar info haven't sent to WM yet, WM will re-show the bar
incorrectly.
This CL uses the requested visibility and the behavior to decide if we
should restore the postion and the visibility.
This CL also refines and caches the arguments of showTransient. In this
way, we don't have to create the array every time while invoking that
method.
Fix: 161247175
Test: atest InsetsPolicyTest
Change-Id: Idef314dfe6625399b88b3dacb4c74c7071453497
This new source is for identifying when a screenshot request was
originated by an oem-specific gesture.
Test: N/A
BUG: 164235798
Change-Id: Iece70a2d8767e5873b30407df57b7428dfea7e26
When there is an insets animation, we will stop updating insets source
frames until the animation is done. The previous logic didn't update the
frames within the requested state while the animation is done. And the
frames was relied by InsetsPolicy while playing transient bar animation.
If the frames don't match the display, the insets would be wrong, and
the animation wouldn't be played correctly.
Fix: 161134197
Test: atest InsetsControllerTest
Change-Id: Id8f3c1956fbfe3ad16f167ff76297dde6c634e81
WindowMagnificationAnimationController provides same
functionality but it runs the animation while
enabling/disabling.
This new patch also fixs NPE excetion that happens
when device is in rotation but mirrorWindow is invisible.
Bug: 161669184 163026794 163035371
Test: atest com.android.systemui.accessibility
atest WindowMagnificationGestureHandlerTest
manual Test: enable window magnification to see it
2. close mirroe window and rotate the device
Change-Id: I4531f5c96ea4b91b287cc8c5ffc4c98fc9611dd5
There's a lot of confusing logic where 90 and 270 rotation values need
to be flipped to ensure the screenshot is taken the correct orientation.
There's also confusion what useIdentityTransform means, especially if a
non 0 rotation value is sent.
The cases screenshot cares about is the following:
1. Take screenshot in current display orientation
2. Take screenshot with 0 rotation so the caller can handle rotating the
screenshot themselves.
With these two cases in mind, remove the rotation value passed in for
screenshots. If useIdentityTransform is true, it will rotate the
screenshot so it's in the 0 orientation. If useIdentityTransform is
false, it will use the current display rotation.
This simplifies the caller logic since they no longer have to find the
current display rotation to ensure the screenshot is taken in the
current rotation. The callers can just request the screenshot with
useIdentityTransform set to false.
Test: adb shell screencap
Test: Power + volume screenshot
Test: Screen rotation
Fixes: 135942984
Change-Id: I3435ee8b5dac05e910ec1e695f398c5dcdcff9e9
This reverts commit 1e14e16ac8.
Reason for revert: Breaks fullscreen YouTube playback on wembley
Bug: 163035371
Test: Locally reverted, and now YouTube can play fullscreen on a wembley
Change-Id: I649d651893862b270cb1df14633490748a54bda1
Previous logic in onStateChanged notifies insetsChanged based on the
change of mLastDispatchedState, which can make us dispatch redundant
insets changes to the app.
In this CL, we only notifies insetsChanged if mState is really changed
in onStateChanged -- we use the final mState (after updateState and
applyLocalVisibilityOverride) to compare with the one before changing.
Fix: 161924448
Test: atest InsetsControllerTest WindowInsetsControllerTests
Test: Swipe up to home while IME open and see if there is any jank
Change-Id: Ia536cdf76805caa56ca1b6eaf2b3db83b6ecd94e