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

Commit 423af922 authored by Automerger Merge Worker's avatar Automerger Merge Worker Committed by Android (Google) Code Review
Browse files

Merge "Merge "Fixed an issue where icons could be stuck overlapping" into...

Merge "Merge "Fixed an issue where icons could be stuck overlapping" into rvc-dev am: 978cb2fe am: d84feccf am: 691e0bab" into rvc-qpr-dev-plus-aosp
parents db42301c 1ff30c0e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -572,6 +572,9 @@ public class NotificationIconAreaController implements DarkReceiver,
                    .setInterpolator(Interpolators.LINEAR)
                    .setDuration(AOD_ICONS_APPEAR_DURATION)
                    .start();
        } else {
            mAodIcons.setAlpha(1.0f);
            mAodIcons.setTranslationY(0);
        }
    }

+12 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

import android.testing.AndroidTestingRunner;
@@ -56,6 +57,8 @@ public class NotificationIconAreaControllerTest extends SysuiTestCase {
    @Mock
    NotificationMediaManager mNotificationMediaManager;
    @Mock
    NotificationIconContainer mNotificationIconContainer;
    @Mock
    DozeParameters mDozeParameters;
    @Mock
    NotificationShadeWindowView mNotificationShadeWindowView;
@@ -67,7 +70,7 @@ public class NotificationIconAreaControllerTest extends SysuiTestCase {

        when(mStatusBar.getNotificationShadeWindowView()).thenReturn(mNotificationShadeWindowView);
        when(mNotificationShadeWindowView.findViewById(anyInt())).thenReturn(
                        mock(NotificationIconContainer.class));
                mNotificationIconContainer);

        mController = new NotificationIconAreaController(mContext, mStatusBar,
                mStatusBarStateController, mWakeUpCoordinator, mKeyguardBypassController,
@@ -87,4 +90,12 @@ public class NotificationIconAreaControllerTest extends SysuiTestCase {

        assertTrue(mController.shouldShouldLowPriorityIcons());
    }

    @Test
    public void testAppearResetsTranslation() {
        when(mDozeParameters.shouldControlScreenOff()).thenReturn(false);
        mController.appearAodIcons();
        verify(mNotificationIconContainer).setTranslationY(0);
        verify(mNotificationIconContainer).setAlpha(1.0f);
    }
}