Commit Graph

1300 Commits

Author SHA1 Message Date
Selim Cinek
2b767d5fc0 Merge "Improved the behavior of overscroll" into sc-dev am: 2b10a16208
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14807585

Change-Id: Ie0b9a88a15384863e68ac34c2fdbe2d99fb1285b
2021-06-07 18:18:37 +00:00
Selim Cinek
2b10a16208 Merge "Improved the behavior of overscroll" into sc-dev 2021-06-07 18:12:40 +00: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
Selim Cinek
40cebe4468 Improved the behavior of overscroll
The overscroll logic could get stuck previously, which lead to
a forehead visible on the lock screen.
This improves the logic and animation to look much better.

Fixes: 190029393
Test: expand shade, observe nice overshoot, no forehead on lockscreen
Change-Id: I2c9d5313626d3037c7bd3c942820c391da99b459
2021-06-07 13:12:29 +02:00
Mady Mellor
7fd57716eb Merge changes I5c096c2b,If0d0d86b into sc-dev am: 73eb2771f8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14751471

Change-Id: If88a10a31385457beb0f995d739149aebe381b6e
2021-06-04 19:45:40 +00:00
Mady Mellor
73eb2771f8 Merge changes I5c096c2b,If0d0d86b into sc-dev
* changes:
  PIP dismiss updates
  Bubble dismiss updates
2021-06-04 19:29:15 +00:00
Winson Chung
1de4c3f418 PIP dismiss updates
* orders the target below the PIP surface
* adds scale relative to the dismiss target size when PIP is in
  the target

Test: manual - get a pip, drag it to dismiss => it appears on top of
               the circle and then animates away with it
             - get a pip, make it larger with 2 finger gesture,
               drag it to dismiss => it appears on top of the circle
               and fits nicely in the circle bounds
Bug: 183657564
Change-Id: I5c096c2b5f41a667df37b4c6668c4862a212c7e2
2021-06-03 10:16:53 -07: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
Adithya Srinivasan
ef3378bcea Merge "Add TaskSurfaceHelper/Controller in WMShell to plumb game mode to SF" into sc-dev am: c6273f7f15
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14687471

Change-Id: Icffe60b23c8bc8861dec5d66fdb627f98dbbb438
2021-06-02 22:02:33 +00:00
Adithya Srinivasan
c6273f7f15 Merge "Add TaskSurfaceHelper/Controller in WMShell to plumb game mode to SF" into sc-dev 2021-06-02 22:00:09 +00:00
Wei Sheng Shih
c59c9c6664 Merge "Consolidate the starting surface icon size to framework" into sc-dev am: a7fb25ba8a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14609920

Change-Id: I2a553ec07c58fb2bbcb494aedfa9d2ae947944f6
2021-06-02 10:08:06 +00: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
TreeHugger Robot
0c7c150922 Merge "ViewRootImpl: Correct opaque flag usage" into sc-dev am: a731c9f3f9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14724164

Change-Id: Ib192fe790f96bf3224ba89240785f1255c368891
2021-06-02 09:52:28 +00:00
TreeHugger Robot
a731c9f3f9 Merge "ViewRootImpl: Correct opaque flag usage" into sc-dev 2021-06-02 09:28:33 +00:00
TreeHugger Robot
aab741ec4f Merge "Add an extra colored layer when animating launches (1/2)" into sc-dev am: d17c68d57c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14679830

Change-Id: I2b50de4828b797dac706feb5d298030a11c76b59
2021-06-01 20:55:16 +00:00
TreeHugger Robot
d17c68d57c Merge "Add an extra colored layer when animating launches (1/2)" into sc-dev 2021-06-01 20:44:38 +00:00
Mady Mellor
938929c329 Merge "Hide the stack education view when user taps" into sc-dev am: cdfc535609
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14753038

Change-Id: I6bb25986c9a5b22bb8674e97cc63c3a36a3e8127
2021-06-01 19:42:24 +00:00
Mady Mellor
cdfc535609 Merge "Hide the stack education view when user taps" into sc-dev 2021-06-01 19:35:46 +00:00
Wei Sheng Shih
c464bbf453 Merge "Ensure no starting window leak in WMShell before adding." into sc-dev am: a1195c85c7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14341155

