Commit Graph

1400 Commits

Author SHA1 Message Date
Bill Lin
2214897235 Merge "Allow one-handed mode shortcut expand notification" into sc-dev am: 789f014c04
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14957128

Change-Id: Ic889ca6d24deb1e4a721f87837c3d813dbb1b0b2
2021-06-17 00:25:38 +00:00
Bill Lin
789f014c04 Merge "Allow one-handed mode shortcut expand notification" into sc-dev 2021-06-16 23:59:28 +00:00
Jorge Gil
d599c111a7 Merge "Start pinchResize only if pointers are inside PIP" into sc-dev am: c6e212c5b2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14948317

Change-Id: I1744f1c6ce15ed67bf4dfb8f591eafcd2477e77a
2021-06-16 22:04:14 +00:00
Jorge Gil
c6e212c5b2 Merge "Start pinchResize only if pointers are inside PIP" into sc-dev 2021-06-16 21:59:53 +00:00
Bill Lin
ca75e7e466 Allow one-handed mode shortcut expand notification
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
2021-06-17 01:12:32 +08:00
Vadim Caen
5376302409 Merge "Release the SurfacePackageViewHost on splash screen removed" into sc-dev am: dc07d29bd0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14775423

Change-Id: I8df810ddd616766a2fa843b5755ae973d7e43361
2021-06-16 12:42:27 +00:00
Vadim Caen
dc07d29bd0 Merge "Release the SurfacePackageViewHost on splash screen removed" into sc-dev 2021-06-16 12:27:47 +00:00
jorgegil@google.com
c73eb5d3f7 Start pinchResize only if pointers are inside PIP
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
2021-06-15 17:33:09 -07:00
Ben Lin
800be924c2 Merge "PiP: Divide up the magnetic percent by 2." into sc-dev am: dd44345c6a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14940431

Change-Id: Ib7b47fd34a3e6bf46cfa37e30afa428e55bec43c
2021-06-15 19:12:50 +00:00
Ben Lin
dd44345c6a Merge "PiP: Divide up the magnetic percent by 2." into sc-dev 2021-06-15 19:06:17 +00:00
Mady Mellor
fcf6ed9cb2 Merge "Fix dismiss ciricle being behind expanded view" into sc-dev am: 563e1b4856
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14970151

Change-Id: I69cbc9f9ebe9320d3ebdef94e8483779aae969b0
2021-06-15 16:12:05 +00:00
Mady Mellor
9f06c2d450 Merge "Fix launching bubbles from widgets" into sc-dev am: faee2e6b03
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14940550

Change-Id: I4912dc70ca3f130b43761848d1ad11d177c62ddf
2021-06-15 16:11:57 +00:00
Mady Mellor
563e1b4856 Merge "Fix dismiss ciricle being behind expanded view" into sc-dev 2021-06-15 16:09:56 +00:00
Mady Mellor
faee2e6b03 Merge "Fix launching bubbles from widgets" into sc-dev 2021-06-15 16:08:52 +00:00
Vadim Caen
a46ff113be Release the SurfacePackageViewHost on splash screen removed
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
2021-06-15 15:39:09 +02:00
Tony Huang
c4f6972cf9 Merge "Using rotate split layout while split active" into sc-dev am: e59e08b8f2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14909655

Change-Id: I7920c8c86a0bea334db74f4a334bba4fe1dc11a4
2021-06-15 06:58:27 +00:00
Tony Huang
e59e08b8f2 Merge "Using rotate split layout while split active" into sc-dev 2021-06-15 06:50:54 +00:00
TreeHugger Robot
4403e96123 Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-dev 2021-06-15 04:39:23 +00:00
Bill Yi
1729ea4c88 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Iab4b9ceaa274a0914f294e71d8fc56f99bd6c87d
2021-06-15 02:38:26 +00:00
TreeHugger Robot
ea863f9794 Merge "Settings Switch animation jank while enabled One-handed mode" into sc-dev am: e796dc88bd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14947950

Change-Id: I6852873590661deaa106c2b818b92b5f3df37d3b
2021-06-15 01:54:01 +00:00
TreeHugger Robot
e796dc88bd Merge "Settings Switch animation jank while enabled One-handed mode" into sc-dev 2021-06-15 01:37:34 +00:00
Mady Mellor
e57920820e Fix launching bubbles from widgets
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
2021-06-14 18:25:25 -07:00
Mady Mellor
be613e6a98 Fix dismiss ciricle being behind expanded view
- 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
2021-06-14 15:18:12 -07:00
Bill Lin
61766a732c Settings Switch animation jank while enabled One-handed mode
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
2021-06-15 05:15:44 +08:00
Jorge Gil
35c1805b22 Merge "Remove duplicate call to update PIP bounds on PIP expand" into sc-dev am: d3cc960edf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14681779

Change-Id: I835057fad4e214442817c7cf8fc3efb2289cc241
2021-06-14 15:10:06 +00:00
Jorge Gil
d3cc960edf Merge "Remove duplicate call to update PIP bounds on PIP expand" into sc-dev 2021-06-14 14:58:33 +00:00
Selim Cinek
582d79a7c8 Merge "Always do the app reveal animation when dismissing the splash screen" into sc-dev am: bfa0487b7a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14934416

