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

Commit 2229cb51 authored by Selim Cinek's avatar Selim Cinek Committed by Automerger Merge Worker
Browse files

Merge "Fixed an issue where icons could be stuck overlapping" into rvc-dev am: 978cb2fe

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11713320

Change-Id: Ic289b2d2be16ac10c8b97129e28627b51f4dfc75
parents 4b247925 978cb2fe
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);
    }
}