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

Commit 6ae8eb81 authored by Lingyu Feng's avatar Lingyu Feng Committed by Android (Google) Code Review
Browse files

Merge "Don't allow content mode switch on rear display" into main

parents c9aa38fc 6cfdb712
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -3271,7 +3271,12 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
            return false;
        }

        // TODO(b/391965805): Remove this after introducing FLAG_ALLOW_SYSTEM_DECORATIONS_CHANGE.
        // TODO(b/391965805): Remove this after introducing FLAG_ALLOW_CONTENT_MODE_SWITCH.
        if ((mDisplay.getFlags() & Display.FLAG_REAR) != 0) {
            return false;
        }

        // TODO(b/391965805): Remove this after introducing FLAG_ALLOW_CONTENT_MODE_SWITCH.
        // Virtual displays cannot add or remove system decorations during their lifecycle.
        if (mDisplay.getType() == Display.TYPE_VIRTUAL) {
            return false;