Commit Graph

1530 Commits

Author SHA1 Message Date
Riddle Hsu
cf28b411bf 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: I617c5700a1b1c6b63b9c805dffd4f47ce4cbf760
2021-06-09 17:08:52 +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
5d33c39efb 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: Ib8c45743b4135b326386ee565506ed3257b5f21f
2021-06-09 10:39:54 +00: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
Hongwei Wang
85889a4ff8 Merge "Polish round corner for auto-enter-pip" into sc-dev am: 628002c70c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14900574

Change-Id: I9d6798160967a6d756afd298385ae3ff5a621653
2021-06-09 02:09:23 +00:00
Hongwei Wang
628002c70c Merge "Polish round corner for auto-enter-pip" into sc-dev 2021-06-09 01:41:10 +00:00
TreeHugger Robot
97be9ba937 Merge "Include INTERACT_ACROSS_USERS_FULL for WmShell." into sc-dev am: 9e8cf0014e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14905218

Change-Id: I06580920e1a6c78cc002c6915599250f917ced1f
2021-06-08 22:36:30 +00:00
TreeHugger Robot
9e8cf0014e Merge "Include INTERACT_ACROSS_USERS_FULL for WmShell." into sc-dev 2021-06-08 22:29:59 +00:00
Mady Mellor
6c7a579dd7 Merge changes I6129aff7,I7e21ee87 into sc-dev am: 91ffe29918
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14804793

Change-Id: I5b164c337187a9f57ed4d178d745a2174309d89f
2021-06-08 21:21:01 +00:00
Mady Mellor
91ffe29918 Merge changes I6129aff7,I7e21ee87 into sc-dev
* changes:
  Fix dot & badge being on correct side for the first bubble added
  Fix the dot not showing when it should
2021-06-08 21:16:42 +00:00
Raymond Chiu
fcc9735574 Merge "Add feature to capture layer" into sc-dev am: a607768e98
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14625635

Change-Id: I2ec049489642f91dcc1f28d63084366ce4b2b701
2021-06-08 21:14:27 +00:00
Raymond Chiu
a607768e98 Merge "Add feature to capture layer" into sc-dev 2021-06-08 21:10:23 +00:00
Riddle Hsu
616537d0e2 Fix inverted vertical offset of entering rotated PiP
In rotated coordinates, the vertical and horizontal are
different directions. Otherwise the end of animation
doesn't match the destination position.

Bug: 175836469
Test: setSourceRectHint with non-zero left.
Change-Id: Ia5e282c0a1bab9cbf77e964b4a4bc8ea4514cfb9
2021-06-09 04:30:15 +08:00
Yuncheol Heo
907c7e820a Include INTERACT_ACROSS_USERS_FULL for WmShell.
- SplashscreenContentDrawer.ColorCache needs INTERACT_ACROSS_USERS_FULL
  to register the broadcast receiver.

Bug: 190516351
Test: Build Andorid Auto OS and check if CarLauncher is showing.
Change-Id: Ib0700a0f2ba1c31ffc60199a3aa8019961464efe
2021-06-08 13:18:28 -07:00
Hongwei Wang
6422ad45c9 Polish round corner for auto-enter-pip
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/b47ErxSscLnZl9clVncSY6
Bug: 187834841
Test: manual, see video
Change-Id: I59132ea50a3213a9caa2366c103fdddf642498e2
2021-06-08 13:13:39 -07:00
Raymond Chiu
e4cde9c8f2 Add feature to capture layer
Bug: 181831061
Test: manual
Change-Id: I16d6ac29833fc8f313b105f6215505cef05a3368
2021-06-08 18:48:25 +00:00
Hongwei Wang
4e846b73eb Merge "Polish PiP round corner" into sc-dev am: 7b8b7b5cba
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14886585

Change-Id: I3885952da56c06e6e270353a7769f8c6d64377c2
2021-06-08 16:55:25 +00:00
Hongwei Wang
7b8b7b5cba Merge "Polish PiP round corner" into sc-dev 2021-06-08 16:48:28 +00:00
Riddle Hsu
7977ff6ac3 Merge "Cache window and icon color of splash screen starting window" into sc-dev am: 00d26d7185
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14842877

