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

Commit 978cb2fe authored by Selim Cinek's avatar Selim Cinek Committed by Android (Google) Code Review
Browse files

Merge "Fixed an issue where icons could be stuck overlapping" into rvc-dev

parents 161d39b4 b750abc8
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);
    }
}