Change-Id: I4d24531a8610acccc87ab5ed1ca850d40b09b4f3
2021-06-14 08:18:54 +00:00
Selim Cinek
bfa0487b7a Merge "Always do the app reveal animation when dismissing the splash screen" into sc-dev 2021-06-14 08:02:08 +00:00
TreeHugger Robot
ca5bc66be8 Merge "Skip onMovementBoundsChanged when waiting for fixed rotation" into sc-dev am: fe8d6de401
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14939513

Change-Id: I3054aacd61b1e4a541400799db8e768e304fd400
2021-06-12 18:34:17 +00:00
TreeHugger Robot
fe8d6de401 Merge "Skip onMovementBoundsChanged when waiting for fixed rotation" into sc-dev 2021-06-12 18:13:50 +00:00
Cyrus Boadway
85fe3c0aca Merge "Include splashscreen background color in new starting window listener" into sc-dev am: 7deb3ba4d4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14881305

Change-Id: If063439e9e98dd28e1e7e134ea15ac956b27e0c3
2021-06-12 17:26:57 +00:00
Cyrus Boadway
7deb3ba4d4 Merge "Include splashscreen background color in new starting window listener" into sc-dev 2021-06-12 17:14:49 +00:00
jorgegil@google.com
e5f4c32ce8 Remove duplicate call to update PIP bounds on PIP expand
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
2021-06-11 09:45:39 -07:00
Cyrus Boadway
e830abcc75 Include splashscreen background color in new starting window listener
Pass the starting window background color to starting window listeners.

Bug: 187706750
Test: Manual
Change-Id: I729df4afbf75540a60c6f2e288de80fc0b6d97dd
2021-06-11 10:07:15 +00:00
Bill Yi
4162039d32 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I984dc4628334c519511ea9bad6b63006cebf4e40
2021-06-11 09:52:41 +00:00
wilsonshih
192aef77d7 Always do the app reveal animation when dismissing the splash screen
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
2021-06-11 11:34:33 +08:00
Ben Lin
8a8b1f632a PiP: Divide up the magnetic percent by 2.
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
2021-06-10 14:47:15 -07:00
Hongwei Wang
48a0820666 Skip onMovementBoundsChanged when waiting for fixed rotation
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
2021-06-10 12:36:09 -07:00
Tiger Huang
4586f92923 Merge "Defer dispatching insets to app if its window frame will be changed soon" into sc-dev am: 50ae7cbf1b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14881021

Change-Id: Ifba48a864d7090a46cb300df2ecb567eedc619de
2021-06-10 08:12:08 +00:00
Tiger Huang
50ae7cbf1b Merge "Defer dispatching insets to app if its window frame will be changed soon" into sc-dev 2021-06-10 07:55:53 +00:00
Mady Mellor
abfba98a67 Merge "Collapse the stack on clicks rather than on down" into sc-dev am: fd4a4a3ee5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14850318

Change-Id: If46c3cc3c71058511b55c3abc99375ddda1d354a
2021-06-09 18:04:12 +00:00
Winson Chung
65540bc717 Merge "Fix for IME exclusions not working with expanded bubble" into sc-dev am: 24de1aa861
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14912906

Change-Id: If74b1c6bd99a2b2953e4b4dec8af876fb422eb5f
2021-06-09 18:03:57 +00:00
Mady Mellor
fd4a4a3ee5 Merge "Collapse the stack on clicks rather than on down" into sc-dev 2021-06-09 17:46:55 +00:00
Winson Chung
24de1aa861 Merge "Fix for IME exclusions not working with expanded bubble" into sc-dev 2021-06-09 17:35:35 +00:00
Winson Chung
9f6c43e65c Fix for IME exclusions not working with expanded bubble
- 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
2021-06-09 17:34:58 +00:00
Riddle Hsu
5d36efa378 Merge "Fix inverted vertical offset of entering rotated PiP" into sc-dev am: 7f38c6c3a4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14881023

Change-Id: If1fae15a883381ca4d470c7d77a4cecc2268a4d3
2021-06-09 17:05:05 +00:00
Riddle Hsu
7f38c6c3a4 Merge "Fix inverted vertical offset of entering rotated PiP" into sc-dev 2021-06-09 16:51:34 +00:00
Wei Sheng Shih
ec2ba7a0eb Merge "Return default value safely without throw out exception." into sc-dev am: 7ab80ae74f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14891911

Change-Id: Id9d854fa9f19e6be2ddcbc4e1a0c01ebf6277deb
2021-06-09 10:40:47 +00:00
Tiger Huang
7be2a4c964 Defer dispatching insets to app if its window frame will be changed soon
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
2021-06-09 15:52:39 +08:00
wilsonshih
661a5f0b01 Return default value safely without throw out exception.
Fixes: 190463685
Test: launch app and see no exception breaking the creation of
splash screen view.

Change-Id: Icae3b189068f074fdc061d0c510faceb024a26c6
2021-06-09 14:20:25 +08:00