Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6990ff03 authored by Mateusz Cicheński's avatar Mateusz Cicheński
Browse files

Moving the resources related to PiP to the WindowManager/Shell.

Test: Test: atest WMShellUnitTests:PipBoundsAlgorithmTest
Bug: 218653892
Change-Id: Ieeff465e04cbd1bfc3ddfc47f38e11eefa9e798d
parent 4769e90c
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -24,19 +24,6 @@
    <!-- Flags enabling default window features. See Window.java -->
    <bool name="config_defaultWindowFeatureOptionsPanel">false</bool>

    <!-- 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.2</item>

    <!-- 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">24x24</string>

    <!-- The default gravity for the picture-in-picture window.
         Currently, this maps to Gravity.BOTTOM | Gravity.RIGHT -->
    <integer name="config_defaultPictureInPictureGravity">0x55</integer>

    <!-- The maximum height of the expanded horizontal picture-in-picture window -->
    <item name="config_pictureInPictureExpandedHorizontalHeight"
          format="dimension" type="dimen">110dp</item>
+0 −20
Original line number Diff line number Diff line
@@ -3704,26 +3704,6 @@
         snapped to any position between the first target and the last target. -->
    <bool name="config_dockedStackDividerFreeSnapMode">false</bool>

    <!-- 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>

    <!-- The minimum aspect ratio (width/height) that is supported for picture-in-picture.  Any
         ratio smaller than this is considered too tall and thin to be usable. Currently, this
         is the inverse of the max landscape aspect ratio (1:2.39), but this is an extremely
+0 −10
Original line number Diff line number Diff line
@@ -714,16 +714,6 @@
    <!-- The default minimal size of a resizable task, in both dimensions. -->
    <dimen name="default_minimal_size_resizable_task">220dp</dimen>

    <!-- The default minimal size of a PiP task, in both dimensions. -->
    <dimen name="default_minimal_size_pip_resizable_task">108dp</dimen>

    <!--
      The overridable minimal size of a PiP task, in both dimensions.
      Different from default_minimal_size_pip_resizable_task, this is to limit the dimension
      when the pinned stack size is overridden by app via minWidth/minHeight.
    -->
    <dimen name="overridable_minimal_size_pip_resizable_task">48dp</dimen>

    <!-- Height of a task when in minimized mode from the top when launcher is resizable. -->
    <dimen name="task_height_of_minimized_mode">80dp</dimen>

+0 −7
Original line number Diff line number Diff line
@@ -408,11 +408,6 @@
  <java-symbol type="array" name="config_localPrivateDisplayPorts" />
  <java-symbol type="integer" name="config_defaultDisplayDefaultColorMode" />
  <java-symbol type="bool" name="config_enableAppWidgetService" />
  <java-symbol type="string" name="config_defaultPictureInPictureScreenEdgeInsets" />
  <java-symbol type="dimen" name="config_pictureInPictureDefaultSizePercent" />
  <java-symbol type="dimen" name="config_pictureInPictureDefaultAspectRatio" />
  <java-symbol type="dimen" name="config_pictureInPictureAspectRatioLimitForMinSize" />
  <java-symbol type="integer" name="config_defaultPictureInPictureGravity" />
  <java-symbol type="dimen" name="config_pictureInPictureMinAspectRatio" />
  <java-symbol type="dimen" name="config_pictureInPictureMaxAspectRatio" />
  <java-symbol type="integer" name="config_pictureInPictureMaxNumberOfActions" />
@@ -2015,8 +2010,6 @@
  <java-symbol type="id" name="replace_message" />
  <java-symbol type="fraction" name="config_dimBehindFadeDuration" />
  <java-symbol type="dimen" name="default_minimal_size_resizable_task" />
  <java-symbol type="dimen" name="default_minimal_size_pip_resizable_task" />
  <java-symbol type="dimen" name="overridable_minimal_size_pip_resizable_task" />
  <java-symbol type="dimen" name="task_height_of_minimized_mode" />
  <java-symbol type="fraction" name="config_screenAutoBrightnessDozeScaleFactor" />
  <java-symbol type="bool" name="config_allowPriorityVibrationsInLowPowerMode" />
+36 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2022 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.
  -->

<!-- These resources are around just to allow their values to be customized
     for TV products.  Do not translate. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">

    <!-- 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.2</item>

    <!-- 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">
        24x24
    </string>

    <!-- The default gravity for the picture-in-picture window.
         Currently, this maps to Gravity.BOTTOM | Gravity.RIGHT -->
    <integer name="config_defaultPictureInPictureGravity">0x55</integer>
</resources>
Loading