/frameworks/base/services/tests/powerservicetests/src/com/android/server/power/ |
D | PowerGroupTest.java | 273 DisplayManagerInternal.DisplayPowerRequest displayPowerRequest = in testUpdateWhileAwake_UpdatesDisplayPowerRequest() local 275 assertThat(displayPowerRequest.policy).isEqualTo(POLICY_DIM); in testUpdateWhileAwake_UpdatesDisplayPowerRequest() 276 assertThat(displayPowerRequest.screenBrightnessOverride).isWithin(PRECISION).of(BRIGHTNESS); in testUpdateWhileAwake_UpdatesDisplayPowerRequest() 277 assertThat(displayPowerRequest.useProximitySensor).isEqualTo(false); in testUpdateWhileAwake_UpdatesDisplayPowerRequest() 278 assertThat(displayPowerRequest.boostScreenBrightness).isEqualTo(false); in testUpdateWhileAwake_UpdatesDisplayPowerRequest() 279 assertThat(displayPowerRequest.dozeScreenState).isEqualTo(Display.STATE_UNKNOWN); in testUpdateWhileAwake_UpdatesDisplayPowerRequest() 280 assertThat(displayPowerRequest.dozeScreenBrightness).isEqualTo( in testUpdateWhileAwake_UpdatesDisplayPowerRequest() 282 assertThat(displayPowerRequest.lowPowerMode).isEqualTo(batterySaverEnabled); in testUpdateWhileAwake_UpdatesDisplayPowerRequest() 283 assertThat(displayPowerRequest.screenLowPowerBrightnessFactor).isWithin(PRECISION).of( in testUpdateWhileAwake_UpdatesDisplayPowerRequest() 313 DisplayManagerInternal.DisplayPowerRequest displayPowerRequest = in testUpdateWhileDozing_UpdatesDisplayPowerRequest() local [all …]
|
/frameworks/base/services/tests/displayservicetests/src/com/android/server/display/state/ |
D | DisplayStateControllerTest.java | 62 DisplayManagerInternal.DisplayPowerRequest displayPowerRequest = mock( in updateProximityStateEvaluatesStateOffPolicyAsExpected() local 65 displayPowerRequest.policy = DisplayManagerInternal.DisplayPowerRequest.POLICY_OFF; in updateProximityStateEvaluatesStateOffPolicyAsExpected() 68 displayPowerRequest, DISPLAY_ENABLED, !DISPLAY_IN_TRANSITION); in updateProximityStateEvaluatesStateOffPolicyAsExpected() 71 verify(mDisplayPowerProximityStateController).updateProximityState(displayPowerRequest, in updateProximityStateEvaluatesStateOffPolicyAsExpected() 104 DisplayManagerInternal.DisplayPowerRequest displayPowerRequest = mock( in updateProximityStateWorksAsExpectedWhenDisplayDisabled() local 107 displayPowerRequest.policy = DisplayManagerInternal.DisplayPowerRequest.POLICY_BRIGHT; in updateProximityStateWorksAsExpectedWhenDisplayDisabled() 110 displayPowerRequest, !DISPLAY_ENABLED, !DISPLAY_IN_TRANSITION); in updateProximityStateWorksAsExpectedWhenDisplayDisabled() 113 verify(mDisplayPowerProximityStateController).updateProximityState(displayPowerRequest, in updateProximityStateWorksAsExpectedWhenDisplayDisabled() 122 DisplayManagerInternal.DisplayPowerRequest displayPowerRequest = mock( in updateProximityStateWorksAsExpectedWhenTransitionPhase() local 125 displayPowerRequest.policy = DisplayManagerInternal.DisplayPowerRequest.POLICY_BRIGHT; in updateProximityStateWorksAsExpectedWhenTransitionPhase() [all …]
|
/frameworks/base/services/tests/displayservicetests/src/com/android/server/display/brightness/ |
D | DisplayBrightnessStrategySelectorTest.java | 191 DisplayManagerInternal.DisplayPowerRequest displayPowerRequest = mock( in selectStrategySelectsDozeStrategyWhenValid() local 193 displayPowerRequest.policy = DisplayManagerInternal.DisplayPowerRequest.POLICY_DOZE; in selectStrategySelectsDozeStrategyWhenValid() 194 displayPowerRequest.dozeScreenBrightness = 0.2f; in selectStrategySelectsDozeStrategyWhenValid() 198 new StrategySelectionRequest(displayPowerRequest, Display.STATE_DOZE, in selectStrategySelectsDozeStrategyWhenValid() 205 DisplayManagerInternal.DisplayPowerRequest displayPowerRequest = mock( in selectStrategyDoesNotSelectDozeStrategyWhenInvalidBrightness() local 207 displayPowerRequest.policy = DisplayManagerInternal.DisplayPowerRequest.POLICY_DOZE; in selectStrategyDoesNotSelectDozeStrategyWhenInvalidBrightness() 208 displayPowerRequest.dozeScreenBrightness = PowerManager.BRIGHTNESS_INVALID_FLOAT; in selectStrategyDoesNotSelectDozeStrategyWhenInvalidBrightness() 212 new StrategySelectionRequest(displayPowerRequest, Display.STATE_DOZE, in selectStrategyDoesNotSelectDozeStrategyWhenInvalidBrightness() 229 DisplayManagerInternal.DisplayPowerRequest displayPowerRequest = mock( in selectStrategyDoesNotSelectDozeStrategyWhenOffloadSessionAutoBrightnessIsEnabled() local 231 displayPowerRequest.policy = DisplayManagerInternal.DisplayPowerRequest.POLICY_DOZE; in selectStrategyDoesNotSelectDozeStrategyWhenOffloadSessionAutoBrightnessIsEnabled() [all …]
|
D | DisplayBrightnessControllerTest.java | 119 DisplayPowerRequest displayPowerRequest = mock(DisplayPowerRequest.class); in testUpdateBrightness() local 124 mDisplayBrightnessController.updateBrightness(displayPowerRequest, targetDisplayState, mock( in testUpdateBrightness() 127 eq(new StrategyExecutionRequest(displayPowerRequest, DEFAULT_BRIGHTNESS, in testUpdateBrightness()
|
/frameworks/base/services/core/java/com/android/server/display/state/ |
D | DisplayStateController.java | 56 DisplayManagerInternal.DisplayPowerRequest displayPowerRequest, in updateDisplayState() argument 65 switch (displayPowerRequest.policy) { in updateDisplayState() 74 } else if (displayPowerRequest.dozeScreenState != Display.STATE_UNKNOWN) { in updateDisplayState() 75 state = displayPowerRequest.dozeScreenState; in updateDisplayState() 76 reason = displayPowerRequest.dozeScreenStateReason; in updateDisplayState() 89 mDisplayPowerProximityStateController.updateProximityState(displayPowerRequest, state); in updateDisplayState()
|
/frameworks/base/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/ |
D | BoostBrightnessStrategyTest.java | 50 displayPowerRequest = new DisplayManagerInternal.DisplayPowerRequest(); in testUpdateBrightnessWhenBoostBrightnessIsRequested() local 51 displayPowerRequest.boostScreenBrightness = true; in testUpdateBrightnessWhenBoostBrightnessIsRequested() 63 new StrategyExecutionRequest(displayPowerRequest, 0.2f, in testUpdateBrightnessWhenBoostBrightnessIsRequested()
|
D | DozeBrightnessStrategyTest.java | 46 DisplayPowerRequest displayPowerRequest = new DisplayPowerRequest(); in testUpdateBrightnessWhenScreenDozeStateIsRequested() local 48 displayPowerRequest.dozeScreenBrightness = dozeScreenBrightness; in testUpdateBrightnessWhenScreenDozeStateIsRequested() 60 new StrategyExecutionRequest(displayPowerRequest, 0.2f, in testUpdateBrightnessWhenScreenDozeStateIsRequested()
|
D | OverrideBrightnessStrategyTest.java | 49 displayPowerRequest = new DisplayManagerInternal.DisplayPowerRequest(); in testUpdateBrightnessWhenScreenDozeStateIsRequested() local 51 displayPowerRequest.screenBrightnessOverride = overrideBrightness; in testUpdateBrightnessWhenScreenDozeStateIsRequested() 63 new StrategyExecutionRequest(displayPowerRequest, 0.2f, in testUpdateBrightnessWhenScreenDozeStateIsRequested()
|
D | TemporaryBrightnessStrategyTest.java | 49 displayPowerRequest = new DisplayManagerInternal.DisplayPowerRequest(); in testUpdateBrightnessWhenTemporaryBrightnessIsSet() local 63 new StrategyExecutionRequest(displayPowerRequest, 0.2f, in testUpdateBrightnessWhenTemporaryBrightnessIsSet()
|
D | ScreenOffBrightnessStrategyTest.java | 48 DisplayPowerRequest displayPowerRequest = new DisplayPowerRequest(); in testUpdateBrightnessWhenScreenOffDisplayState() local 61 new StrategyExecutionRequest(displayPowerRequest, 0.2f, in testUpdateBrightnessWhenScreenOffDisplayState()
|
D | FallbackBrightnessStrategyTest.java | 49 displayPowerRequest = new DisplayManagerInternal.DisplayPowerRequest(); in updateBrightness_currentBrightnessIsSet() local 64 new StrategyExecutionRequest(displayPowerRequest, currentBrightness, in updateBrightness_currentBrightnessIsSet()
|
D | FollowerBrightnessStrategyTest.java | 48 displayPowerRequest = new DisplayManagerInternal.DisplayPowerRequest(); in testUpdateBrightness() local 64 new StrategyExecutionRequest(displayPowerRequest, 0.2f, in testUpdateBrightness()
|
D | AutomaticBrightnessStrategyTest.java | 505 DisplayManagerInternal.DisplayPowerRequest displayPowerRequest = in updateBrightness_constructsDisplayBrightnessState_withAdjustmentAutoAdjustmentFlag() local 519 .updateBrightness(new StrategyExecutionRequest(displayPowerRequest, 0.6f, in updateBrightness_constructsDisplayBrightnessState_withAdjustmentAutoAdjustmentFlag() 538 DisplayManagerInternal.DisplayPowerRequest displayPowerRequest = in updateBrightness_constructsDisplayBrightnessState_withAdjustmentTempAdjustmentFlag() local 568 .updateBrightness(new StrategyExecutionRequest(displayPowerRequest, 0.6f, in updateBrightness_constructsDisplayBrightnessState_withAdjustmentTempAdjustmentFlag() 593 DisplayManagerInternal.DisplayPowerRequest displayPowerRequest = in updateBrightness_constructsDisplayBrightnessState_withNoAdjustmentFlag_isSlowChange() local 608 .updateBrightness(new StrategyExecutionRequest(displayPowerRequest, 0.6f, in updateBrightness_constructsDisplayBrightnessState_withNoAdjustmentFlag_isSlowChange() 633 DisplayManagerInternal.DisplayPowerRequest displayPowerRequest = in updateBrightness_autoBrightnessNotApplied_noAdjustments_isNotSlowChange() local 648 .updateBrightness(new StrategyExecutionRequest(displayPowerRequest, 0.6f, in updateBrightness_autoBrightnessNotApplied_noAdjustments_isNotSlowChange()
|
D | AutoBrightnessFallbackStrategyTest.java | 102 displayPowerRequest = new DisplayManagerInternal.DisplayPowerRequest(); in testUpdateBrightnessWhenScreenDozeStateIsRequested() local 118 new StrategyExecutionRequest(displayPowerRequest, 0.2f, in testUpdateBrightnessWhenScreenDozeStateIsRequested()
|
D | OffloadBrightnessStrategyTest.java | 60 displayPowerRequest = new DisplayManagerInternal.DisplayPowerRequest(); in testUpdateBrightnessWhenOffloadBrightnessIsSet() local 75 new StrategyExecutionRequest(displayPowerRequest, 0.2f, in testUpdateBrightnessWhenOffloadBrightnessIsSet()
|
/frameworks/base/services/core/java/com/android/server/display/brightness/ |
D | DisplayBrightnessStrategySelector.java | 170 DisplayManagerInternal.DisplayPowerRequest displayPowerRequest = strategySelectionRequest in selectStrategy() local 175 } else if (shouldUseDozeBrightnessStrategy(displayPowerRequest)) { in selectStrategy() 180 } else if (displayPowerRequest.boostScreenBrightness) { in selectStrategy() 183 .isValidBrightnessValue(displayPowerRequest.screenBrightnessOverride)) { in selectStrategy() 335 DisplayManagerInternal.DisplayPowerRequest displayPowerRequest) { in shouldUseDozeBrightnessStrategy() argument 339 return displayPowerRequest.policy == DisplayManagerInternal.DisplayPowerRequest.POLICY_DOZE in shouldUseDozeBrightnessStrategy() 341 && BrightnessUtils.isValidBrightnessValue(displayPowerRequest.dozeScreenBrightness); in shouldUseDozeBrightnessStrategy()
|
D | DisplayBrightnessController.java | 148 DisplayManagerInternal.DisplayPowerRequest displayPowerRequest, in updateBrightness() argument 154 constructStrategySelectionRequest(displayPowerRequest, targetDisplayState, in updateBrightness() 157 .updateBrightness(constructStrategyExecutionRequest(displayPowerRequest)); in updateBrightness() 606 DisplayManagerInternal.DisplayPowerRequest displayPowerRequest, in constructStrategySelectionRequest() argument 614 return new StrategySelectionRequest(displayPowerRequest, targetDisplayState, in constructStrategySelectionRequest() 619 DisplayManagerInternal.DisplayPowerRequest displayPowerRequest) { in constructStrategyExecutionRequest() argument 621 return new StrategyExecutionRequest(displayPowerRequest, currentScreenBrightness, in constructStrategyExecutionRequest()
|
D | StrategyExecutionRequest.java | 35 public StrategyExecutionRequest(DisplayManagerInternal.DisplayPowerRequest displayPowerRequest, in StrategyExecutionRequest() argument 37 mDisplayPowerRequest = displayPowerRequest; in StrategyExecutionRequest()
|
D | StrategySelectionRequest.java | 43 public StrategySelectionRequest(DisplayManagerInternal.DisplayPowerRequest displayPowerRequest, in StrategySelectionRequest() argument 47 mDisplayPowerRequest = displayPowerRequest; in StrategySelectionRequest()
|
D | StrategySelectionNotifyRequest.java | 52 DisplayManagerInternal.DisplayPowerRequest displayPowerRequest, int targetDisplayState, in StrategySelectionNotifyRequest() argument 57 mDisplayPowerRequest = displayPowerRequest; in StrategySelectionNotifyRequest()
|
/frameworks/base/services/tests/displayservicetests/src/com/android/server/display/ |
D | DisplayPowerProximityStateControllerTest.java | 387 DisplayManagerInternal.DisplayPowerRequest displayPowerRequest = mock( in enableProximitySensor() local 389 displayPowerRequest.useProximitySensor = true; in enableProximitySensor() 390 mDisplayPowerProximityStateController.updateProximityState(displayPowerRequest, in enableProximitySensor() 404 DisplayManagerInternal.DisplayPowerRequest displayPowerRequest = mock( in setScreenOffBecauseOfPositiveProximityState() local 406 displayPowerRequest.useProximitySensor = true; in setScreenOffBecauseOfPositiveProximityState() 412 mDisplayPowerProximityStateController.updateProximityState(displayPowerRequest, in setScreenOffBecauseOfPositiveProximityState()
|
/frameworks/base/services/core/java/com/android/server/display/ |
D | DisplayPowerProximityStateController.java | 223 DisplayManagerInternal.DisplayPowerRequest displayPowerRequest, in updateProximityState() argument 227 if (displayPowerRequest.useProximitySensor && displayState != Display.STATE_OFF) { in updateProximityState()
|