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

Commit b46ab89a authored by Tiger Huang's avatar Tiger Huang Committed by Android (Google) Code Review
Browse files

Merge "Fix DisplayPolicy#isOverlappingWithNavBar" into udc-dev

parents 7429467d c2e683bb
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -1364,9 +1364,8 @@ public class DisplayPolicy {
        applyKeyguardPolicy(win, imeTarget);

        // Check if the freeform window overlaps with the navigation bar area.
        final boolean isOverlappingWithNavBar = isOverlappingWithNavBar(win);
        if (isOverlappingWithNavBar && !mIsFreeformWindowOverlappingWithNavBar
                && win.inFreeformWindowingMode()) {
        if (!mIsFreeformWindowOverlappingWithNavBar && win.inFreeformWindowingMode()
                && win.mActivityRecord != null && isOverlappingWithNavBar(win)) {
            mIsFreeformWindowOverlappingWithNavBar = true;
        }

@@ -1454,7 +1453,7 @@ public class DisplayPolicy {
            // mode; if it's in gesture navigation mode, the navigation bar will be
            // NAV_BAR_FORCE_TRANSPARENT and its appearance won't be decided by overlapping
            // windows.
            if (isOverlappingWithNavBar) {
            if (isOverlappingWithNavBar(win)) {
                if (mNavBarColorWindowCandidate == null) {
                    mNavBarColorWindowCandidate = win;
                    addSystemBarColorApp(win);
@@ -1482,7 +1481,7 @@ public class DisplayPolicy {
                    addSystemBarColorApp(win);
                }
            }
            if (isOverlappingWithNavBar && mNavBarColorWindowCandidate == null) {
            if (isOverlappingWithNavBar(win) && mNavBarColorWindowCandidate == null) {
                mNavBarColorWindowCandidate = win;
            }
        }
@@ -2668,7 +2667,7 @@ public class DisplayPolicy {

    @VisibleForTesting
    static boolean isOverlappingWithNavBar(@NonNull WindowState win) {
        if (win.mActivityRecord == null || !win.isVisible()) {
        if (!win.isVisible()) {
            return false;
        }