1) Add OneHandedEventCallback for WMShell to register
callback, and if one handed mode settings set show
notifications, when user tap one handed mode shortcut
notify WMShell send KEYCODE_SYSTEM_NAVIGATION_DOWN
through OneHandedEventCallback with SysUIMainExecutor.
2) Add isReady() flag in OneHandedDisplayAreaOrganizer
and Simplify the flow of onActivatedActionChanged()
to prevent potential race problem while auto-enable
One-handed and immeditately startOneHanded(), however,
DisplayAreaOrganizer#onDisplayAreaAppeared() may not
ready for transtion yet, and result mState keep in
unfinsihed STATE_ENTERING.
3) Adjust the transiton duration from 800ms to 600ms
800ms is a little bit long to affect timing of
apply runtime overlay package.
4) DelayExecute setEnabledGesturalOverlay() until
transition finised and at most delay once.
- onSwipeToNotificationEnabledChanged() : DelayExecute
- onEnabledSettingChanged() : DelayExecute
- Ctor setupGesturalOverlay() : No DelayExecute
- mState.isTransitioning() : DelayExecute
Test: WMShellUnitTests
Bug: 182425480
Change-Id: I2615c3b30ad95a858510b4bcc73d8f343843fc96
The PipResizeGestureHandler was previusly signaling a start
of the pinch resize without checking that both pointers were
within the PIP bounds region. This caused the TouchState to
be reset with a single tap outside the PIP window while
drag-moving it with another finger, which led to PIP becoming
stuck without snapping to the edges.
With this CL, we make sure that both fingers are inside PIP
before starting resetting the touch state and allowing the
pinch resize to start.
Bug: 188640607
Bug: 186607893
Test: move the PIP with one finger and while still holding it
tap anywhere outside of PIP with another finger - verify you
can still keep moving the PIP with the first finger normally.
Change-Id: I2137180ea1f333fe2e0b67e52d57da5ff9a2d094
The SurfacePackageViewHost was never release, leading to a leak of its
surfaces.
This CL ensure it is released:
- Directly in the shell if the SplashScreenView was not copied
- From the client, through the window manger and then to the shell if
the splash screen was copied in the client process
Test: Manually tested with app setting by checking if the surfaces
are actually removed (winscope + logs) in the following scenarios:
- When the application registers an OnExitAnimationListener
and calls remove(),
- When the application registers an OnExitAnimationListener
and dies without calling remove()
- When the applicaiton does not register an OnExitAnimationListener
and the shell removes the splash screen
Bug: 189759180
Change-Id: Ib68bfffad6720911368739d7dd87d8a03034c589
There were a couple of issues:
1) onActivityRestart wasn't checking for bubbles in the overflow
so there were cases where we could open a bubble but weren't
2) delay opening the bubble until after the transitions have
happened when launching from a widget, the transition could
alter the placement of the bubble's surface resulting in
weird UI.
Test: atest LaunchConversationActivityTest
Test: manual 1) have a bubble & convo widget for it
2) tap on the widget => bubble opens normally, close
the bubble & repeat that a bunch
1) have an unopened bubble & convo widget for it
2) get enough bubbles to push it out of the stack &
out of the overflow
3) tap on the widget => bubble opens
1) have a bubble & convo widget for it, dismiss bubble
2) tap on the widget => bubble opens normally
Bug: 188306336
Change-Id: Id68ccbfbfc6fc6949cfc257df4706b470fb78569
- Need to give it an elevation
- Need to make sure to bring the bubble container
in front of it so that they appear on top
Test: manual - have at least 2 bubbles, expand the stack, drag
the bubble that is not expanded to the dismiss view
=> observe that the dismiss view is above the expanded
view & below the bubble
Bug: 190478161
Change-Id: Ifbce49211b2342c3e197168af38f4c2ca9a1904b
Switch is CompoundButton(View) and animating position when user
tap on it. Unfortunatly when set overlay pakcage enabled, Switch
componet will invoke onLayout() and cancelPositionAnimator(),
that result the UX feel jank.
We add a delay(250ms) before execute runtime resouce overlay
to ensure the widget animation finished first.
Test: Manual Settings > Gesture > One Handed Mode > Tap Switch
Bug: 190584055
Change-Id: Ia42fdf3ed699afd51c154cb0a53581ef67959c71
Remove the callback to update bounds in
resizeAndAnimatePipUnchecked because:
1. animateResizePip already attaches a callback to update the
bounds state in onAnimationEnd
2. it updates the bounds too early before finishResize() is
called, which causes finishResize() to not know the pre-resize
bounds needed to perform the crossfade animation
Bug: 188829986
Test: enter PIP with seamless resize turned on, double-tap to
expand and unexpand, crossfade animation looks right
Change-Id: Id64222fe762b4db0d9ea739db434e8e6acb0b31a
Let empty-style splash screen do reveal animation.
Also remove the extra animation duration if the icon is empty.
Bug: 190695897
Bug: 190695665
Test: manual
Test: atest SplashscreenTests
Change-Id: I8b3b52369c12fbddc32af8c40f37650cc84a88dd
At max size, doing a brute percentage calculation using width / minWidth
ends up with a magnetic distance that's too big. Divide by 2 again to
make it more natural.
Bug: 190657668
Test: Pinch to max size, drag down - doesn't immediate snap to it
anymore
Change-Id: Ib5de742b753239a151686c1a85b27a6fe553a577
When entering PiP from landscape mode with non-default aspect ratio, the
onMovementBoundsChanged callback will try to reset the surface with the
default bounds. Skip it if we are waiting for fixed rotation to be
completed, similar to the exiting swipe-pip-to-home check.
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/cTmovQdIAyqu5rCrJGtf0q
Bug: 190651955
Test: follow the reproduce steps, see video
Change-Id: I71a427351f5e080b4307ebe0a30659a3617d4a58
- Technically the IME window is above the Bubble window, but when
traversing the windows top-down for calculating the final exclusion
region for SysUI, the IME is placed just above its target (the
embedded task), and the Bubble's full touchable region effectively
overrides the IME's requested exclusion region
Fixes: 190338512
Test: Expand a bubble, swipe from IME edge
Change-Id: Idd71eabfaba1be4bc6fc90d09db28d3f9e9106c5
If the frames of insets source window and the frame of an app window
are changed in the same layout pass, we should dispatch the insets
calculated from the new insets source frames and the new app window
frame. So when the app frame is not up-to-date, we defer dispatching
insets to the app.
Fix: 160732586
Test: Add logs to check if we dispatch the correct insets to apps while
rotating the display.
Change-Id: Ic9e71d8eabde51067b740b35404ae7c9b68228d7
Fixes: 190463685
Test: launch app and see no exception breaking the creation of
splash screen view.
Change-Id: Icae3b189068f074fdc061d0c510faceb024a26c6