Commit Graph

151 Commits

Author SHA1 Message Date
Hongwei Wang
7b8b7b5cba Merge "Polish PiP round corner" into sc-dev 2021-06-08 16:48:28 +00:00
Hongwei Wang
d5b088b418 Polish PiP round corner
Included in this CL
- Increase the corner radius from 8dp to 16dp
- Scale the round corner radius in transition

Tested with the following scenarios
- Enter PiP in button navigation mode
- Double-tap to resize PiP
- Pinch to resize PiP

TODO
- Round corner when enter PiP with auto-enter being enabled

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/gA2dQNBNTA8xFExWqmOkRY
Bug: 187441996
Test: manual, see video
Change-Id: I43db31f966007795351a8e2ca7dd08417f6f0df7
2021-06-07 16:20:50 -07:00
Bill Yi
7c0e324e95 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I908fc392a60c3ab9d7a6fa1b3effbdb2bd8edf08
2021-06-07 12:10:29 +00:00
Mady Mellor
9254393aa5 Bubble dismiss updates
- large colored circle, uses same accent color that launcher
  has for remove / uninstall
- added a shrink animation for the target when the bubble is
  stuck via the magnet
- no longer desaturate the bubble being dismissed but rather add
  a bit of an alpha

Bug: 183657564
Test: manual - get a bubble, drag it around & dismiss it, notice
               the animation
Change-Id: If0d0d86b7389f0fa3314598266cd83ecabdc6a9b
2021-06-03 10:16:36 -07:00
Wei Sheng Shih
a7fb25ba8a Merge "Consolidate the starting surface icon size to framework" into sc-dev 2021-06-02 10:00:20 +00:00
Mady Mellor
2430a0b314 Merge changes I4794ed89,I0c273f4d,Ibd8609a8 into sc-dev
* changes:
  Flexible maximum number of bubbles to show
  Add shadows back to bubble avatar
  Update sizes for the bubble avatar
2021-05-27 22:51:57 +00:00
Mady Mellor
238f122f47 Flexible maximum number of bubbles to show
* adjust the default spacing so that its small enough that 5 bubbles
  can show on crosshatch (5 is the default)
* Add max bubbles to BubblePositioner, replace the other usages

Test: atest BubbleDataTest
Test: manual - have 5 bubbles
             - adjust screen size to largest
             - open the stack
             => notice that the number of bubbles have changed and
               they all fit on the screen without overlap
             - repeat & check the different densities
Bug: 187715444
Change-Id: I4794ed89541eeb573c367748f980cf7ffe45d3f3
2021-05-27 13:41:22 -07:00
Mady Mellor
bb53cce0db Update sizes for the bubble avatar
* Update sizes of badge & bubble; also simplify some of the sizing
  code, we can do it with just the overall size
* Simplified things, instead of the inner / outer sizes just use
  the overall size

Test: visual - create a bubble and look at the size of the bubble and
               badge
      visual - have some bubbles, change display size, create a new
               bubble & verify that all of the sizes are the same
