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

Commit 2324d857 authored by Adrian Roos's avatar Adrian Roos
Browse files

AOD: Don't use DOZE screen state on AOD2

Fixes an issue where AOD2 had low color gamut. Instead, we now use
the high-power screen state there.

Bug: 36781008
Test: Receive notification on AOD2, observe that color is not distorted
Change-Id: I370a74c0f1d5cfd49194b53b9e20bf1f0dc5d4d0
parent 0bcbe90c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@ public class DozeMachine {
                case DOZE_AOD_PAUSED:
                    return Display.STATE_OFF;
                case DOZE_PULSING:
                    return Display.STATE_DOZE;
                    return Display.STATE_ON;
                case DOZE_AOD:
                    return Display.STATE_DOZE_SUSPEND;
                default:
+2 −0
Original line number Diff line number Diff line
@@ -60,6 +60,8 @@ public class DozeService extends DreamService implements DozeMachine.Service {
        super.onDreamingStarted();
        mDozeMachine.requestState(DozeMachine.State.INITIALIZED);
        startDozing();
        setDozeScreenBrightness(getResources().getInteger(
                com.android.internal.R.integer.config_screenBrightnessDoze));
    }

    @Override
+1 −1
Original line number Diff line number Diff line
@@ -238,7 +238,7 @@ public class DozeMachineTest {
        mMachine.requestState(DOZE_REQUEST_PULSE);
        mMachine.requestState(DOZE_PULSING);

        assertEquals(Display.STATE_DOZE, mServiceFake.screenState);
        assertEquals(Display.STATE_ON, mServiceFake.screenState);
    }

    @Test