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
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
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
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
Deprecate also the shadow radius for PiP in Task
Bug: 206508708
Test: Verify the PiP enter/exit/move/resize transitions
Change-Id: I8ff83dd4e626a3455373fed6c908cf131ecae8fe
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
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
- 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
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
* 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
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
* 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
We set the dialog width to the maximum between 472dp (to be consistent with the standard android dialog width) and the task width minus margin.
We also add a 16dp margin between the dialog container and the task
stable bounds (task bound excluding insets).
Overflow in width will be handled by texts wraping to multiple lines and
overflow in height will be handled by making the dialog scrollable.
In addition, a 500ms start delay is added to enter animation.
Bug: 215314668
Test: N/A
Change-Id: I4b11096e124ae8632bff6390700e7519acdcefa0
- Launch into expanded PiP
- Let user toggle expanded PiP in Menu
- Update moving the PiP via DPAD for expanded PiP
- Let app dynamically change the expanded PiP aspect ratio
- Let app dynamically change the PiP aspect ratio
- Let app dynamically enable/disable expanded PiP
Bug: 203647003
Test: atest PinnedStackTests#testEnterExpandedPipAspectRatio
Test: atest PinnedStackTests#testEnterExpandedPipAspectRatioMaxWidth
Test: atest PinnedStackTests#testEnterExpandedPipAspectRatioMaxHeight
Change-Id: Ie7de6a7fcc424b0c086fdae1f66aa8de42e53b0c
In addition, remove the overlay layout and include it in the dialog
layout as the background of the top-level layout (renamed as dimmer).
Test: N/A
Bug: 207010227
Change-Id: I658e85378ec266c4260b520b5fcdddbfb66b35c6
The toast is no longer needed since we decided to only show the
letterbox education once as a dialog.
Test: N/A
Bug: 207010227
Change-Id: I1dccf10d0effad111d8ee8e62a068e4dee571c20