Commit Graph

468 Commits

Author SHA1 Message Date
Hongwei Wang
cd2b77c796 Merge "Implement PiP custom close action on phone" into tm-dev am: 500043a457
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17716552

Change-Id: Ic1842e1427fbd4c5baba2f5b31d0ff6a3029bab1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 17:44:07 +00:00
Hongwei Wang
500043a457 Merge "Implement PiP custom close action on phone" into tm-dev 2022-04-20 17:37:44 +00:00
Chilun Huang
b8a3a1987d Merge "Use the icon size of starting surface for split decor" into tm-dev am: dc7c91de99
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17750240

Change-Id: I0faa0eda566e3d4c06ab9639d1ec026ce688d650
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 14:23:19 +00:00
Chilun Huang
dc7c91de99 Merge "Use the icon size of starting surface for split decor" into tm-dev 2022-04-20 08:44:33 +00:00
Hongwei Wang
dd51f86fd4 Implement PiP custom close action on phone
To use this new custom close action on Phone
- We expect app providing actions via
  PictureInPictureParams.Builder#setActions as they normally do
- We also expect app providing a custom close action via
  PictureInPictureParams.Builder#setCloseAction
- The custom close action is used on Phone only if it matches one of the
  actions listed in setActions (by comparing the PendingIntent)

SysUI will render the custom close action with a highlighted background
and ensures the PiP dismisses after certain timeout if the app fails to
respond in time.

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/fR0hxeorlYrxXyzfZ02btK
Bug: 223896879
Test: see video
Change-Id: I65c585ae3224061311e476753bc4c72f00c4fa33
2022-04-19 23:55:06 -07:00
Chilun Huang
2384beb3fa Use the icon size of starting surface for split decor
Use a fixed icon size and fit to centor scale for split decor to avoid
unexpected icon size. Also sync the same icon size to drop zone area.

Bug: 228928242
Test: Manual resize the split and check the icon size.
      Manual drag to split and check the icon size.
Change-Id: Idaf523810e3913a22787925817b6013464818147
2022-04-14 20:32:06 +08:00
Bill Yi
d613faacdf Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I8b28d126ae0c5d4e48ea428cf1334f37af282994
2022-04-09 05:33:11 +00:00
Galia Peycheva
2063873041 Merge "Add edu text to TV PiP" into tm-dev am: 49f5f057b6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17378167

Change-Id: Icefc4bed35df71973fbebc9e17537b8d4397ca1a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-05 06:17:57 +00:00
Galia Peycheva
2f77d84220 Merge "Add Tv Pip rounded corners tray" into tm-dev am: b26603d090
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17378166

Change-Id: I691802739ab852481a3543094c006716f00695df
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-05 06:17:05 +00:00
Galia Peycheva
49f5f057b6 Merge "Add edu text to TV PiP" into tm-dev 2022-04-05 06:01:26 +00:00
Galia Peycheva
b26603d090 Merge "Add Tv Pip rounded corners tray" into tm-dev 2022-04-05 05:59:14 +00:00
Galia Peycheva
c24734e830 Add edu text to TV PiP
The edu text is added to the bottom of the TvPipMenuView, below the
pip content. This also makes the front and back pip menu surfaces
change size while the edu text is showing. It is shown for 10 seconds
and after that it is hidden by sliding upwards. This repositions the
PiP window so that it is placed properly (centered in case of expanded
pip).

This change introduces temporary decor insets - this is for the edu
text. Temporary decor insets don't interfere with the keep-clear area
algorithm - they will not cause the pip to move if they intersect with
a keep-clear area. They are only taken into account when calculating
the anchor bounds. Permanent decor insets are also taken into account
when calculating intersecting keep-clear areas

Bug: 219884907
Test: manual - start pip and check that the edu text is displayed and
      goes away after 10 seconds
