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

Commit 9ad4696b authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge changes from topic "am-096dde419b89427988377c6c2dd9480c" into udc-dev am: 0b5e5e38

parents 99a945e4 0b5e5e38
Loading
Loading
Loading
Loading
+70 −1
Original line number Diff line number Diff line
@@ -48,6 +48,12 @@ import java.util.Objects;
public class TaskInfo {
    private static final String TAG = "TaskInfo";

    /**
     * The value to use when the property has not a specific value.
     * @hide
     */
    public static final int PROPERTY_VALUE_UNSET = -1;

    /**
     * The id of the user the task was running as if this is a leaf task. The id of the current
     * running user of the system otherwise.
@@ -229,6 +235,40 @@ public class TaskInfo {
     */
    public boolean topActivityEligibleForLetterboxEducation;

    /**
     * Whether the double tap is enabled
     * @hide
     */
    public boolean isLetterboxDoubleTapEnabled;

    /**
     * If {@link isLetterboxDoubleTapEnabled} it contains the current letterbox vertical position or
     * {@link TaskInfo.PROPERTY_VALUE_UNSET} otherwise.
     * @hide
     */
    public int topActivityLetterboxVerticalPosition;

    /**
     * If {@link isLetterboxDoubleTapEnabled} it contains the current letterbox vertical position or
     * {@link TaskInfo.PROPERTY_VALUE_UNSET} otherwise.
     * @hide
     */
    public int topActivityLetterboxHorizontalPosition;

    /**
     * If {@link isLetterboxDoubleTapEnabled} it contains the current width of the letterboxed
     * activity or {@link TaskInfo.PROPERTY_VALUE_UNSET} otherwise
     * @hide
     */
    public int topActivityLetterboxWidth;

    /**
     * If {@link isLetterboxDoubleTapEnabled} it contains the current height of the letterboxed
     * activity or {@link TaskInfo.PROPERTY_VALUE_UNSET} otherwise
     * @hide
     */
    public int topActivityLetterboxHeight;

    /**
     * Whether this task is resizable. Unlike {@link #resizeMode} (which is what the top activity
     * supports), this is what the system actually uses for resizability based on other policy and
@@ -407,7 +447,8 @@ public class TaskInfo {
    /** @hide */
    public boolean hasCompatUI() {
        return hasCameraCompatControl() || topActivityInSizeCompat
                || topActivityEligibleForLetterboxEducation;
                || topActivityEligibleForLetterboxEducation
                || isLetterboxDoubleTapEnabled;
    }

