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
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 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
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
Using WindowlessWindowManager for adding a surface wihtout depend on
Window Hierarchy, we just add leash with specific theme color at
bottom z-order while One-handed trigger, and remove it when exited.
Bug: 197165590
Test: manually test One-handed mode basic operations.
Test: atest WMShellUnitTests
Change-Id: Ie53684edd4511719516c00dd64c2dfad360a593b
Before this change, margin between a hint and a camera compat control was smaller than required 8 dp while for a size compat control it was bigger than 8dp (since ag/16420818). This change makes them consistent and also simplifies layout definition for the size compat button by declaring margings explicitly rather than including them in width and height implicitly.
Test: manual
Bug: 206602997
Change-Id: I09839e764d2c8904954a594433888bfdc21d56ba
App icon badge size is based on the view size, as a ratio.
Use ConstraintLayout to define the app icon size based on constraints.
This way we do not have to recalculate the app icon size manually.
If the BadgedImageView size changes, app icon will be resized automatically.
App icon badge position is fixed to the right. If it needs to be shown
on the left, due to bubble position, we update the location using
translationX.
Bug: 162857077
Test: verified visually that bubble with app icon looks the same
Test: verified visually that when display size changes, app icon changes
together with bubble size
Test: ran WMShellUnitTests unit tests
Change-Id: I63a6cadfc7847dd0c0d9dca6bb6efd11f5b9958e
First CL in the chain that will add a camera compat UI control which will be used to correct stretched issues in TextureView and SurfaceView cause by apps not handling mismatch between camera buffers and view size correctly.
This change is necessary because right now there are 2 instances of WindowlessWindowManager (SizeCompatUIWindowManager) in SizeCompatUILayout: for a hint and for a restart button. They are also positioned relatively by computing offsets in java code rather than by specifying layout with XML. This code structure will cause issues since with upcoming camera changes there will be a need to coordinate relative position of 4 UI elements (2 buttons and 2 hints).
What is changing in this CL:
- Majority of changes are simple renaming from "size compat UI" to "compat UI" since, starting from the next change, two different compat controls will be supported.
- Merging 2 instances of SizeCompatUIWindowManager into one (CompatUIWindowManager) and for that create a joint layout in compat_ui_layout.xml
- Merge SizeCompatLayout logic into CompatUIWindowManager since in absence of 2 instances of WindowlessWindowManager there is no good reason to keep them separate.
- Merging and renaming tests to follow refactoring of the implementation.
Test: atest WMShellUnitTests (the same set of tests should be sufficient since this refactoring just reorganized the structure of the implementation)
Bug: 206602997
Change-Id: I7141c69b7ba4742c5b7b2018329b91a1b37b45bc
PiP window stays where it is instead of moving to the center and
the menu buttons are shown on centered on the pip instead of below
the window.
Additionally disabled menu items are removed to avoid cluttering.
Bug: 201270615
Test: manual
Change-Id: I9af5dc04dd0999d61add88a3475c697b376034d0
Add a new "enter split" button that allows user to go directly into
split screen on large screen devices from PiP.
- Add button
- Calculate split-screen location based on current PiP bounds
- Merge all WCT into one after animating
Video: http://recall/-/gu5DjQFZPMFpwgaXdl4cV3/gnNkSpC72tlTGP2mrKR07R
Bug: 202740657
Test: Enter PIP, open another app, tap "enter split"
Change-Id: I0829c910b2873ed4c4b0ea4fe0ca28b7f87736d8
The width of the hint is constant but the height changes with respect to the number of lines the text requires (see screenshots below). The X position of the hint is set programmatically so that the point's center will be aligned with the button's center.
Still need to add UI for different states of the button (pressed, focused, etc.) and maybe also the hint (since it's clickable). Mocks for this are still TBD.
Mocks: https://www.figma.com/file/fLAVOdDkg0lnFWiltSYbGA/Multitasking?node-id=2719%3A54196
Screenshots:
[default - 2 lines] http://screen/4EtytFiKsY3Q5NE
[LTR language] http://screen/9BSPipZYUd7UGPV
[short text - 1 line] http://screen/AN5bds6rh5V55Bw
[large font - 3 lines] http://screen/6utG596y52LBDjX
[long text - 4 lines] http://screen/7mBL2fXWy43UsTq
Bug: 198347324
Test: atest WMShellUnitTests:SizeCompatRestartButtonTest
Test: atest WMShellUnitTests:SizeCompatHintPopupTest
Test: atest atest WMShellUnitTests:SizeCompatUILayoutTest
Change-Id: Ida4c4171be94b60499cfe8acb6a2278f7e10a1f3
Remove the support of drawing side stage outline and update
OutlineManager to SplitDecorManager to help rendering decor view for
split screen like providing resizing hint.
Fix: 202740435
Fix: 202174975
Bug: 201653912
Bug: 200850654
Test: atest WMShellUnitTests
Test: manual check split resizing behavior
Merged-In: I4033255d8e2a94f69667ca1365b17da956816cde
Change-Id: I4033255d8e2a94f69667ca1365b17da956816cde
Update the style of side stage outline to match the current design. And
make sure the outline will interact properly with task bar expanding,
collapsing, swipe up, drag to split, recents shortcut to split and drag
divider bar to resize gestures.
Bug: 200850654
Test: atest WMShellUnitTests
Test: enable side stage outline, observed it behaves properly.
Change-Id: I3f0795adc34a0efb19d35b78d54364da4189a043
Use the same way to draw rounded corners beside divider bar with
display and task bar to make sure all rounded corners share the same
style.
Bug: 196272915
Test: atest WMShellUnitTests
Test: manul check the rounded corners rendered in proper position.
Change-Id: I566ef5233dc345e0229fd9637c3b05705ba35864
Draw rounded corners beside divider bar which inset with task bar if
the task bar is expanded.
Bug: 196272915
Bug: 182511830
Test: atest WMShellUnitTests
Test: manul check the rounded corners rendered in proper position.
Change-Id: I14c5a9416d52bf06b3e4c8ac843c5a65c0b940b8
- Restrict the width of the education views when
on a large screen device
- Rather than hardcode the position / padding for
the education views, figure it out based on where
the view is on the screen so that it's a little
less brittle.
- Recreate the views for theme or display size change
Test: visual - verify the user education screens
look correct in phone and on large screen
in both portrait & landscape
- change display size & verify education
is still visible & sized appropriately
Bug: 186776550
Change-Id: I1c77a810339448d61b570eb158848c15b2df96c8
- manage button should be inset from the expanded view edge
but the menu should be flush with expanded view edge.
- button size is smaller (36dp instead of 40dp)
- more padding (16dp above / below on both tablet & phone)
- diff colour N1-800 instead of N1-900
Test: visual 1 - expand a bubble and look at 'manage' button
2 - tap on the button and look at the menu
3 - do 1 & 2 on tablet & in RTL & on phone
landscape
Bug: 183658858
Change-Id: I4b5ffc26602b72ee28d26476fc222df3e2e1e80b
- padding & size updates
- scrim between bubble expanded view and the manage menu
Test: manual - expand a bubble, tap on the manage menu, it
should animate in with a scrim behind it.
Bug: 183658858
Change-Id: I3053cdb61497434a0aeb49eb33f87a3dafb364d7
the top of One-handed mode
1. Implement the Dynamic color theme at the top Tutorial area
but the color should not be the same as the recents UI.
2. Do not translate Tutorial icon & text vertically, then provide
quick subtle fade-in effect for Tutorial window.
3. Apply new icon for tutorial.
Bug: 193126258
Bug: 193589897
Test: Local verify when changing dark theme and wallpaper theme.
Test: Local verify Tutorial icon & text fade-in effect.
Test: atest SystemUITests
Test: atest WMShellTests
Test: Perfetto check enter & exit performance
Change-Id: I60f4e7a709f3a27fe6c7f480f1012caccdbbe5ec