Change-Id: Ie27c633c517903a4bf0b1544626bd00b621c19d4
2022-04-04 14:33:07 +02:00
Galia Peycheva
d2d5e68312 Add Tv Pip rounded corners tray
This CL adds a permanent grey border around the pip surface, which
has rounded corners, and a backing surface, with the same color as the
border. This way the pip surface is sandwiched between the two pip menu
surfaces

Bug: 219883374
Test: m && open app in expanded pip && move pip to opposite edge
    && start dream && wake up dream && toggle expanded pip
Change-Id: Idf22ca22044e7e5e3ca6b39326e3afb76e3ee43c
2022-04-04 14:32:32 +02:00
Hongwei Wang
7fefa591d3 Merge "Handle PiP shadow radius in WMShell" into tm-dev am: b2a5b198cd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17456722

Change-Id: I2a503e280734138e2dcf3ec77f5fb526e4120644
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-30 22:25:39 +00:00
Hongwei Wang
b2a5b198cd Merge "Handle PiP shadow radius in WMShell" into tm-dev 2022-03-30 22:23:51 +00:00
Sebastián Franco
049491bc4c Merge "Brighten theme-icons when in Dark mode and add dark color for taskbar" into tm-dev am: 97a605b1d1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17004229

Change-Id: If2515cb0c257121f4b421ee41a4374d6caf0e3a4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-29 00:25:03 +00:00
Sebastián Franco
97a605b1d1 Merge "Brighten theme-icons when in Dark mode and add dark color for taskbar" into tm-dev 2022-03-29 00:00:33 +00:00
Hongwei Wang
2708c3a74d Handle PiP shadow radius in WMShell
Deprecate also the shadow radius for PiP in Task

Bug: 206508708
Test: Verify the PiP enter/exit/move/resize transitions
Change-Id: I8ff83dd4e626a3455373fed6c908cf131ecae8fe
2022-03-28 16:43:46 -07:00
Mady Mellor
7691917579 Merge "Adjust the sizes of user education for large screens / landscape" into tm-dev am: 139a3c1803
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17326808

Change-Id: I97eba92ae1b2c2b032ae420e692895f8518be265
2022-03-23 18:29:13 +00:00
Mady Mellor
139a3c1803 Merge "Adjust the sizes of user education for large screens / landscape" into tm-dev 2022-03-23 18:25:45 +00:00
Mady Mellor
9052b5c2fe Adjust the sizes of user education for large screens / landscape
When the stack is expanded on large screen devices, the bubbles are
inset from the edge of the screen. Due to this the rounded corner
on the user education view for the manage button is kinda squished
with the text. To make this look better, increase the width of this
user education view when on large screens. Use this value for
landscape on phone as well because we were doing match parent in
that scenario and it looks bad.

Additionally, on all form factors, increase the padding at the end
of the view. This makes it look a little better especially for
languages where the words can be long.


Bug: 223635730
Test: visual - force user education to show for bubbles, take a look
               at how the stack & manage user education views look
               on tablet and phone (in landscape and portrait).
Change-Id: I7bcdfff7341b8c6acad0f6f5fdcbc7fd24aa4627
2022-03-22 18:50:08 +00:00
Jacqueline Bronger
46acfb2207 Merge "Implement custom PiP close action on TV." into tm-dev am: 3c5b9738c7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17046344

Change-Id: I2cd2783f22b744219ab7a92f010d2bfa17159077
2022-03-21 08:12:49 +00:00
Jacqueline Bronger
3c5b9738c7 Merge "Implement custom PiP close action on TV." into tm-dev 2022-03-21 07:56:37 +00:00
TreeHugger Robot
6df18cf891 Merge "Import translations. DO NOT MERGE ANYWHERE" into tm-dev 2022-03-19 00:35:33 +00:00
Jacqueline Bronger
aa3a7e6273 Implement custom PiP close action on TV.
The custom close action will replace the system close action and
the button in the menu will be colored red to be able to tell it
apart.
If one of the custom actions matches the close actions it will be
removed to avoid duplicates resulting from the custom close action.

