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

Commit 3ead1c1d authored by Chris Li's avatar Chris Li
Browse files

Move above application windows to APPLICATION_LAYER + 1

Before, some windows of types that were assigned to the
APPLICATION_LAYER. When those windows were added to the DA hierarchy,
they were added to APPLICATION_LAYER + 1. Now, we assign them to
APPLICATION_LAYER + 1 to match the hierarchy.

Bug: 157683117
Test: go/wm-smoke
Change-Id: I67689f3d9b42d4093333767813f133515e5756ee
parent edbbc447
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -761,11 +761,8 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants {
                return  1;
            case TYPE_PRESENTATION:
            case TYPE_PRIVATE_PRESENTATION:
                return  APPLICATION_LAYER;
            case TYPE_DOCK_DIVIDER:
                return  APPLICATION_LAYER;
            case TYPE_QS_DIALOG:
                return  APPLICATION_LAYER;
            case TYPE_PHONE:
                return  3;
            case TYPE_SEARCH_BAR:
@@ -852,7 +849,7 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants {
                return  35;
            default:
                Slog.e("WindowManager", "Unknown window type: " + type);
                return APPLICATION_LAYER;
                return 3;
        }
    }

+2 −2
Original line number Diff line number Diff line
@@ -318,8 +318,8 @@ class DisplayAreaPolicyBuilder {
        DisplayArea.Tokens findAreaForToken(WindowToken token) {
            int windowLayerFromType = token.getWindowLayerFromType();
            if (windowLayerFromType == APPLICATION_LAYER) {
                // TODO(display-area): Better handle AboveAppWindows in APPLICATION_LAYER
                windowLayerFromType += 1;
                throw new IllegalArgumentException(
                        "There shouldn't be WindowToken on APPLICATION_LAYER");
            } else if (token.mRoundedCornerOverlay) {
                windowLayerFromType = mMaxWindowLayer - 1;
            }