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

Commit 5932552e authored by Rupesh Bansal's avatar Rupesh Bansal Committed by Android (Google) Code Review
Browse files

Merge "Dont record adjacent display if non-internal" into main

parents 9f881cdb c2edb97c
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -1131,8 +1131,15 @@ class LogicalDisplayMapper implements DisplayDeviceRepository.Listener {

            int reason = mDisplayGroupAllocator.getContentModeForDisplayLocked(
                    display, displayDeviceInfo.type);
            if (reason == REASON_PROJECTED || reason == REASON_EXTENDED
                    || reason == REASON_NON_DESKTOP) {

            // We set the flag only if the group being created is a non-default group, is internal
            // or external(We don't want to set FLAG_DEFAULT_GROUP_ADJACENT for virtual displays)
            // and is in projected,extended or non desktop mode
            if (groupId != Display.DEFAULT_DISPLAY_GROUP
                    && (displayDeviceInfo.type == Display.TYPE_INTERNAL
                            || displayDeviceInfo.type == Display.TYPE_EXTERNAL)
                    && (reason == REASON_PROJECTED || reason == REASON_EXTENDED
                    || reason == REASON_NON_DESKTOP)) {
                newGroup.setFlags(DisplayGroup.FLAG_DEFAULT_GROUP_ADJACENT);
            }
        }