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
104 lines
4.9 KiB
XML
104 lines
4.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
Copyright (C) 2020 The Android Open Source Project
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
<resources>
|
|
<!-- Determines whether the shell features all run on another thread. This is to be overrided
|
|
by the resources of the app using the Shell library. -->
|
|
<bool name="config_enableShellMainThread">false</bool>
|
|
|
|
<!-- Animation duration for PIP when entering. -->
|
|
<integer name="config_pipEnterAnimationDuration">425</integer>
|
|
|
|
<!-- Animation duration for PIP when exiting. -->
|
|
<integer name="config_pipExitAnimationDuration">250</integer>
|
|
|
|
<!-- Animation duration for resizing of PIP. -->
|
|
<integer name="config_pipResizeAnimationDuration">425</integer>
|
|
|
|
<!-- Animation duration for crossfading of PIP (specifically to fade out the layer on top). -->
|
|
<integer name="config_pipCrossfadeAnimationDuration">150</integer>
|
|
|
|
<!-- Allow dragging the PIP to a location to close it -->
|
|
<bool name="config_pipEnableDismissDragToEdge">true</bool>
|
|
|
|
<!-- Allow PIP to resize to a slightly bigger state upon touch/showing the menu -->
|
|
<bool name="config_pipEnableResizeForMenu">true</bool>
|
|
|
|
<!-- Allow PIP to resize via dragging the corner of PiP. -->
|
|
<bool name="config_pipEnableDragCornerResize">false</bool>
|
|
|
|
<!-- PiP minimum size, which is a % based off the shorter side of display width and height -->
|
|
<fraction name="config_pipShortestEdgePercent">40%</fraction>
|
|
|
|
<!-- Show PiP enter split icon, which allows apps to directly enter splitscreen from PiP. -->
|
|
<bool name="config_pipEnableEnterSplitButton">false</bool>
|
|
|
|
<!-- Time (duration in milliseconds) that the shell waits for an app to close the PiP by itself
|
|
if a custom action is present before closing it. -->
|
|
<integer name="config_pipForceCloseDelay">1000</integer>
|
|
|
|
<!-- Animation duration when using long press on recents to dock -->
|
|
<integer name="long_press_dock_anim_duration">250</integer>
|
|
|
|
<!-- Animation duration for translating of one handed when trigger / dismiss. -->
|
|
<integer name="config_one_handed_translate_animation_duration">600</integer>
|
|
|
|
<!-- One handed mode default offset % of display size -->
|
|
<fraction name="config_one_handed_offset">40%</fraction>
|
|
|
|
<!-- Allow one handed to enable round corner -->
|
|
<bool name="config_one_handed_enable_round_corner">true</bool>
|
|
|
|
<!-- Bounds [left top right bottom] on screen for picture-in-picture (PIP) windows,
|
|
when the PIP menu is shown in center. -->
|
|
<string translatable="false" name="pip_menu_bounds">"596 280 1324 690"</string>
|
|
|
|
<!-- Animation duration when exit starting window: fade out icon -->
|
|
<integer name="starting_window_app_reveal_icon_fade_out_duration">133</integer>
|
|
|
|
<!-- Animation duration when exit starting window: reveal app -->
|
|
<integer name="starting_window_app_reveal_anim_delay">83</integer>
|
|
|
|
<!-- Animation duration when exit starting window: reveal app -->
|
|
<integer name="starting_window_app_reveal_anim_duration">266</integer>
|
|
|
|
<!-- Default insets [LEFT/RIGHTxTOP/BOTTOM] from the screen edge for picture-in-picture windows.
|
|
These values are in DPs and will be converted to pixel sizes internally. -->
|
|
<string translatable="false" name="config_defaultPictureInPictureScreenEdgeInsets">
|
|
16x16
|
|
</string>
|
|
|
|
<!-- The percentage of the screen width to use for the default width or height of
|
|
picture-in-picture windows. Regardless of the percent set here, calculated size will never
|
|
be smaller than @dimen/default_minimal_size_pip_resizable_task. -->
|
|
<item name="config_pictureInPictureDefaultSizePercent" format="float" type="dimen">0.23</item>
|
|
|
|
<!-- The default aspect ratio for picture-in-picture windows. -->
|
|
<item name="config_pictureInPictureDefaultAspectRatio" format="float" type="dimen">
|
|
1.777778
|
|
</item>
|
|
|
|
<!-- This is the limit for the max and min aspect ratio (1 / this value) at which the min size
|
|
will be used instead of an adaptive size based loosely on area. -->
|
|
<item name="config_pictureInPictureAspectRatioLimitForMinSize" format="float" type="dimen">
|
|
1.777778
|
|
</item>
|
|
|
|
<!-- The default gravity for the picture-in-picture window.
|
|
Currently, this maps to Gravity.BOTTOM | Gravity.RIGHT -->
|
|
<integer name="config_defaultPictureInPictureGravity">0x55</integer>
|
|
</resources>
|