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

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

Merge "Window Manager Flag Migration (2/n)"

parents b2de76fe 2862047f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -86,7 +86,7 @@ public class InsetsAnimationControlImplTest {
    }

    @AfterClass
    public static void tearDownOnce() throws Exception {
    public static void tearDownOnce() {
        sInsetsModeSession.close();
    }

+5 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import android.os.SystemClock;
import android.util.Slog;
import android.util.proto.ProtoOutputStream;
import android.view.View;
import android.view.ViewRootImpl;
import android.view.WindowManager;

import com.android.server.LocalServices;
@@ -89,6 +90,10 @@ public class BarController {
    }

    void setWindow(WindowState win) {
        if (ViewRootImpl.sNewInsetsMode == ViewRootImpl.NEW_INSETS_MODE_FULL) {
            // BarController gets replaced with InsetsPolicy in the full insets mode.
            return;
        }
        mWin = win;
    }

+6 −0
Original line number Diff line number Diff line
@@ -549,6 +549,7 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
    private final PointerEventDispatcher mPointerEventDispatcher;

    private final InsetsStateController mInsetsStateController;
    private final InsetsPolicy mInsetsPolicy;

    /** @see #getParentWindow() */
    private WindowState mParentWindow;
@@ -968,6 +969,7 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
        mWmService.mAnimator.addDisplayLocked(mDisplayId);
        mInputMonitor = new InputMonitor(service, mDisplayId);
        mInsetsStateController = new InsetsStateController(this);
        mInsetsPolicy = new InsetsPolicy(mInsetsStateController, this);
    }

    boolean isReady() {
@@ -1126,6 +1128,10 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
        return mInsetsStateController;
    }

    InsetsPolicy getInsetsPolicy() {
        return mInsetsPolicy;
    }

    @Surface.Rotation
    int getRotation() {
        return mDisplayRotation.getRotation();
+9 −2
Original line number Diff line number Diff line
@@ -1029,6 +1029,14 @@ public class DisplayPolicy {
                displayFrames.mDisplayCutoutSafe.top);
    }

    WindowState getStatusBar() {
        return mStatusBar;
    }

    WindowState getNavigationBar() {
        return mNavigationBar;
    }

    /**
     * Control the animation to run when a window's state changes.  Return a
     * non-0 number to force the animation to a specific resource ID, or 0
@@ -3108,8 +3116,7 @@ public class DisplayPolicy {
            return 0;
        }

        mDisplayContent.getInsetsStateController().onBarControllingWindowChanged(
                mTopFullscreenOpaqueWindowState);
        mDisplayContent.getInsetsPolicy().updateBarControlTarget(win);

        int tmpVisibility = PolicyControl.getSystemUiVisibility(win, null)
                & ~mResettingSystemUiFlags
+24 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2019 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.
 */

package com.android.server.wm;

/**
 * Generalization of an object that can control insets state.
 */
interface InsetsControlTarget {
    void notifyInsetsControlChanged();
}
Loading