Change-Id: I3201d3fdeba1797bc11a1aeee539f7226d088d03
2021-06-01 08:19:02 +00:00
wilsonshih
5cdbeb1a42 Ensure no starting window leak in WMShell before adding.
Before adding the snapshot start window, remove any existing window
at the same task if any. Also make sure if starting window was create
failed, the window should be remove after it been added.

Bug: 185318171
Test: manual test without ag/14308714
Change-Id: I5de7d54907bc0318c6d979c44ca8e64a5fcea062
2021-05-31 21:23:19 +08:00
Mady Mellor
b1ad3da49d Merge changes I4794ed89,I0c273f4d,Ibd8609a8 into sc-dev am: 2430a0b314
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14707598

Change-Id: I709265f9c33d01aeb7d61e47680aab9bf8ae3b7b
2021-05-28 03:01:35 +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
1a916f5b1a Hide the stack education view when user taps
This was only hiding if you interacted with the bubble, now it
will hide if you tap anywhere.

Also makes sure the bubbles are ordered above the education.

Bug: 189225662
Test: manual - wipe device, get first bubble, tap anywhere other
               than the bubble & observe that the user education
               fades away.
Change-Id: I3750ca79de717e81492070b38d1af0518f1a7a3f
2021-05-27 15:51:01 -07: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
5f00d56451 Add shadows back to bubble avatar
* Add shadows back -- icon lib is no longer adding shadows but
  bubbles should still have them for background protection.
* The shadow is active on all bubbles when:
  - the stack is being dragged around & bubbles trail behind it
  - the stack is expanded (the bubbles can be dragged to dismiss &
    can show on top of the expanded view or overflow)
* When the stack is resting, only the top two bubbles show a shadow
  & the bubbles below that animate their Z translation so the change
  is smooth.
* Also put the # of bubbles we show in the stack in a static int &
  updated usages

Test: visual - add 5 of the 'test bubbles' from the test app
               and notice the white backgrounds don't blend together
               due to the shadow & that they are distinct when
               placed on a white background
             - drag / fling the stack around & notice shadows show
               for all the bubbles while moving but once they come
               to rest you don't see a stack of shadows
Bug: 183657577
Change-Id: I0c273f4d0261db9eac1b49ef584fd62fbb67cc9a
2021-05-27 13:40:43 -07:00
Adithya Srinivasan
4e8a1a05b1 Add TaskSurfaceHelper/Controller in WMShell to plumb game mode to SF
TaskSurfaceHelper(Controller) will be used as an interface to communicate
with the SurfaceControl of the underlying Task. This change adds a function
to set the game mode metadata for the task layer.

Bug: 186025682
Test: atest TaskSurfaceControllerTest
Change-Id: I136b65636b98e1883eaf9e4f4f0b34c61350d4e4
2021-05-27 20:12:08 +00: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
Jordan Demeulenaere
ed10f0ab6f Add an extra colored layer when animating launches (1/2)
This CL adds an extra layer with the same color as the app background
color when animating an app launch (e.g. from notification, QS, media,
etc). This allows to avoid a "flash effect" that could be caused when
the background color of the expanding view is bright, which is often the
case for QS tiles.

See b/188185381#comment5 for before/after videos.

Bug: 186189658
Test: Long press a quick settings tile
Change-Id: Ifc0cda3b03795549ddd7c333a9302e7ea298ac6a
2021-05-27 17:18:40 +02: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
Vadim Caen
847c9f75ae Merge changes from topic "splashscreen-surface" into sc-dev am: fc1efcb428
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14186656

Change-Id: I7c295f6f285fdd54f5be77d26eaaddeba9194bed
2021-05-26 11:04:14 +00:00
Wei Sheng Shih
f157e9d083 Merge "Prevent the splashscreenview be replaced after transfer starting window" into sc-dev am: 4bc9052468
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14622503

