Commit Graph

1279 Commits

Author SHA1 Message Date
Selim Cinek
b37f55f23a 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: I1f90d7d1cc68ab8a9f344ccf086d5d55908b3262
2021-06-07 18:19:52 +00:00
Selim Cinek
2b10a16208 Merge "Improved the behavior of overscroll" into sc-dev 2021-06-07 18:12:40 +00:00
Bill Yi
cdf31ae577 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I00d7cc318e8caf13d7f01875ee0b5745a03a3737
2021-06-07 12:11:56 +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
98c386a401 Merge changes I5c096c2b,If0d0d86b into sc-dev am: 73eb2771f8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14751471

Change-Id: Ib5743c5f8f200d904573eff541667b645f33bbf1
2021-06-04 19:50:11 +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
5179933d6a 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: I78361faa7f6726a4540e5d2d0114cc3bdd48bd12
2021-06-03 07:06:40 +00:00
Wei Sheng Shih
ea37061584 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: I3e479e64785390cab98667c43f8066770d8e0ff4
2021-06-03 06:49:47 +00:00
TreeHugger Robot
2087be9526 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: I8d17d2547828e3dfcbc382accefcad3e50d789c3
2021-06-03 06:49:39 +00:00
TreeHugger Robot
840c57d359 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: I96ac327e582d9e2069fe8a43913954a5d80dbb62
2021-06-03 06:35:47 +00:00
Mady Mellor
0b4c15a2cc 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: I9ea337f2b0faf4d2364abb1ea84f37042c2bff54
2021-06-03 06:32:00 +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
a7fb25ba8a Merge "Consolidate the starting surface icon size to framework" into sc-dev 2021-06-02 10:00:20 +00:00
TreeHugger Robot
a731c9f3f9 Merge "ViewRootImpl: Correct opaque flag usage" into sc-dev 2021-06-02 09:28:33 +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
cdfc535609 Merge "Hide the stack education view when user taps" into sc-dev 2021-06-01 19:35:46 +00:00
Wei Sheng Shih
4244ff3aa8 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: Ic806e0c7dd36a2c1f7f7b1180fe2d0869b95bf85
2021-06-01 08:25:05 +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
f985539cb1 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: Id514c7811ad8d5c72869c27930c6236e9503cb12
2021-05-27 23:08:33 +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
63150c7799 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ie8ac875e9c2da0ca1616c0f35626e8d2dbc41e24
2021-05-27 13:02:18 +00: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
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
TreeHugger Robot
d1fd3c16f3 Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-v2-dev 2021-05-25 18:15:09 +00:00
Bill Yi
1687fdaafa Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ifcaabc9d4d0aed9b23291d18c339f552fff11536
2021-05-25 16:19:00 +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
be2ac213fe 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: Ie0e17006e404de22c20cce84cf7a43fdf0eb85e7
2021-05-25 15:24:45 +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
0f488562e4 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: I8bea1d9e606a5a56d58e26518f57fcbe067a947b
2021-05-25 11:54:47 +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
Jerry Chang
c04541c053 Do not dismiss split if stages are not visible due to screen is sleeping
Pass isSleeping information in TaskInfo to determine whether the task is
sleeping due to display state. Prevent to dismiss staged split when
both stages is not visible due to the display is sleeping, like keyguard
showing or screen off.

Bug: 188010345
Test: atest WMShellUnitTests
Test: verified staged split won't be dismissed while keyguard showing
and screen off.

Change-Id: I0ee8943b035a9e9f937c22d2a228913e597ac79f
2021-05-25 07:09:57 +00:00
Jerry Chang
4048fa7a26 Merge "Dismiss staged split after folded the device" into sc-v2-dev 2021-05-25 05:23:33 +00:00
Jerry Chang
4b5a0e2a1c Merge "Dismiss staged split when keyguard is occluded" into sc-v2-dev 2021-05-25 05:22:21 +00:00
Jerry Chang
85c712a6ba Merge "Prevent rendering divider bar into wrong orientation" into sc-v2-dev 2021-05-25 05:19:47 +00:00
Jerry Chang
3c96d58450 Merge "Fix broken layout after switched stage positions" into sc-v2-dev 2021-05-25 05:11:23 +00:00
Ben Lin
445ff979f5 Merge changes I8f0af447,I669919d4 into sc-v2-dev
* changes:
  PiP: Show the wallpaper as part of the transition.
  PiP: Implement expand transition.
2021-05-24 22:19:27 +00:00
Evan Rosky
ffac171d4d Merge "Enable remote transition animations to append to the finish transaction" into sc-v2-dev 2021-05-24 19:28:20 +00:00
Jerry Chang
eb7764919f Dismiss staged split after folded the device
Bug: 188010345
Bug: 184795211
Test: atest WMShellUnitTests
Test: observed staged split will be dismissed after device folded

Change-Id: I00ef5ac179fc506f883f8ca519a901273427e595
2021-05-24 16:36:24 +00:00
Evan Rosky
46ba708bb8 Enable remote transition animations to append to the finish transaction
Adds a parameter to the IRemoteTransitionFinishedCallback. This
transaction will be merged into the finish transaction before it is
applied. This is needed by transitions like live-tile recents where
the end-state of the transition is altered during the "animation".

Bug: 172695387
Test: open app, swipe up to overview, resume that same app, screen
      shouldn't turn black anymore.
Change-Id: I6fa1e22288ce087ad17fdfc950a8419e6ba61a47
2021-05-24 09:14:46 -07:00
Jerry Chang
16ec9faad5 Prevent rendering divider bar into wrong orientation
The display area's bounds and orientation changed might be callbacked
seperatedly when the device's folded state changed, causing the
SplitLayout rendered divider bar into wrong orientation. This makes sure
to update divider bar and split layout correspondingly when the
orientation, rotation and root bounds chagned.

Fix: 189101216
Test: atest WMShellUnitTests
Change-Id: Ie5d7132e4122b82d9b5b404a40f97cca3095ce2c
2021-05-24 16:12:25 +00:00