Home
last modified time | relevance | path

Searched refs:FLOAT_TOLERANCE (Results 1 – 20 of 20) sorted by relevance

/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DRefreshRatePolicyTest.java20 import static android.view.SurfaceControl.RefreshRateRange.FLOAT_TOLERANCE;
133 assertEquals(0, mPolicy.getPreferredMinRefreshRate(cameraUsingWindow), FLOAT_TOLERANCE); in testCamera()
134 assertEquals(0, mPolicy.getPreferredMaxRefreshRate(cameraUsingWindow), FLOAT_TOLERANCE); in testCamera()
141 mPolicy.getPreferredMinRefreshRate(cameraUsingWindow), FLOAT_TOLERANCE); in testCamera()
143 mPolicy.getPreferredMaxRefreshRate(cameraUsingWindow), FLOAT_TOLERANCE); in testCamera()
148 assertEquals(0, mPolicy.getPreferredMinRefreshRate(cameraUsingWindow), FLOAT_TOLERANCE); in testCamera()
149 assertEquals(0, mPolicy.getPreferredMaxRefreshRate(cameraUsingWindow), FLOAT_TOLERANCE); in testCamera()
160 assertEquals(0, mPolicy.getPreferredMinRefreshRate(cameraUsingWindow), FLOAT_TOLERANCE); in testCameraRange()
161 assertEquals(0, mPolicy.getPreferredMaxRefreshRate(cameraUsingWindow), FLOAT_TOLERANCE); in testCameraRange()
168 mPolicy.getPreferredMinRefreshRate(cameraUsingWindow), FLOAT_TOLERANCE); in testCameraRange()
[all …]
/frameworks/base/services/tests/displayservicetests/src/com/android/server/display/brightness/clamper/
DHdrClamperTest.java54 private static final float FLOAT_TOLERANCE = 0.0001f; field in HdrClamperTest
149 assertEquals(PowerManager.BRIGHTNESS_MAX, mHdrClamper.getMaxBrightness(), FLOAT_TOLERANCE); in testClamper_AmbientLuxChangesAboveLimit()
150 assertEquals(-1, mHdrClamper.getTransitionRate(), FLOAT_TOLERANCE); in testClamper_AmbientLuxChangesAboveLimit()
160 assertEquals(PowerManager.BRIGHTNESS_MAX, mHdrClamper.getMaxBrightness(), FLOAT_TOLERANCE); in testClamper_AmbientLuxChangesBelowLimit_MaxDecrease()
161 assertEquals(-1, mHdrClamper.getTransitionRate(), FLOAT_TOLERANCE); in testClamper_AmbientLuxChangesBelowLimit_MaxDecrease()
165 assertEquals(0.6f, mHdrClamper.getMaxBrightness(), FLOAT_TOLERANCE); in testClamper_AmbientLuxChangesBelowLimit_MaxDecrease()
166 assertEquals(0.04, mHdrClamper.getTransitionRate(), FLOAT_TOLERANCE); in testClamper_AmbientLuxChangesBelowLimit_MaxDecrease()
175 assertEquals(PowerManager.BRIGHTNESS_MAX, mHdrClamper.getMaxBrightness(), FLOAT_TOLERANCE); in testClamper_AmbientLuxChangesBelowLimit_ThenFastAboveLimit()
176 assertEquals(-1, mHdrClamper.getTransitionRate(), FLOAT_TOLERANCE); in testClamper_AmbientLuxChangesBelowLimit_ThenFastAboveLimit()
193 assertEquals(PowerManager.BRIGHTNESS_MAX, mHdrClamper.getMaxBrightness(), FLOAT_TOLERANCE); in testClamper_AmbientLuxChangesBelowLimit_ThenSlowlyAboveLimit()
[all …]
DBrightnessLowPowerModeModifierTest.java35 private static final float FLOAT_TOLERANCE = 0.001f; field in BrightnessLowPowerModeModifierTest
57 assertEquals(DEFAULT_BRIGHTNESS, mBuilder.getBrightness(), FLOAT_TOLERANCE); in testApply_lowPowerModeOff()
66 assertEquals(EXPECTED_LOW_POWER_BRIGHTNESS, mBuilder.getBrightness(), FLOAT_TOLERANCE); in testApply_lowPowerModeOn()
78 assertEquals(DEFAULT_BRIGHTNESS, mBuilder.getBrightness(), FLOAT_TOLERANCE); in testApply_lowPowerModeOnAndLowPowerBrightnessFactorHigh()
89 assertEquals(0.0f, mBuilder.getBrightness(), FLOAT_TOLERANCE); in testApply_lowPowerModeOnAndMinBrightness()
101 assertEquals(EXPECTED_LOW_POWER_BRIGHTNESS, builder.getBrightness(), FLOAT_TOLERANCE); in testApply_lowPowerModeOnAndLowPowerAlreadyApplied()
115 assertEquals(DEFAULT_BRIGHTNESS, builder.getBrightness(), FLOAT_TOLERANCE); in testApply_lowPowerModeOffAfterLowPowerOn()
DBrightnessPowerClamperTest.java52 private static final float FLOAT_TOLERANCE = 0.001f; field in BrightnessPowerClamperTest
78 assertEquals(PowerManager.BRIGHTNESS_MAX, mClamper.getBrightnessCap(), FLOAT_TOLERANCE); in testNoThrottlingData()
86 assertEquals(PowerManager.BRIGHTNESS_MAX, mClamper.getBrightnessCap(), FLOAT_TOLERANCE); in testPowerThrottlingNoOngoingAnimation()
98 assertEquals(expectedBrightness, mClamper.getBrightnessCap(), FLOAT_TOLERANCE); in testPowerThrottlingNoOngoingAnimation()
107 assertEquals(expectedBrightness, mClamper.getBrightnessCap(), FLOAT_TOLERANCE); in testPowerThrottlingNoOngoingAnimation()
114 assertEquals(PowerManager.BRIGHTNESS_MAX, mClamper.getBrightnessCap(), FLOAT_TOLERANCE); in testPowerThrottlingWithOngoingAnimation()
126 assertEquals(expectedBrightness, mClamper.getBrightnessCap(), FLOAT_TOLERANCE); in testPowerThrottlingWithOngoingAnimation()
135 assertEquals(expectedBrightness, mClamper.getBrightnessCap(), FLOAT_TOLERANCE); in testPowerThrottlingWithOngoingAnimation()
143 assertEquals(PowerManager.BRIGHTNESS_MAX, mClamper.getBrightnessCap(), FLOAT_TOLERANCE); in testPowerThrottlingRemoveBrightnessCap()
155 assertEquals(expectedBrightness, mClamper.getBrightnessCap(), FLOAT_TOLERANCE); in testPowerThrottlingRemoveBrightnessCap()
[all …]
DDisplayDimModifierTest.java42 private static final float FLOAT_TOLERANCE = 0.001f; field in DisplayDimModifierTest
80 assertEquals(DEFAULT_BRIGHTNESS, mBuilder.getBrightness(), FLOAT_TOLERANCE); in testApply_noDimPolicy()
90 assertEquals(0.4f - MIN_DIM_AMOUNT, mBuilder.getBrightness(), FLOAT_TOLERANCE); in testApply_dimPolicyFromResources()
100 assertEquals(DIM_CONFIG, mBuilder.getBrightness(), FLOAT_TOLERANCE); in testApply_dimPolicyFromConfig()
113 assertEquals(DIM_CONFIG, builder.getBrightness(), FLOAT_TOLERANCE); in testApply_dimPolicyAndDimPolicyAlreadyApplied()
124 assertEquals(0.0f, mBuilder.getBrightness(), FLOAT_TOLERANCE); in testApply_dimPolicyAndMinBrightness()
137 assertEquals(DEFAULT_BRIGHTNESS, builder.getBrightness(), FLOAT_TOLERANCE); in testApply_dimPolicyOffAfterDimPolicyOn()
DBrightnessThermalClamperTest.java60 private static final float FLOAT_TOLERANCE = 0.001f; field in BrightnessThermalClamperTest
88 assertEquals(PowerManager.BRIGHTNESS_MAX, mClamper.getBrightnessCap(), FLOAT_TOLERANCE); in testNoThrottlingData()
133 assertEquals(PowerManager.BRIGHTNESS_MAX, mClamper.getBrightnessCap(), FLOAT_TOLERANCE); in testNotifyThrottlingAfterOnDisplayChange()
138 assertEquals(expectedBrightness, mClamper.getBrightnessCap(), FLOAT_TOLERANCE); in testNotifyThrottlingAfterOnDisplayChange()
150 assertEquals(PowerManager.BRIGHTNESS_MAX, mClamper.getBrightnessCap(), FLOAT_TOLERANCE); in testOnDisplayChangeAfterNotifyThrottling()
155 assertEquals(expectedBrightness, mClamper.getBrightnessCap(), FLOAT_TOLERANCE); in testOnDisplayChangeAfterNotifyThrottling()
164 assertEquals(PowerManager.BRIGHTNESS_MAX, mClamper.getBrightnessCap(), FLOAT_TOLERANCE); in testOverrideData()
170 assertEquals(0.5f, mClamper.getBrightnessCap(), FLOAT_TOLERANCE); in testOverrideData()
177 assertEquals(PowerManager.BRIGHTNESS_MAX, mClamper.getBrightnessCap(), FLOAT_TOLERANCE); in testOverrideData()
184 assertEquals(0.4f, mClamper.getBrightnessCap(), FLOAT_TOLERANCE); in testOverrideData()
[all …]
DBrightnessClamperControllerTest.java65 private static final float FLOAT_TOLERANCE = 0.001f; field in BrightnessClamperControllerTest
179 assertEquals(initialBrightness, state.getBrightness(), FLOAT_TOLERANCE); in testClamp_inactiveClamperNotApplied()
180 assertEquals(PowerManager.BRIGHTNESS_MAX, state.getMaxBrightness(), FLOAT_TOLERANCE); in testClamp_inactiveClamperNotApplied()
183 assertEquals(-1, state.getCustomAnimationRate(), FLOAT_TOLERANCE); in testClamp_inactiveClamperNotApplied()
203 assertEquals(clampedBrightness, state.getBrightness(), FLOAT_TOLERANCE); in testClamp_activeClamperApplied_brightnessAboveMax()
204 assertEquals(clampedBrightness, state.getMaxBrightness(), FLOAT_TOLERANCE); in testClamp_activeClamperApplied_brightnessAboveMax()
207 assertEquals(customAnimationRate, state.getCustomAnimationRate(), FLOAT_TOLERANCE); in testClamp_activeClamperApplied_brightnessAboveMax()
227 assertEquals(initialBrightness, state.getBrightness(), FLOAT_TOLERANCE); in testClamp_activeClamperApplied_brightnessBelowMax()
228 assertEquals(clampedBrightness, state.getMaxBrightness(), FLOAT_TOLERANCE); in testClamp_activeClamperApplied_brightnessBelowMax()
231 assertEquals(customAnimationRate, state.getCustomAnimationRate(), FLOAT_TOLERANCE); in testClamp_activeClamperApplied_brightnessBelowMax()
[all …]
/frameworks/base/services/core/java/com/android/server/display/mode/
DVoteSummary.java31 private static final float FLOAT_TOLERANCE = SurfaceControl.RefreshRateRange.FLOAT_TOLERANCE; field in VoteSummary
223 if (refreshRate < (minPhysicalRefreshRate - FLOAT_TOLERANCE) in validateModeWithinPhysicalRefreshRange()
224 || refreshRate > (maxPhysicalRefreshRate + FLOAT_TOLERANCE)) { in validateModeWithinPhysicalRefreshRange()
242 if (refreshRate < (minRenderFrameRate - FLOAT_TOLERANCE) in validateModeWithinRenderRefreshRange()
243 || refreshRate > (maxRenderFrameRate + FLOAT_TOLERANCE)) { in validateModeWithinRenderRefreshRange()
319 - FLOAT_TOLERANCE); in isRenderRateAchievable()
321 return adjustedPhysicalRefreshRate >= (minRenderFrameRate - FLOAT_TOLERANCE); in isRenderRateAchievable()
325 if (minRenderFrameRate > maxRenderFrameRate + FLOAT_TOLERANCE) { in isValid()
370 || mode.getRefreshRate() < (minPhysicalRefreshRate - FLOAT_TOLERANCE) in updateSummaryWithBestAllowedResolution()
371 || mode.getRefreshRate() > (maxPhysicalRefreshRate + FLOAT_TOLERANCE) in updateSummaryWithBestAllowedResolution()
[all …]
DSyntheticModeManager.java34 private static final float FLOAT_TOLERANCE = 0.01f; field in SyntheticModeManager
37 SYNTHETIC_MODE_REFRESH_RATE + FLOAT_TOLERANCE;
68 boolean is60HzAchievable = Math.abs(divisor - Math.round(divisor)) < FLOAT_TOLERANCE; in createAppSupportedModes()
/frameworks/base/services/tests/displayservicetests/src/com/android/server/display/mode/
DDisplayModeDirectorTest.java281 private static final float FLOAT_TOLERANCE = 0.01f; field in DisplayModeDirectorTest
568 float error = FLOAT_TOLERANCE / 4; in testVotingWithFloatingPointErrors()
578 assertThat(desiredSpecs.primary.physical.min).isWithin(FLOAT_TOLERANCE).of(60); in testVotingWithFloatingPointErrors()
579 assertThat(desiredSpecs.primary.physical.max).isWithin(FLOAT_TOLERANCE).of(60); in testVotingWithFloatingPointErrors()
590 assertThat(desiredSpecs.primary.render.min).isWithin(FLOAT_TOLERANCE).of(60); in testVotingWithFloatingPointErrors()
591 assertThat(desiredSpecs.primary.render.max).isWithin(FLOAT_TOLERANCE).of(60); in testVotingWithFloatingPointErrors()
629 assertThat(desiredSpecs.primary.physical.min).isWithin(FLOAT_TOLERANCE).of(60); in testFlickerHasLowerPriorityThanUserAndRangeIsSingle()
631 .isWithin(FLOAT_TOLERANCE).of(desiredSpecs.primary.physical.min); in testFlickerHasLowerPriorityThanUserAndRangeIsSingle()
644 assertThat(desiredSpecs.primary.physical.min).isWithin(FLOAT_TOLERANCE).of(90); in testFlickerHasLowerPriorityThanUserAndRangeIsSingle()
646 .isWithin(FLOAT_TOLERANCE).of(desiredSpecs.primary.physical.min); in testFlickerHasLowerPriorityThanUserAndRangeIsSingle()
[all …]
DSkinThermalStatusObserverTest.java51 private static final float FLOAT_TOLERANCE = 0.01f; field in SkinThermalStatusObserverTest
111 assertEquals(0, renderVote.mMinRefreshRate, FLOAT_TOLERANCE); in testNotifyWithDefaultVotesForCritical()
112 assertEquals(60, renderVote.mMaxRefreshRate, FLOAT_TOLERANCE); in testNotifyWithDefaultVotesForCritical()
120 assertEquals(0, renderVote.mMinRefreshRate, FLOAT_TOLERANCE); in testNotifyWithDefaultVotesForCritical()
121 assertEquals(60, renderVote.mMaxRefreshRate, FLOAT_TOLERANCE); in testNotifyWithDefaultVotesForCritical()
178 assertEquals(90, renderVote.mMinRefreshRate, FLOAT_TOLERANCE); in testNotifiesWithConfigVotes()
179 assertEquals(120, renderVote.mMaxRefreshRate, FLOAT_TOLERANCE); in testNotifiesWithConfigVotes()
201 assertEquals(0, renderVote.mMinRefreshRate, FLOAT_TOLERANCE); in testDisplayAdded()
202 assertEquals(60, renderVote.mMaxRefreshRate, FLOAT_TOLERANCE); in testDisplayAdded()
DProximitySensorObserverTest.java46 private static final float FLOAT_TOLERANCE = 0.01f; field in ProximitySensorObserverTest
81 assertThat(physicalVote.mMinRefreshRate).isWithin(FLOAT_TOLERANCE).of(60); in testAddsProximityVoteIfSensorManagerProximityActive()
82 assertThat(physicalVote.mMaxRefreshRate).isWithin(FLOAT_TOLERANCE).of(90); in testAddsProximityVoteIfSensorManagerProximityActive()
/frameworks/base/services/tests/displayservicetests/src/com/android/server/display/
DRampAnimatorTest.java31 private static final float FLOAT_TOLERANCE = 0.0000001f; field in RampAnimatorTest
74 assertEquals(0.54761934f, mTestObject.mValue, FLOAT_TOLERANCE); in testAnimationStep_respectTimeLimits()
88 assertEquals(0.52739114f, mTestObject.mValue, FLOAT_TOLERANCE); in testAnimationStep_ignoreTimeLimits()
DNormalBrightnessModeControllerTest.java42 private static final float FLOAT_TOLERANCE = 0.001f; field in NormalBrightnessModeControllerTest
112 assertEquals(expectedBrightness, mController.getCurrentBrightnessMax(), FLOAT_TOLERANCE); in testReturnsCorrectMaxBrightness()
DDisplayManagerServiceTest.java188 private static final float FLOAT_TOLERANCE = 0.01f; field in DisplayManagerServiceTest
2437 assertEquals(result.min, sensorData.minRefreshRate, FLOAT_TOLERANCE);
2438 assertEquals(result.max, sensorData.maxRefreshRate, FLOAT_TOLERANCE);
2998 FLOAT_TOLERANCE);
3004 FLOAT_TOLERANCE);
3033 FLOAT_TOLERANCE);
/frameworks/base/services/tests/displayservicetests/src/com/android/server/display/utils/
DDeviceConfigParsingUtilsTest.java48 private static final float FLOAT_TOLERANCE = 0.001f; field in DeviceConfigParsingUtilsTest
146 assertEquals(0.65, result, FLOAT_TOLERANCE); in testParseBrightness()
175 new int[]{ 155, -1, 170 }), FLOAT_TOLERANCE); in testDisplayBrightnessThresholdsIntToFloat()
187 new int[]{ 1700, 20000, -1 }), FLOAT_TOLERANCE); in testAmbientBrightnessThresholdsIntToFloat()
/frameworks/base/packages/SettingsProvider/test/src/com/android/providers/settings/
DSettingsHelperRestoreTest.java58 private static final float FLOAT_TOLERANCE = 0.01f; field in SettingsHelperRestoreTest
96 FLOAT_TOLERANCE); in testRestoreAccessibilityDisplayMagnificationScale_alreadyConfigured_doesNotRestoreValue()
119 FLOAT_TOLERANCE); in testRestoreAccessibilityDisplayMagnificationScale_notAlreadyConfigured_restoresValue()
/frameworks/base/services/core/java/com/android/server/wm/
DRefreshRatePolicy.java251 return mRefreshRate <= refreshRate + RefreshRateRange.FLOAT_TOLERANCE in refreshRateEquals()
252 && mRefreshRate >= refreshRate - RefreshRateRange.FLOAT_TOLERANCE; in refreshRateEquals()
/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/
DSettingsHelper.java61 private static final float FLOAT_TOLERANCE = 0.01f; field in SettingsHelper
425 return Math.abs(currentScale - defaultScale) >= FLOAT_TOLERANCE; in isAlreadyConfiguredCriticalAccessibilitySetting()
/frameworks/base/core/java/android/view/
DSurfaceControl.java1943 public static final float FLOAT_TOLERANCE = 0.01f; field in SurfaceControl.RefreshRateRange
1958 if (min < 0 || max < 0 || min > max + FLOAT_TOLERANCE) { in RefreshRateRange()