If the app doesn't close the PiP after five seconds the system will
continue to close the PiP as normal.

Bug: 218487423
Test: manual
Change-Id: Ic3c520c50ac0e3d2f0e73cf2f71d47a4f548f861
2022-03-16 16:32:02 +01:00
Bill Yi
dd0d4e2f6f Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I7bd4416c12f23d3c12cd73acb1c51ebec27ea5c6
2022-03-16 14:28:22 +00:00
Bill Yi
8d195c3d85 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I1bc341bcbd5809a117b0e929630ccd52d0a27a56
2022-03-16 14:24:07 +00:00
Winson Chung
a2ec97e5fa Merge "Fix issue with wrong style being used in landscape" into tm-dev am: 8e53c05243
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17158520

Change-Id: I9a60af6a96b1b8cb99fc3467401100768ce6ebe4
2022-03-11 05:51:10 +00:00
Winson Chung
8e53c05243 Merge "Fix issue with wrong style being used in landscape" into tm-dev 2022-03-11 05:45:09 +00:00
Winson Chung
edb03dc840 Fix issue with wrong style being used in landscape
- Legacy style was overriding the Shell landscape style for the
  divider

Bug: 213379024
Test: Build sysui from studio and verify the divider background
      is correct
Change-Id: Ic47b411fad0469c86459cc01189a722dbad8d8c3
2022-03-10 18:28:35 +00:00
Robert Horvath
c04a648d21 Merge "Move TV PiP away from keep clear areas" into tm-dev am: 3f574e253e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16940247

Change-Id: I5f5540b4024d0659a5b0db7b8545e99b6998a997
2022-03-09 09:24:00 +00:00
Robert Horvath
3f574e253e Merge "Move TV PiP away from keep clear areas" into tm-dev 2022-03-09 09:14:54 +00:00
Galia Peycheva
a47235429a Merge "Add string for tv pip edu text" into tm-dev am: 01c7c259fe
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17122946

Change-Id: I6d3c7b137cd74da7ea13bc52ecc650bc5ea27feb
2022-03-08 22:02:56 +00:00
Galia Peycheva
01c7c259fe Merge "Add string for tv pip edu text" into tm-dev 2022-03-08 21:50:21 +00:00
Robert Horvath
c4f571a27e Move TV PiP away from keep clear areas
The PiP is placed in a way to avoid keep clear areas.
If no areas overlapping the default PiP anchor position are defined,
the PiP will stay at its anchor position.
Otherwise, it will try to move to a free location closest to its anchor
position. Unrestricted areas can cause the PiP to move across the entire
screen, but restricted areas have limited influence and can only move
the PiP a short distance.
If no free position is found, the PiP will be stashed for some time.
To find the position to move to once the PiP unstashes, a relaxed search
is performed, excluding a restricted keep clear area. If this still does
not yield a position to move to, only unrestricted areas will be taken
into account. The PiP is stashed along the edge closest to the unstash
position.

Bug: 218416347
Bug: 218494300
Test: atest TvPipKeepClearAlgorithmTest
Change-Id: I76c6527320fc403bb604b188f38eed505eeaab89
2022-03-08 18:23:16 +01:00
Galia Peycheva
9258090943 Add string for tv pip edu text
Bug: 219884907
Test: m
Change-Id: I51e8a0d69954a7f9d7b3cf9d4423ddad36f5e6c3
2022-03-08 16:28:22 +01:00
Tom Natan
637385de91 Merge "[17/n] Letterbox Education: change the ripple color of the dismiss button." into tm-dev am: 81e377699b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17107548

