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

Commit c38b6c7d authored by Oleg Blinnikov's avatar Oleg Blinnikov
Browse files

Notification do not need mSyncRoot

Change-Id: I9b36d733e40b1101ffd0430e33cdef17a8550aa6
Bug: 351955686
Test: atest ExternalDisplayPolicyTest
Flag: com.android.server.display.feature.flags.enable_connected_display_management
parent 22482c23
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -231,7 +231,7 @@ class ExternalDisplayPolicy {
        if (!isExternalDisplayAllowed()) {
            Slog.w(TAG, "handleExternalDisplayConnectedLocked: External display can not be used"
                                + " because it is currently not allowed.");
            mDisplayNotificationManager.onHighTemperatureExternalDisplayNotAllowed();
            mHandler.post(mDisplayNotificationManager::onHighTemperatureExternalDisplayNotAllowed);
            return;
        }

@@ -329,7 +329,7 @@ class ExternalDisplayPolicy {

        if (!isExternalDisplayAllowed()) {
            Slog.w(TAG, "External display is currently not allowed and is getting disabled.");
            mDisplayNotificationManager.onHighTemperatureExternalDisplayNotAllowed();
            mHandler.post(mDisplayNotificationManager::onHighTemperatureExternalDisplayNotAllowed);
        }

        mLogicalDisplayMapper.setDisplayEnabledLocked(logicalDisplay, /*enabled=*/ false);
+1 −0
Original line number Diff line number Diff line
@@ -258,6 +258,7 @@ public class ExternalDisplayPolicyTest {

        when(mMockedLogicalDisplay.isEnabledLocked()).thenReturn(false);
        mExternalDisplayPolicy.handleExternalDisplayConnectedLocked(mMockedLogicalDisplay);
        mHandler.flush();
        verify(mMockedInjector, never()).sendExternalDisplayEventLocked(any(), anyInt());
        verify(mMockedDisplayNotificationManager, times(2))
                .onHighTemperatureExternalDisplayNotAllowed();