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

Commit 45623f0b authored by Marzia Favaro's avatar Marzia Favaro Committed by Android (Google) Code Review
Browse files

Merge "Ignore geometry parent when !useTasksDimOnly" into main

parents cf25493b 93849f0b
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.graphics.Rect;
import android.util.Log;
import android.view.Surface;
@@ -128,7 +129,7 @@ class Dimmer {
        /**
         * Set the parameters to prepare the dim to be relative parented to the dimming container
         */
        void prepareReparent(@NonNull WindowContainer<?> geometryParent,
        void prepareReparent(@Nullable WindowContainer<?> geometryParent,
                @NonNull WindowState relativeParent) {
            mAnimationHelper.setRequestedRelativeParent(relativeParent);
            mAnimationHelper.setRequestedGeometryParent(geometryParent);
@@ -221,7 +222,7 @@ class Dimmer {
     * @param dimmingContainer      The container that is dimming. The dim layer will be rel-z
     *                              parented below it
     */
    public void adjustPosition(@NonNull WindowContainer<?> geometryParent,
    public void adjustPosition(@Nullable WindowContainer<?> geometryParent,
                                    @NonNull WindowState dimmingContainer) {
        if (mDimState != null) {
            mDimState.prepareReparent(geometryParent, dimmingContainer);
+1 −1
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ public class DimmerAnimationHelper {
    }

    // Sets the requested layer to reparent the dim to without applying it immediately
    void setRequestedGeometryParent(WindowContainer<?> geometryParent) {
    void setRequestedGeometryParent(@Nullable WindowContainer<?> geometryParent) {
        if (geometryParent != null) {
            mRequestedProperties.mGeometryParent = geometryParent;
        }
+1 −1
Original line number Diff line number Diff line
@@ -5215,7 +5215,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
            // but not window manager visible (!isVisibleNow()), it can still be the parent of the
            // dim, but can not create a new surface or continue a dim alone.
            Dimmer dimmer;
            WindowContainer<?> geometryParent = task;
            WindowContainer<?> geometryParent = null;
            if (Flags.useTasksDimOnly()) {
                geometryParent = getDimParent();
                dimmer = getDimController();