Change-Id: Ib800aeba8e00d4ace57c155c78af82dffa782fc5
2021-05-26 10:53:07 +00:00
Robert Carr
776dd9e556 ViewRootImpl: Correct opaque flag usage
In performTraversals, "params" may be null. In this case we were
not passing params to the WM indicating no changes (an obscure
artifact of the protocol).  In R the WM would simply ignore this
however our updateOpacity logic in S is treating null as "translucent"
it seems easiest to just pass mWindowAttributes directly avoiding
the null case. While the opacity was broken, it seems an animation
was added to StartingSurfaceDrawer which depends on having a translucent
window. We also update this code to request a transparent pixel format
as would have been required in the R API.

Bug: 186555833
Test: Existing tests pass
Change-Id: I180bf1796bbb4b7049ae9811f674f31014c2a400
2021-05-25 17:14:26 -07:00
TreeHugger Robot
364128ac07 Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-dev 2021-05-25 20:34:37 +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
Vadim Caen
fc1efcb428 Merge changes from topic "splashscreen-surface" into sc-dev
* changes:
  Do not reparent the SC when package is already realeased
  Display Splashscreen AVD in a SurfaceView
2021-05-25 15:24:08 +00:00
Wei Sheng Shih
4bc9052468 Merge "Prevent the splashscreenview be replaced after transfer starting window" into sc-dev 2021-05-25 11:24:56 +00:00
TreeHugger Robot
976edfdbf2 Merge "Split flicker tests into groups" into sc-dev am: 608a439238
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14601816

Change-Id: I319ed54afe9b16a64f979c2e315ba6f4bc8c4788
2021-05-22 10:01:19 +00:00
TreeHugger Robot
608a439238 Merge "Split flicker tests into groups" into sc-dev 2021-05-22 09:44:36 +00:00
TreeHugger Robot
cb993ce24a Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-dev 2021-05-22 06:22:44 +00:00
Mady Mellor
5c28b3690f Merge "Fix overflow not receiving onBackPress events" into sc-dev am: 3c01aa0fea
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14684140

Change-Id: I315e1b958530bba9a3e60a54fbd8267f8fc0d415
2021-05-22 01:21:58 +00:00
Mady Mellor
3c01aa0fea Merge "Fix overflow not receiving onBackPress events" into sc-dev 2021-05-22 01:05:06 +00:00
Mady Mellor
46ffa8098c Merge "Update the sizes for bubble expanded view" into sc-dev am: 268e44c5f5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14626187

Change-Id: Ieb27286628ed0d61600d99c27507554988585f74
2021-05-22 00:30:19 +00:00
Mady Mellor
268e44c5f5 Merge "Update the sizes for bubble expanded view" into sc-dev 2021-05-22 00:19:00 +00:00
Mady Mellor
5f204c1b3b Merge changes Ib640add6,I168a14e1 into sc-dev am: db99d2664e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14626186

Change-Id: I72383d2c5a2d04a5ed2c33a8e10245236906fc19
2021-05-22 00:15:32 +00:00
Mady Mellor
db99d2664e Merge changes Ib640add6,I168a14e1 into sc-dev
* changes:
  Bubbles don't hang off screen
  Only show the first 2 bubbles in the stack when collapsed
2021-05-22 00:05:19 +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
1171155422 Fix overflow not receiving onBackPress events
Normally the bubble window isn't focusable so when the overflow
is opened/closed the window flags get adjusted so that the overflow
can get focus & key events.

Test: manual - expand the overflow and hit back button / gesture back
Bug: 185131171
Change-Id: I00f0063b3c7dd54327152d886bd74a8d1eec4231
2021-05-21 14:48:15 -07: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
1d75e183c9 Only show the first 2 bubbles in the stack when collapsed
Test: manual - add more than 2 bubbles, note you only see the top 2
             - expand & collapse the stack, note you only see top 2
               after collapse
             - fling the stack around, note once it hits the edge
               you only see top 2 bubbles but while dragging around
               you see all of them following
Bug: 180142824
Change-Id: I168a14e1fba1506f53ed0734b55b44971d128de4
2021-05-21 14:00:46 -07:00