Change-Id: I8e102992e850157610f5da5916064c642a0236e4
2022-03-08 11:07:41 +00:00
Tom Natan
81e377699b Merge "[17/n] Letterbox Education: change the ripple color of the dismiss button." into tm-dev 2022-03-08 10:24:48 +00:00
tomnatan
ecba16d6fd [17/n] Letterbox Education: change the ripple color of the dismiss button.
Bug: 215314668
Test: N/A
Change-Id: Ifa36569c6bd089868a27448d483121163f41c567
2022-03-07 19:36:24 +00:00
TreeHugger Robot
c44fdb988e Merge "Import translations. DO NOT MERGE ANYWHERE" into tm-dev 2022-03-03 08:56:12 +00:00
TreeHugger Robot
4415e6e1e3 Merge "Import translations. DO NOT MERGE ANYWHERE" into tm-dev 2022-03-03 08:49:58 +00:00
Bill Yi
a647fc0103 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I04abfaab53822bf0ca1139df5d447fce38633667
2022-03-03 06:03:26 +00:00
Bill Yi
a80600e063 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I21b331e61b40654187a6d31e837868154c1a4184
2022-03-03 05:55:45 +00:00
Mady Mellor
3a0688ed8b Update the bubble overflow to match new visuals
* The overflow has a more restricted size than previous and this size
  should be used even on large screens, not just in phone landscape.
* Updates the padding between columns & rows in the overflow view
* Reduces the line length of items in the overflow

Test: visual - look at overflow on large tablet, small tablet and
               phone across configurations
Bug: 217211205
Change-Id: I8fe8b0bd8b6c07393583d81540506a74eaa4fc10
2022-03-02 19:56:06 +00:00
Sebastian Franco
5abea4f484 Brighten theme-icons when in Dark mode and add dark color for taskbar
Bug: 217247494
Test: change between dark and light mode and transition in and out of apps
Change-Id: I4487b85f68e7ca77508a8648f6397a6f67314b91
2022-02-24 19:01:49 +00:00
Mateusz Cicheński
429c0a9769 Merge "Moving the resources related to PiP to the WindowManager/Shell." into tm-dev 2022-02-23 19:49:36 +00:00
Mady Mellor
ba688138fb Merge changes from topic "floating_dismiss" into tm-dev
* changes:
  Update PIP dismiss to use DismissView
  Update dismiss to new spec
2022-02-23 18:12:07 +00:00
Mady Mellor
953a9e14c7 Update dismiss to new spec
1 - larger gradient (same for both phone & tablet)
2 - gradient is now based on theme color

Test: manual - have a bubble, drag to dismiss it, observe the gradient
Bug: 217211205
Change-Id: Ibef23992089f0ae33dd93f9528a3ea2887aae465
2022-02-22 14:16:48 -08:00
Mady Mellor
9294a41db2 Adjustments to expanded view size and position
* Previously on large screens the expanded view was centered on the
  screen now it will be anchored to whichever edge it was expanded on
  ONLY when in landscape on a large large screen. In portrait, and on
  "small tablets" it will continue to be centered.
* Updates the width of the expanded view on portrait and on landscape
  for large screens.
* Adds the notion of small tablet

Test: manual - Open a bubble in various configurations:
      1) on phone:
        * landscape => bubbles show vertically on the side they were
          expanded on and expanded view is centered horizontally
        * portrait => bubbles show on top, expanded view centered
          horizontally
      2) on tablet that isn't small:
        * landscape => bubbles show vertically on the side they were
          expanded on and the expanded view is anchored to that edge
          with some padding
        * portrait => bubbles show vertically on the side they were
          expanded on and expanded view is centered horizontally
      3) on small tablet:
        * portrait & landscape => bubbles show vertically on the side
          they were expanded on and the expanded view is centered
          horizontally and takes up more space %-wise compared to a
          large tablet
Bug: 217211205
Change-Id: I7259e03aab35e0039c9b7bd855c12afe38373ace
2022-02-22 14:04:12 -08:00
Mateusz Cicheński
6990ff032c Moving the resources related to PiP to the WindowManager/Shell.
Test: Test: atest WMShellUnitTests:PipBoundsAlgorithmTest
Bug: 218653892
Change-Id: Ieeff465e04cbd1bfc3ddfc47f38e11eefa9e798d
2022-02-18 19:02:26 +00:00