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

Commit 137374fd 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:...

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

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

Change-Id: I213ace58286e2d0e653e0658015a6714f89c9ed4
parents 67e432ff 7c040ad1
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);
    }
}