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

Commit b219a56f authored by Massimo Carli's avatar Massimo Carli Committed by Android (Google) Code Review
Browse files

Merge "[4/n] Add User Aspect Ratio Button" into udc-qpr-dev

parents fa4467c2 17b28d34
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -247,6 +247,13 @@ public class TaskInfo {
     */
    public boolean topActivityEligibleForUserAspectRatioButton;

    /**
     * Whether the user has forced the activity to be fullscreen through the user aspect ratio
     * settings.
     * @hide
     */
    public boolean isUserFullscreenOverrideEnabled;

    /**
     * Hint about the letterbox state of the top activity.
     * @hide
@@ -543,7 +550,8 @@ public class TaskInfo {
                && isSleeping == that.isSleeping
                && Objects.equals(mTopActivityLocusId, that.mTopActivityLocusId)
                && parentTaskId == that.parentTaskId
                && Objects.equals(topActivity, that.topActivity);
                && Objects.equals(topActivity, that.topActivity)
                && isUserFullscreenOverrideEnabled == that.isUserFullscreenOverrideEnabled;
    }

    /**
@@ -574,7 +582,8 @@ public class TaskInfo {
                && (!hasCompatUI() || configuration.getLayoutDirection()
                    == that.configuration.getLayoutDirection())
                && (!hasCompatUI() || configuration.uiMode == that.configuration.uiMode)
                && (!hasCompatUI() || isVisible == that.isVisible);
                && (!hasCompatUI() || isVisible == that.isVisible)
                && isUserFullscreenOverrideEnabled == that.isUserFullscreenOverrideEnabled;
    }

    /**
@@ -630,6 +639,7 @@ public class TaskInfo {
        topActivityLetterboxHorizontalPosition = source.readInt();
        topActivityLetterboxWidth = source.readInt();
        topActivityLetterboxHeight = source.readInt();
        isUserFullscreenOverrideEnabled = source.readBoolean();
    }

    /**
@@ -686,6 +696,7 @@ public class TaskInfo {
        dest.writeInt(topActivityLetterboxHorizontalPosition);
        dest.writeInt(topActivityLetterboxWidth);
        dest.writeInt(topActivityLetterboxHeight);
        dest.writeBoolean(isUserFullscreenOverrideEnabled);
    }

    @Override
@@ -732,6 +743,7 @@ public class TaskInfo {
                        + topActivityLetterboxHorizontalPosition
                + " topActivityLetterboxWidth=" + topActivityLetterboxWidth
                + " topActivityLetterboxHeight=" + topActivityLetterboxHeight
                + " isUserFullscreenOverrideEnabled=" + isUserFullscreenOverrideEnabled
                + " locusId=" + mTopActivityLocusId
                + " displayAreaFeatureId=" + displayAreaFeatureId
                + " cameraCompatControlState="
+34 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2023 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.
  -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="48dp"
        android:height="48dp"
        android:viewportWidth="48"
        android:viewportHeight="48">
    <path
        android:fillColor="@color/compat_controls_background"
        android:strokeAlpha="0.8"
        android:fillAlpha="0.8"
        android:pathData="M0,24 a24,24 0 1,0 48,0 a24,24 0 1,0 -48,0"/>
    <group
        android:translateX="12"
        android:translateY="12">
        <path
            android:fillColor="@color/compat_controls_text"
            android:pathData="M19,12h-2v3h-3v2h5v-5zM7,9h3L10,7L5,7v5h2L7,9zM21,3L3,3c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h18c1.1,0 2,-0.9 2,-2L23,5c0,-1.1 -0.9,-2 -2,-2zM21,19.01L3,19.01L3,4.99h18v14.02z"/>
    </group>
</vector>
+20 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2023 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.
  -->
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
        android:color="@color/compat_background_ripple">
    <item android:drawable="@drawable/user_aspect_ratio_settings_button"/>
</ripple>
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@

    <include android:id="@+id/size_compat_hint"
        android:visibility="gone"
        android:layout_width="@dimen/size_compat_hint_width"
        android:layout_width="@dimen/compat_hint_width"
        android:layout_height="wrap_content"
        layout="@layout/compat_mode_hint"/>

+41 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2023 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.
  -->
<com.android.wm.shell.compatui.UserAspectRatioSettingsLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:gravity="bottom|end">

    <include android:id="@+id/user_aspect_ratio_settings_hint"
        android:visibility="gone"
        android:layout_width="@dimen/compat_hint_width"
        android:layout_height="wrap_content"
        layout="@layout/compat_mode_hint"/>

    <ImageButton
        android:id="@+id/user_aspect_ratio_settings_button"
        android:visibility="gone"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="@dimen/compat_button_margin"
        android:layout_marginBottom="@dimen/compat_button_margin"
        android:src="@drawable/user_aspect_ratio_settings_button_ripple"
        android:background="@android:color/transparent"
        android:contentDescription="@string/user_aspect_ratio_settings_button_description"/>

</com.android.wm.shell.compatui.UserAspectRatioSettingsLayout>
Loading