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

Commit 25356f26 authored by Oleg Blinnikov's avatar Oleg Blinnikov Committed by Android (Google) Code Review
Browse files

Merge "Notification do not need mSyncRoot" into main

parents db13dfe6 c38b6c7d
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();