Change-Id: I74e8867126e0289979e9187a86e00b3f38564e07
2021-06-08 11:56:38 +00:00
Riddle Hsu
00d26d7185 Merge "Cache window and icon color of splash screen starting window" into sc-dev 2021-06-08 11:41:35 +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
Selim Cinek
9e14be6ef1 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: I256a2292764664484d1f7f7d0fe3b8139c55c96a
2021-06-07 18:19:03 +00:00
Selim Cinek
2b10a16208 Merge "Improved the behavior of overscroll" into sc-dev 2021-06-07 18:12:40 +00:00
Riddle Hsu
f08127e398 Cache window and icon color of splash screen starting window
The background color of splash screen starting window may depend
on the declared window background and the content if icon. That
may be expensive operations if the drawables are not using pure
color. Because the attributes to compute the colors are simple,
it only need a few fields to identify whether the incoming request
has been computed. So it is worth to cache them with very small
extra memory. The cache of a package will be cleared if the package
is removed or replaced.

It may save the creation time up to 20ms (depends on the complexity
of the drawable).

Bug: 190176296
Test: atest StartingSurfaceDrawerTests#testColorCache
Test: Cold/warm launch app twice and compare the duration of
      trace name "makeSplashScreenContentView". The second time
      should be faster. Re-install the app and launch again,
      the trace will contain "peekWindowBGColor" that means
      that cache for the package was cleared.

Change-Id: I61158416694a226999843fa8fc6a8b23d6893f02
2021-06-07 22:24:03 +08: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
2c864a2275 Merge changes I5c096c2b,If0d0d86b into sc-dev am: 73eb2771f8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14751471

Change-Id: I813191f3caa54ccb08212524ccab49e2a7317a77
2021-06-04 19:48:28 +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
Mady Mellor
305cfd2683 Fix dot & badge being on correct side for the first bubble added
* stackAnimationController#isStackOnLeftSide depends on the position
  being set which happens when a view gets added so we should add
  the view & then set mStackOnLeftOrWillBe
* removed unused code

Test: manual 1) have no bubbles
             2) add a bubble (needs to be on left side -- this is
                the default unless you've placed the stack on right
                side beforehand)
             => observe that the update dot & badge are on the right
                hand side of the bubble
Bug: 185438888
Change-Id: I6129aff7c352fad8d29a6c243549f0d3580d62c8
2021-06-03 12:40:12 -07:00
Mady Mellor
dd6674033d Fix the dot not showing when it should
* Sometimes the dot doesn't show when it should, this was happening
  because the mAfterFlyoutHidden might not be set for updates
  to the flyout

Test: manual 1) add a new bubble, before the flyout for it has
                animated away, add a second bubble, before 2nd
                bubble's flyout as animated away, add another update
                to it
             2) wait for the flyout to animate away, ensure the
                update dot is visible
Bug: 185438888
Change-Id: I7e21ee87cb2ad02871330178668bc07962485e2d
2021-06-03 12:22:01 -07: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
53d7213bfe 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: I13a5b08139e100f01831557bdb9c861f506d52b2
2021-06-02 22:19:05 +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
46ebf0b300 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: Id09e82e22b949fc21b421791e9a22e276ddc09b1
2021-06-02 10:07:22 +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
5175cde31c 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: I3fe20ae36152271ed1710f0e7847fe7b1f26eca7
2021-06-02 09:54:59 +00:00
TreeHugger Robot
a731c9f3f9 Merge "ViewRootImpl: Correct opaque flag usage" into sc-dev 2021-06-02 09:28:33 +00:00
TreeHugger Robot
8d16b0a65e 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: Ia85dcb64a064abb471e144339eb69807cb8e5224
2021-06-01 20:55:38 +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
71a1b526dd 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: Ie402fc72dce4e6164a236d28406859afadd01c86
2021-06-01 19:42:17 +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
04cd638d0b 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: Ic85614ee879806052efd3447f1cbc6e768bbd97a
2021-06-01 08:22:38 +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
0e288794c7 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: Ic43f78021c3d15128f8ff0ad7533b7e388d539e0
2021-05-28 16:24:21 +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