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

Commit 14280a35 authored by Jacqueline Bronger's avatar Jacqueline Bronger Committed by Automerger Merge Worker
Browse files

Merge changes from topics "presubmit-am-5a31146ec7864d04ab14351725610831",...

Merge changes from topics "presubmit-am-5a31146ec7864d04ab14351725610831", "presubmit-am-bcec5630c20a4c7ca37a5694c6a3b126" into tm-dev am: a512a9b9

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18029564



Change-Id: I16eabbe98f9257d4cbd24a7f216383c38a75535e
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents b6a40eb6 a512a9b9
Loading
Loading
Loading
Loading
+53 −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.
  -->

<selector
    xmlns:android="http://schemas.android.com/apk/res/android">

    <item android:state_focused="true">
        <set>
            <objectAnimator
                android:duration="200"
                android:propertyName="scaleX"
                android:valueFrom="1.0"
                android:valueTo="1.1"
                android:valueType="floatType"/>
            <objectAnimator
                android:duration="200"
                android:propertyName="scaleY"
                android:valueFrom="1.0"
                android:valueTo="1.1"
                android:valueType="floatType"/>
        </set>
    </item>
    <item android:state_focused="false">
        <set>
            <objectAnimator
                android:duration="200"
                android:propertyName="scaleX"
                android:valueFrom="1.1"
                android:valueTo="1.0"
                android:valueType="floatType"/>
            <objectAnimator
                android:duration="200"
                android:propertyName="scaleY"
                android:valueFrom="1.1"
                android:valueTo="1.0"
                android:valueType="floatType"/>
        </set>
    </item>
</selector>
 No newline at end of file
+14 −15
Original line number Diff line number Diff line
@@ -21,10 +21,13 @@
            android:layout_height="match_parent"
            android:gravity="center|top">

    <!-- Matches the PiP app content -->
    <View
        android:id="@+id/tv_pip"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:alpha="0"
        android:background="@color/tv_pip_menu_background"
        android:layout_marginTop="@dimen/pip_menu_outer_space"
        android:layout_marginStart="@dimen/pip_menu_outer_space"
        android:layout_marginEnd="@dimen/pip_menu_outer_space"/>
@@ -33,7 +36,6 @@
        android:id="@+id/tv_pip_menu_scroll"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center_horizontal"
        android:layout_alignTop="@+id/tv_pip"
        android:layout_alignStart="@+id/tv_pip"
        android:layout_alignEnd="@+id/tv_pip"
@@ -49,15 +51,12 @@
        android:layout_alignStart="@+id/tv_pip"
        android:layout_alignEnd="@+id/tv_pip"
        android:layout_alignBottom="@+id/tv_pip"
        android:gravity="center_vertical"
        android:scrollbars="none">

        <LinearLayout
            android:id="@+id/tv_pip_menu_action_buttons"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:gravity="center"
            android:layout_gravity="center"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:alpha="0">

@@ -72,12 +71,21 @@
                android:src="@drawable/pip_ic_fullscreen_white"
                android:text="@string/pip_fullscreen" />

            <com.android.wm.shell.pip.tv.TvPipMenuActionButton
                android:id="@+id/tv_pip_menu_close_button"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/pip_ic_close_white"
                android:text="@string/pip_close" />

            <!-- More TvPipMenuActionButtons may be added here at runtime. -->

            <com.android.wm.shell.pip.tv.TvPipMenuActionButton
                android:id="@+id/tv_pip_menu_move_button"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/pip_ic_move_white"
                android:text="@String/pip_move" />
                android:text="@string/pip_move" />

            <com.android.wm.shell.pip.tv.TvPipMenuActionButton
                android:id="@+id/tv_pip_menu_expand_button"
@@ -87,15 +95,6 @@
                android:visibility="gone"
                android:text="@string/pip_collapse" />

            <com.android.wm.shell.pip.tv.TvPipMenuActionButton
                android:id="@+id/tv_pip_menu_close_button"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/pip_ic_close_white"
                android:text="@string/pip_close" />

            <!-- More TvPipMenuActionButtons may be added here at runtime. -->

            <Space
                android:layout_width="@dimen/pip_menu_button_wrapper_margin"
                android:layout_height="@dimen/pip_menu_button_wrapper_margin"/>
+9 −2
Original line number Diff line number Diff line
@@ -20,10 +20,17 @@
        android:id="@+id/button"
        android:layout_width="@dimen/pip_menu_button_size"
        android:layout_height="@dimen/pip_menu_button_size"
        android:layout_margin="@dimen/pip_menu_button_margin"
        android:background="@drawable/tv_pip_button_bg"
        android:padding="@dimen/pip_menu_button_margin"
        android:stateListAnimator="@animator/tv_pip_menu_action_button_animator"
        android:focusable="true">

        <View android:id="@+id/background"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:layout_gravity="center"
              android:duplicateParentState="true"
              android:background="@drawable/tv_pip_button_bg"/>

        <ImageView android:id="@+id/icon"
                   android:layout_width="@dimen/pip_menu_icon_size"
                   android:layout_height="@dimen/pip_menu_icon_size"
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@
-->
<resources>
    <!-- The dimensions to user for picture-in-picture action buttons. -->
    <dimen name="pip_menu_button_size">40dp</dimen>
    <dimen name="pip_menu_button_size">48dp</dimen>
    <dimen name="pip_menu_button_radius">20dp</dimen>
    <dimen name="pip_menu_icon_size">20dp</dimen>
    <dimen name="pip_menu_button_margin">4dp</dimen>
+2 −0
Original line number Diff line number Diff line
@@ -384,6 +384,7 @@ public class TvPipController implements PipTransitionController.PipTransitionCal
                animationDuration, rect -> {
                    mTvPipMenuController.updateExpansionState();
                });
        mTvPipMenuController.onPipTransitionStarted(bounds);
    }

    /**
@@ -573,6 +574,7 @@ public class TvPipController implements PipTransitionController.PipTransitionCal
                            "%s: onExpandedAspectRatioChanged: %f", TAG, ratio);

                mTvPipBoundsState.setDesiredTvExpandedAspectRatio(ratio, false);
                mTvPipMenuController.updateExpansionState();

                // 1) PiP is expanded and only aspect ratio changed, but wasn't disabled
                // --> update bounds, but don't toggle
Loading