Commit Graph

1255 Commits

Author SHA1 Message Date
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
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
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
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
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
Jerry Chang
3c0e223f83 Dismiss staged split when keyguard is occluded
Dismiss staged split if there's show-when-locked activity showing on top
of keyguard. Add a callback to monitor keyguard occluded state and
delegate it to StageController in WMShell, so that it could dismiss
staged split properly when keyguard is occluded.

Bug: 188010345
Fix: 187360909
Test: WMShellUnitTests
Test: launch show-when-locked activity while keyguard showing and staged
split activated, observed the staged split will be dismissed.

Change-Id: If93b36f3fcef969d449c505086459997c27b8c75
2021-05-24 05:33:00 +00:00
Jerry Chang
d18a7bb158 Fix broken layout after switched stage positions
Invoke onBoundsChanged to make sure it always updates bounds of both
stages in window hierachy after switched stage positions.

Fix: 189046868
Test: atest WMShellUnitTests
Test: trigger staged split, snap divider to non-middle position,
observed double tapping divider bar will update split layout properly.

Change-Id: I5556cc94a19758f737076f241426deee2ca24a22
2021-05-24 03:40:53 +00:00
TreeHugger Robot
3d7bed9d65 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: I579c9f2588bd492f3abc87fdfe7c1038e7433874
2021-05-22 10:02:13 +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
TreeHugger Robot
3282a3e195 Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-v2-dev 2021-05-22 05:55:48 +00:00
Mady Mellor
1cb37ca0af 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: Ieee08a475afe8f39e06b2cc447eb990c4c0f411a
2021-05-22 01:25:20 +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
94100e60fe 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: I362a0530ae15576da679529a7735f9b3c75a56d2
2021-05-22 00:24:27 +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
c58ba3c816 Merge changes Ib640add6,I168a14e1 into sc-dev am: db99d2664e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14626186

Change-Id: I532b29196a9081b9ad24e1e6f4010d98ae3b026f
2021-05-22 00:17:34 +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
219aa1c147 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ib2161158783ffab9d61df68536b2f705d3039d08
2021-05-21 23:23:10 +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
Ben Lin
d9e72a7b34 PiP: Show the wallpaper as part of the transition.
This is usually taken care by RemoteAnimation, but since PiP takes
control of the entire thing that is no longer the case. So let's just
handle it.

Bug: 165793917
Test: Enter PiP with ENABLE_SHELL_TRANSITIONS flag on
Change-Id: I8f0af4472c20016f856f33f903bd9a431cd5ef3a
2021-05-21 11:42:08 -07:00
Ben Lin
51d1d7c1d9 PiP: Implement expand transition.
Video: http://recall/-/gu5DjQFZPMFpwgaXdl4cV3/hJhcmBJWGG3IHgn6Vw9Xoa
Bug: 165793917
Test: Exit PiP with ENABLE_SHELL_TRANSITIONS flag on
Change-Id: I669919d44df2b1954ce3cbce9328faf10c24171f
2021-05-21 11:37:52 -07:00
Mady Mellor
fba001d997 Merge "Make sure Manage button updates for display size changes" into sc-dev am: ea1518faf1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14626184

Change-Id: I249136425d9222cbdd235b48de094fd1520862d1
2021-05-21 18:27:09 +00:00
Mady Mellor
ea1518faf1 Merge "Make sure Manage button updates for display size changes" into sc-dev 2021-05-21 18:01:24 +00:00
Jorge Gil
f6bd7f81ea Merge "Expand PIP to the normal size when menu actions don't fit" into sc-dev am: 37c329784f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14668168

Change-Id: I1f1e15411a8c9608e355b4d42878ded605381fa2
2021-05-21 15:51:54 +00:00