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

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

Merge "PointerLocation should not show if display is in mirror mode."

parents a3662b91 fbc8f413
Loading
Loading
Loading
Loading
+8 −4
Original line number Original line Diff line number Diff line
@@ -796,11 +796,15 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
                mTmpApplySurfaceChangesTransactionState.obscured = true;
                mTmpApplySurfaceChangesTransactionState.obscured = true;
            }
            }


            mTmpApplySurfaceChangesTransactionState.displayHasContent |=
            final boolean displayHasContent = root.handleNotObscuredLocked(w,
                    root.handleNotObscuredLocked(w,
                    mTmpApplySurfaceChangesTransactionState.obscured,
                    mTmpApplySurfaceChangesTransactionState.obscured,
                    mTmpApplySurfaceChangesTransactionState.syswin);
                    mTmpApplySurfaceChangesTransactionState.syswin);


            if (!mTmpApplySurfaceChangesTransactionState.displayHasContent
                    && !getDisplayPolicy().isWindowExcludedFromContent(w)) {
                mTmpApplySurfaceChangesTransactionState.displayHasContent |= displayHasContent;
            }

            if (w.mHasSurface && isDisplayed) {
            if (w.mHasSurface && isDisplayed) {
                final int type = w.mAttrs.type;
                final int type = w.mAttrs.type;
                if (type == TYPE_SYSTEM_DIALOG || type == TYPE_SYSTEM_ERROR
                if (type == TYPE_SYSTEM_DIALOG || type == TYPE_SYSTEM_ERROR
+14 −0
Original line number Original line Diff line number Diff line
@@ -3790,6 +3790,20 @@ public class DisplayPolicy {
        mPointerLocationView = null;
        mPointerLocationView = null;
    }
    }


    /**
     * Check if the window could be excluded from checking if the display has content.
     *
     * @param w WindowState to check if should be excluded.
     * @return True if the window type is PointerLocation which is excluded.
     */
    boolean isWindowExcludedFromContent(WindowState w) {
        if (w != null && mPointerLocationView != null) {
            return w.mClient == mPointerLocationView.getWindowToken();
        }

        return false;
    }

    @VisibleForTesting
    @VisibleForTesting
    static boolean isOverlappingWithNavBar(WindowState targetWindow, WindowState navBarWindow) {
    static boolean isOverlappingWithNavBar(WindowState targetWindow, WindowState navBarWindow) {
        if (navBarWindow == null || !navBarWindow.isVisibleLw()
        if (navBarWindow == null || !navBarWindow.isVisibleLw()