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

Commit a228b8f9 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Timeout aod wallpaper while docking"

parents 6868ae6b c12e4603
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -360,7 +360,8 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, OnCo
            return false;
        }

        if (mState == ScrimState.AOD && mDozeParameters.getAlwaysOn()) {
        if (mState == ScrimState.AOD
                && (mDozeParameters.getAlwaysOn() || mDockManager.isDocked())) {
            return true;
        }

+11 −0
Original line number Diff line number Diff line
@@ -759,6 +759,17 @@ public class ScrimControllerTest extends SysuiTestCase {
        verify(mAlarmManager).cancel(any(AlarmManager.OnAlarmListener.class));
    }

    @Test
    public void testWillHideDockedWallpaper() {
        mAlwaysOnEnabled = false;
        when(mDockManager.isDocked()).thenReturn(true);
        mScrimController.setWallpaperSupportsAmbientMode(true);

        mScrimController.transitionTo(ScrimState.AOD);

        verify(mAlarmManager).setExact(anyInt(), anyLong(), any(), any(), any());
    }

    @Test
    public void testConservesExpansionOpacityAfterTransition() {
        mScrimController.transitionTo(ScrimState.UNLOCKED);