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

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

Merge "Fix display events emitted when override info changed" into main

parents 909efe18 a7e006da
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -890,10 +890,12 @@ class LogicalDisplayMapper implements DisplayDeviceRepository.Listener {
                // still need to let WindowManager know so it can update its own internal state for
                // things like display cutouts.
                display.getNonOverrideDisplayInfoLocked(mTempDisplayInfo);
                if (!mTempNonOverrideDisplayInfo.equals(mTempDisplayInfo)) {
                    logicalDisplayEventMask |= LOGICAL_DISPLAY_EVENT_BASIC_CHANGED
                            | LOGICAL_DISPLAY_EVENT_REFRESH_RATE_CHANGED;
                if (!mTempNonOverrideDisplayInfo.equals(mTempDisplayInfo,
                        /* compareOnlyBasicChanges */ true)) {
                    logicalDisplayEventMask |= LOGICAL_DISPLAY_EVENT_BASIC_CHANGED;
                }
                logicalDisplayEventMask
                        |= updateAndGetMaskForDisplayPropertyChanges(mTempNonOverrideDisplayInfo);
            }
            mLogicalDisplaysToUpdate.put(displayId, logicalDisplayEventMask);
            mUpdatedLogicalDisplays.put(displayId, UPDATE_STATE_UPDATED);
+1 −2
Original line number Diff line number Diff line
@@ -984,8 +984,7 @@ public class DisplayManagerServiceTest {

        Handler handler = displayManager.getDisplayHandler();
        waitForIdleHandler(handler);
        assertThat(callback.receivedEvents()).containsExactly(EVENT_DISPLAY_BASIC_CHANGED,
                EVENT_DISPLAY_REFRESH_RATE_CHANGED);
        assertThat(callback.receivedEvents()).containsExactly(EVENT_DISPLAY_BASIC_CHANGED);
    }

    /**