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

Commit 569d5ad3 authored by Fiona Campbell's avatar Fiona Campbell
Browse files

Keep overlay displays in the default power group

- Overlay displays should be added to the default power group, since
  them staying on relies upon the power state of the underlying display.
- Add logging

Bug: 433040478
Bug: 362720020
Flag: EXEMPT minor bug fix
Test: atest KeepScreenOnTests
Test: atest DisplayServiceTests
Change-Id: Id145ce21d154b913e32da9df84ca9d58eab941f6
parent c68f15b0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -123,7 +123,8 @@ class DisplayGroupAllocator {
        // desktop mode not supported on device or this display
        // or display is internal, and should be in a different group to the
        // projected and extended mode displays.
        if (!mCanDeviceEnterDesktopMode || type == Display.TYPE_INTERNAL) {
        if (!mCanDeviceEnterDesktopMode || type == Display.TYPE_INTERNAL
                || type == Display.TYPE_OVERLAY) {
            return REASON_NON_DESKTOP;
        }

+2 −1
Original line number Diff line number Diff line
@@ -1151,7 +1151,8 @@ class LogicalDisplayMapper implements DisplayDeviceRepository.Listener {
            Slog.i(TAG, "Setting new display group " + groupId + " for display "
                    + displayId + ", from previous group: "
                    + (oldGroup != null ? oldGroup.getGroupId() : "null")
                    + ", for reason: " + mDisplayGroupAllocator.getReason());
                    + ", for reason: " + mDisplayGroupAllocator.getReason()
                    + ", with flags: " + newGroup.getFlags());
        }
    }