    /**
@@ -456,6 +497,12 @@ public class TaskInfo {
                && isResizeable == that.isResizeable
                && supportsMultiWindow == that.supportsMultiWindow
                && displayAreaFeatureId == that.displayAreaFeatureId
                && isLetterboxDoubleTapEnabled == that.isLetterboxDoubleTapEnabled
                && topActivityLetterboxVerticalPosition == that.topActivityLetterboxVerticalPosition
                && topActivityLetterboxWidth == that.topActivityLetterboxWidth
                && topActivityLetterboxHeight == that.topActivityLetterboxHeight
                && topActivityLetterboxHorizontalPosition
                    == that.topActivityLetterboxHorizontalPosition
                && Objects.equals(positionInParent, that.positionInParent)
                && Objects.equals(pictureInPictureParams, that.pictureInPictureParams)
                && Objects.equals(shouldDockBigOverlays, that.shouldDockBigOverlays)
@@ -484,6 +531,12 @@ public class TaskInfo {
                && topActivityInSizeCompat == that.topActivityInSizeCompat
                && topActivityEligibleForLetterboxEducation
                    == that.topActivityEligibleForLetterboxEducation
                && isLetterboxDoubleTapEnabled == that.isLetterboxDoubleTapEnabled
                && topActivityLetterboxVerticalPosition == that.topActivityLetterboxVerticalPosition
                && topActivityLetterboxHorizontalPosition
                    == that.topActivityLetterboxHorizontalPosition
                && topActivityLetterboxWidth == that.topActivityLetterboxWidth
                && topActivityLetterboxHeight == that.topActivityLetterboxHeight
                && cameraCompatControlState == that.cameraCompatControlState
                // Bounds are important if top activity has compat controls.
                && (!hasCompatUI() || configuration.windowConfiguration.getBounds()
@@ -538,6 +591,11 @@ public class TaskInfo {
        mTopActivityLocusId = source.readTypedObject(LocusId.CREATOR);
        displayAreaFeatureId = source.readInt();
        cameraCompatControlState = source.readInt();
        isLetterboxDoubleTapEnabled = source.readBoolean();
        topActivityLetterboxVerticalPosition = source.readInt();
        topActivityLetterboxHorizontalPosition = source.readInt();
        topActivityLetterboxWidth = source.readInt();
        topActivityLetterboxHeight = source.readInt();
    }

    /**
@@ -585,6 +643,11 @@ public class TaskInfo {
        dest.writeTypedObject(mTopActivityLocusId, flags);
        dest.writeInt(displayAreaFeatureId);
        dest.writeInt(cameraCompatControlState);
        dest.writeBoolean(isLetterboxDoubleTapEnabled);
        dest.writeInt(topActivityLetterboxVerticalPosition);
        dest.writeInt(topActivityLetterboxHorizontalPosition);
        dest.writeInt(topActivityLetterboxWidth);
        dest.writeInt(topActivityLetterboxHeight);
    }

    @Override
@@ -620,6 +683,12 @@ public class TaskInfo {
                + " topActivityInSizeCompat=" + topActivityInSizeCompat
                + " topActivityEligibleForLetterboxEducation= "
                        + topActivityEligibleForLetterboxEducation
                + " topActivityLetterboxed= " + isLetterboxDoubleTapEnabled
                + " topActivityLetterboxVerticalPosition= " + topActivityLetterboxVerticalPosition
                + " topActivityLetterboxHorizontalPosition= "
                        + topActivityLetterboxHorizontalPosition
                + " topActivityLetterboxWidth=" + topActivityLetterboxWidth
                + " topActivityLetterboxHeight=" + topActivityLetterboxHeight
                + " locusId=" + mTopActivityLocusId
                + " displayAreaFeatureId=" + displayAreaFeatureId
                + " cameraCompatControlState="
+699 −0

File added.

Preview size limit exceeded, changes collapsed.

+699 −0

File added.

Preview size limit exceeded, changes collapsed.

+70 −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.ReachabilityEduLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:focusable="false"
    android:focusableInTouchMode="false"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <com.android.wm.shell.compatui.ReachabilityEduHandLayout
        style="@style/ReachabilityEduHandLayout"
        android:text="@string/letterbox_reachability_reposition_text"
        app:drawableTopCompat="@drawable/reachability_education_ic_right_hand"
        android:layout_gravity="center_horizontal|top"
        android:layout_marginTop="@dimen/letterbox_reachability_education_dialog_margin"
        android:id="@+id/reachability_move_up_button"
        android:maxWidth="@dimen/letterbox_reachability_education_item_width"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"/>

    <com.android.wm.shell.compatui.ReachabilityEduHandLayout
        style="@style/ReachabilityEduHandLayout"
        android:text="@string/letterbox_reachability_reposition_text"
        app:drawableTopCompat="@drawable/reachability_education_ic_right_hand"
        android:layout_gravity="center_vertical|right"
        android:layout_marginTop="@dimen/letterbox_reachability_education_dialog_margin"
        android:id="@+id/reachability_move_right_button"
        android:maxWidth="@dimen/letterbox_reachability_education_item_width"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"/>


    <com.android.wm.shell.compatui.ReachabilityEduHandLayout
        style="@style/ReachabilityEduHandLayout"
        android:text="@string/letterbox_reachability_reposition_text"
        app:drawableTopCompat="@drawable/reachability_education_ic_left_hand"
        android:layout_gravity="center_vertical|left"
        android:layout_marginTop="@dimen/letterbox_reachability_education_dialog_margin"
        android:id="@+id/reachability_move_left_button"
        android:maxWidth="@dimen/letterbox_reachability_education_item_width"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"/>

    <com.android.wm.shell.compatui.ReachabilityEduHandLayout
        style="@style/ReachabilityEduHandLayout"
        android:text="@string/letterbox_reachability_reposition_text"
        app:drawableTopCompat="@drawable/reachability_education_ic_right_hand"
        android:layout_gravity="center_horizontal|bottom"
        android:layout_marginTop="@dimen/letterbox_reachability_education_dialog_margin"
        android:id="@+id/reachability_move_down_button"
        android:maxWidth="@dimen/letterbox_reachability_education_item_width"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"/>

</com.android.wm.shell.compatui.ReachabilityEduLayout>
+1 −1
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2022 The Android Open Source Project
  ~ 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.
Loading