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

Commit 93dea69a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Call layoutAndAssignWindowLayersIfNeeded while holding mGlobalLock"

parents 146c5d9f 3f38f263
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -24,6 +24,8 @@ import static android.view.ViewRootImpl.NEW_INSETS_MODE_IME;
import static android.view.ViewRootImpl.NEW_INSETS_MODE_NONE;
import static android.view.ViewRootImpl.sNewInsetsMode;

import static com.android.server.wm.WindowManagerService.H.LAYOUT_AND_ASSIGN_WINDOW_LAYERS_IF_NEEDED;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.graphics.Point;
@@ -36,7 +38,6 @@ import android.view.SurfaceControl;
import android.view.SurfaceControl.Transaction;

import com.android.internal.util.function.TriConsumer;
import com.android.internal.util.function.pooled.PooledLambda;
import com.android.server.wm.SurfaceAnimator.OnAnimationFinishedCallback;

import java.io.PrintWriter;
@@ -222,8 +223,8 @@ class InsetsSourceProvider {
            return;
        }
        mClientVisible = clientVisible;
        mDisplayContent.mWmService.mH.sendMessage(PooledLambda.obtainMessage(
                DisplayContent::layoutAndAssignWindowLayersIfNeeded, mDisplayContent));
        mDisplayContent.mWmService.mH.obtainMessage(
                LAYOUT_AND_ASSIGN_WINDOW_LAYERS_IF_NEEDED, mDisplayContent).sendToTarget();
        updateVisibility();
    }

+8 −0
Original line number Diff line number Diff line
@@ -4511,6 +4511,7 @@ public class WindowManagerService extends IWindowManager.Stub
        public static final int ANIMATION_FAILSAFE = 60;
        public static final int RECOMPUTE_FOCUS = 61;
        public static final int ON_POINTER_DOWN_OUTSIDE_FOCUS = 62;
        public static final int LAYOUT_AND_ASSIGN_WINDOW_LAYERS_IF_NEEDED = 63;

        /**
         * Used to denote that an integer field in a message will not be used.
@@ -4885,6 +4886,13 @@ public class WindowManagerService extends IWindowManager.Stub
                    }
                    break;
                }
                case LAYOUT_AND_ASSIGN_WINDOW_LAYERS_IF_NEEDED: {
                    synchronized (mGlobalLock) {
                        final DisplayContent displayContent = (DisplayContent) msg.obj;
                        displayContent.layoutAndAssignWindowLayersIfNeeded();
                    }
                    break;
                }
            }
            if (DEBUG_WINDOW_TRACE) {
                Slog.v(TAG_WM, "handleMessage: exit");