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
This commit is contained in:
Adrian Roos
2017-04-27 15:50:14 -07:00
parent 0bcbe90c20
commit 2324d8578a
3 changed files with 4 additions and 2 deletions

View File

@@ -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:

View File

@@ -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

View File

@@ -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