Bug: 183657577
Change-Id: Ibd8609a8737bb0a57519fa70fba17138bb69b379
2021-05-27 10:32:02 -07:00
Bill Yi
0ba64a4d0c Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I22ee13f97f7a193c756c49757564dc919e0e1d89
2021-05-27 13:00:57 +00:00
Bill Yi
7974c35e5d Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I4e76272c308193ffdcbca7aa00fb4aa0b15e66b9
2021-05-25 16:17:34 +00:00
TreeHugger Robot
cb993ce24a Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-dev 2021-05-22 06:22:44 +00:00
Bill Yi
da919949fe Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Idb36b573577f1277b6f81fb9329a3f0d273a9d21
2021-05-21 23:21:39 +00:00
Mady Mellor
50bcd6ca2b Update the sizes for bubble expanded view
* 16dp on either side / from edge of screen for the bubble view
* 16dp between bubble row & expanded bubble rect (works out to 5dp
  in code: 16dp - 2dp (badge overhang) - 9dp (pointer height)
* max 8dp between the bubbles in the top row
* manage button has some adjustments - 8dp above & below and is total
  32dp from edge of screen; ensure manage button is centered between
  bottom inset & bottom of expanded view

* fixes a bug where there was extra padding being at top of expanded
  view in landscape mode
* removed an unused layout file & unused dimens

Test: visual - expand a bubble, look at spacing of everything on
               screen; do the same in landscape from left and right
               edges of the screen.
Bug: 187715439
Bug: 183658029
Change-Id: I29e699aaf9b6e7bf75447dac6aa6b00a7b272b8b
2021-05-21 14:00:53 -07:00
Mady Mellor
cdbe799cf2 Bubbles don't hang off screen
Bug: 183657577
Test: visual - make a bubble, see it doesn't hang off the edge
Change-Id: Ib640add665bf5050f94573987072a93855f29fab
2021-05-21 14:00:53 -07:00
Mady Mellor
d3bd6bfbf3 Make sure Manage button updates for display size changes
Bug: 160284881
Test: visual - have a bubble, expand / collapse it, update display
      size, expand the bubble & check that the sizes have increased
      & look correct
Change-Id: If6db9ae1b720f7f37fab31cbb6a67a48bee2e0f8
2021-05-20 17:55:57 -07:00
Mady Mellor
0abd3000eb Merge changes I65f46028,Ie3f67ccd into sc-dev
* changes:
  Make the pointer for bubbles expanded view rounded
  Update the manage button to the new style
2021-05-20 19:54:53 +00:00
Mady Mellor
9ac4fb0e34 Merge "Bubbles styling: Update colors to use new theme things" into sc-dev 2021-05-20 16:32:14 +00:00
Bill Yi
8b426d12b3 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I73c3b5ee1590289835a2c5bbd43a953091f0a881
2021-05-20 11:09:23 +00:00
Mady Mellor
3952307a8c Merge "Bubbles styling: flyout changes" into sc-dev 2021-05-19 18:28:10 +00:00
Mady Mellor
9f97f89342 Merge "Fix some sizes that weren't changing for font scale / display size`" into sc-dev 2021-05-19 18:18:34 +00:00
wilsonshih
fdc3630b6a Consolidate the starting surface icon size to framework
Let the icon size can be read accorss Launcher and WMShell.
Devices can overlay these values if needed.

Bug: 177264697
Test: Manual verify icon size on splash screen.
Change-Id: Ia9f76cd3f4a9869ae2966d59d9204e4df94119e5
2021-05-19 19:27:21 +08:00
TreeHugger Robot
4d225a0e3c Merge "Update bubble user education screens to use proper colors" into sc-dev 2021-05-19 04:36:06 +00:00
Mady Mellor
bba5ed7765 Update bubble user education screens to use proper colors
Bug: 173562716
Test: visual - force user education to show & observe it on the
      stack and manage menu
Change-Id: I6988e2c433f17b69de4aed44c1af3bacb475caf9
2021-05-18 15:51:32 -07:00
Ben Lin
17af0292a8 Merge "PiP: Add stash a11y support." into sc-dev 2021-05-18 21:08:32 +00:00
Mady Mellor
70e798e474 Make the pointer for bubbles expanded view rounded
Test: manual - open a bubble and note that the pointer is rounded
Bug: 183658029
Change-Id: I65f460289dc7128aa95e9ad7575a3bb39be629bf
2021-05-18 10:01:50 -07:00
Mady Mellor
7376a67ad0 Update the manage button to the new style
Also fixes a bug where the overflow view would still leave space
for the manage button even though we don't show something there.

Bug: 183658858
Test: manual - open a bubble and observe the manage button, should
               be on a dark background with light text regardless
               of light / dark theme.
Change-Id: Ie3f67ccd26ad4d75a3ed21a3dee43e2f74d07022
2021-05-18 10:01:43 -07:00
Mady Mellor
367d8ea45f Bubbles styling: Update colors to use new theme things
- Bubble expanded view arrow is now based on backgroundColorFloating
- Bubble overflow expanded view also uses backgroundColorFloating
- Bubble overflow button uses colorAccentPrimary for the circle
  & a dark accent color for the '+' shape
- Manage menu uses colorSurface, had to rename the file bc sysui
  has a file with same name but different colour which was clobbering
  ours

Test: make a bubble & observe UI in light and dark mode, check
      the arrow in the expanded view, the overflow button & expanded
      state, and tapping on the manage menu
Bug: 183658029
Bug: 183658858
Change-Id: Iab5e5536036a8eaecd1c547e5dcfc9d4e77fe5d4
2021-05-18 10:00:38 -07:00
Mady Mellor
56b1e99d02 Bubbles styling: flyout changes
- no longer show a pointer with the flyout
- use the same color as the notifications
- increase the padding slightly

Test: manual - create some bubbles and observe the
        flyout
Bug: 183657745
Change-Id: I21ac5c1ce187e553e94ec41c81f9b43e8e914658
2021-05-18 10:00:19 -07:00
Mady Mellor
76fa21b5dc Fix some sizes that weren't changing for font scale / display size`
Test: manual - have some bubbles
             - change font & display size
             - add a new bubble
	     => ensure UI elements have changed size & match the size
	        of the new bubble (manage text, overflow empty statei
		text, pointer size, manage menu contents)
Bug: 160284881
Change-Id: I2de45ba0975e2e0295abf8b350b9c2fb11ef73a8
2021-05-18 09:59:29 -07:00
Winson Chung
8aa6016bb3 Add fallback animation for auto-enter without source rect hint
- Launcher will create a new surface which is faded in over the app,
  and as it finishes the recents animation, we transfer the overlay
  from the leash to the task (as with the transform), and when the
  pip task organizer receives it, it can fade out and remove the
  surface
- Fixes flash of status bar colors when going from light status bar
  to home (dark status bar) by deferring whether a task affects the
  sysui flag until it enters pip (only for autoenter)

https://recall.googleplex.com/projects/e3f080d7-2818-43f0-a087-405000b8fdf5/sessions/971a84c8-a622-4b34-a9de-4e595595da42

Bug: 184703546
Test: Swipe up from app with auto-enter but no source hint rect

Change-Id: I0a00cdb98d0a599ef065206e0cd2cfc0e6cc72b1
2021-05-12 23:53:25 -07:00
Ben Lin
58b79104e7 PiP: Add stash a11y support.
Bug: 186479769
Test: Use talkback, open up menu, tap on "Stash", see PIP stashes;
tap on "Unstash", see it unstashes

Change-Id: I617f078cee888ea4f592173c67b25d43fb4e9cd1
2021-05-11 16:06:54 -07:00
Hongwei Wang
57618b94ef Merge "Unify round corner radius in PipSurfaceTransactionHelper(s)" into sc-dev 2021-05-11 03:23:11 +00:00
Jordan Demeulenaere
0cd1d01d63 Merge "Polish the app reveal animation." into sc-dev 2021-05-10 14:09:51 +00:00
Bill Yi
bca4acc749 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I0fb1a33648fe6a9f57a7f1412ad03164eebacb0b
2021-05-07 04:29:30 +00:00
Jordan Demeulenaere
37a3c61b82 Polish the app reveal animation.
This CL polishes the app reveal animation after a cold start. It does so
by:

1. Fading out the icon during 233ms before revealing the app, as spec'ed
   in the direct [1].
2. Animating the reveal gradient opacity from 0 too 100% (instead of
   starting at 100% opacity directly).

See b/184830058#comment7 and #comment13 for before/after videos.

[1] https://direct.googleplex.com/#/spec/241550001

Bug: 184830058
Test: atest SplashscreenTests StartingSurfaceDrawerTests
Change-Id: Ie4561887a259eec398f8f347050f27a094026945
2021-05-06 15:25:55 +02:00
wilsonshih
3221600d7e Support enable default splash screen reveal aninatmion
- Add a temp flag persist.debug.enable_reveal_animation so user can
enable reveal animation.
- Remove icon shift animation.
- For shift up animation, use AnimationAdapter to capture the surface
control and pass to Shell, then cancel the animation when
WindowState#removeIfPossible for starting window.
- Fix the flicker test fail issue caused from shift up animation, the
surface control should be release after the last frame was commit.
- Use SyncRtSurfaceTransactionApplier to synchronize the shift-up
animation, and use vsyncId to ensure the transaction doesn't applyied
too early.
- Do not play reveal animation for empty splash screen.

Test: atest SplashscreenTests StartingSurfaceDrawerTests
Bug: 183004107
Bug: 182815506
Bug: 184830058
Change-Id: I4fc8456633b3f4ecd69b168e0222915945210426
2021-05-03 16:20:09 +08:00
Mady Mellor
23f3d34103 Merge "Restrict the width of bubble expanded view on large screens" into sc-dev 2021-04-30 16:07:54 +00:00
Mady Mellor
8e5f4733ee Restrict the width of bubble expanded view on large screens
* Width is restricted via padding applied to the view when the device
  is considered large screen
* Adjusted animation code so bubbles slide in from edges when showing
  vertically
* Overflow uses max height available when on a large screen
* Fixed a bug where overflow height wasn't being updated correctly
  since it's no longer using an activity
* Fixed a bug where when the view was expanded & you rotated its
  position could be off

Test: manual - expand bubble on large screen from left / right edges
               in landscape & portrait
            => bubbles should be anchored to edge they are opened from
               & positioned vertically along the edge
             - expand bubble on phone in portrait
            => bubbles should be anchored to the top edge &
               horizontally
             - expand bubble on phone in landscape, check overflow
            => bubbles should be anchored to the edge they are opened
               from & positioned vertically along the edge, the
               overflow should have a restricted width
Bug: 175211639

Change-Id: I7c3f3024260a08ebdf4c6e7c7724e51fbc480f61
2021-04-29 15:24:49 -07:00
Mady Mellor
435ab536c2 Fix text color for bubble user education screens
Test: manual - look at user education screens for the bubble stack and
               manage button in light & dark theme and make sure the
               text is as expected
Bug: 183238079
Change-Id: Ia83b2e849f46c3e3eb055ff263a0171f4ad62288
2021-04-29 12:57:07 -07:00
Hongwei Wang
cd6e9816a5 Unify round corner radius in PipSurfaceTransactionHelper(s)
Per discussion, will keep the two classes in Launcher and WMShell as for
now and re-address the unification in next release. In this change
- deprecate config_pipEnableRoundCorner since it's now behind a system
  property and waiting to be turned on
- pass the corner radius value from WMShell to Launcher

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/dmUy8qBEMxHShFcFKB3cT3
Bug: 171721389
Test: make sure autoEnterPip has round corner support, see video
Change-Id: If978ee6c3b0307a7423fe51b996f535d7009e74c
2021-04-29 11:25:49 -07:00
wilsonshih
1d699ec6b1 Load higher resolution resource for icon on splash screen when needed
Enlarge the basic icon visible size to 160dp, and loading higher icon
drawable if available. For replaced icon we also enlarge the visible
area.
And if the icon does not need to draw the background, apply another 1.3
times scale than normal case.

TODO: need to handle legacy icon.

Bug: 182883560
Test: atest SplashscreenTests
Change-Id: Ia72a72a743a7ef5f80f247393c1a5bd0b6653a48
2021-04-26 12:36:54 +08:00
Bill Yi
9234f7086d Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: If4d473b60d373922663727fc2bca6bf73ac9cff7
2021-04-17 18:04:51 -07:00
TreeHugger Robot
db9210da53 Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-dev 2021-04-16 17:06:51 +00:00
TreeHugger Robot
7c21c82dcb Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-dev 2021-04-16 16:27:54 +00:00
Bill Yi
278e113140 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I2d14138a84252d40e8d297f6e88a94c7be25f7da
2021-04-16 12:28:00 +00:00
Bill Yi
d3588352d6 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ic6c358da64628996d3ca72f3837ba1cf2345f9e8
2021-04-16 12:09:21 +00:00
Jason Chang
97bf5c62e1 Merge "Fix One Handed Feedback gesture's animations are quite jarring" into sc-dev 2021-04-16 00:29:30 +00:00
Jason Chang
dcecfcf76f Fix One Handed Feedback gesture's animations are quite jarring
To provide a new Interpolator formula for One-Handed transition
animation.

Bug: 178355565
Test: manual
Test: atest WMShellUnitTests
Change-Id: I78d998569618dc52c8b6fce6cb4a71f13ad01ba8
2021-04-14 14:50:44 +08:00
Ben Lin
7366a4b1b9 PiP: Add rounded corners to the menu.
Bug: 184972396
Test: Manual. Enter PiP, see rounded corners on the menu when showing
the menu.

Change-Id: I4af6a48ecb07fce8b96acd775ab6538d9f6cb198
2021-04-12 17:07:34 -07:00
Bill Yi
389b3d5f28 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I4ff397b4d0e9327407ad2568952fb72026bf9bdb
2021-04-04 19:39:51 +00:00