Home
last modified time | relevance | path

Searched refs:brightness (Results 1 – 25 of 256) sorted by relevance

1234567891011

/frameworks/base/services/core/java/com/android/server/display/
DBrightnessSetting.java111 public void setBrightness(float brightness) { in setBrightness() argument
112 if (Float.isNaN(brightness)) { in setBrightness()
121 if (brightness != mBrightness) { in setBrightness()
123 brightness, mUserSerial in setBrightness() local
126 mBrightness = brightness; in setBrightness()
137 public void setBrightnessNoNotify(float brightness) { in setBrightnessNoNotify() argument
138 if (Float.isNaN(brightness)) { in setBrightnessNoNotify()
143 if (brightness != mBrightness) { in setBrightnessNoNotify()
145 brightness, mUserSerial in setBrightnessNoNotify() local
148 mBrightness = brightness; in setBrightnessNoNotify()
[all …]
DBrightnessMappingStrategy.java314 public abstract float convertToNits(float brightness); in convertToNits() argument
322 public abstract float convertToAdjustedNits(float brightness); in convertToAdjustedNits() argument
342 public abstract void addUserDataPoint(float lux, float brightness); in addUserDataPoint() argument
430 float[] luxLevels, float[] brightnessLevels, float lux, float brightness) { in insertControlPoint() argument
438 newBrightnessLevels[idx] = brightness; in insertControlPoint()
442 newBrightnessLevels[idx] = brightness; in insertControlPoint()
450 newBrightnessLevels[idx] = brightness; in insertControlPoint()
471 private void smoothCurve(float[] lux, float[] brightness, int idx) { in smoothCurve() argument
473 PLOG.logCurve("unsmoothed curve", lux, brightness); in smoothCurve()
476 float prevBrightness = brightness[idx]; in smoothCurve()
[all …]
/frameworks/base/services/core/java/com/android/server/display/brightness/
DBrightnessUtils.java17 package com.android.server.display.brightness;
31 public static boolean isValidBrightnessValue(float brightness) { in isValidBrightnessValue() argument
32 return !Float.isNaN(brightness) && brightness >= PowerManager.BRIGHTNESS_MIN in isValidBrightnessValue()
33 && brightness <= PowerManager.BRIGHTNESS_MAX; in isValidBrightnessValue()
55 int brightnessChangeReason, float brightness, float sdrBrightness, in constructDisplayBrightnessState() argument
57 return constructDisplayBrightnessState(brightnessChangeReason, brightness, sdrBrightness, in constructDisplayBrightnessState()
65 int brightnessChangeReason, float brightness, float sdrBrightness, in constructDisplayBrightnessState() argument
70 .setBrightness(brightness) in constructDisplayBrightnessState()
DDisplayBrightnessStrategySelector.java17 package com.android.server.display.brightness;
29 import com.android.server.display.brightness.strategy.AutoBrightnessFallbackStrategy;
30 import com.android.server.display.brightness.strategy.AutomaticBrightnessStrategy;
31 import com.android.server.display.brightness.strategy.AutomaticBrightnessStrategy2;
32 import com.android.server.display.brightness.strategy.BoostBrightnessStrategy;
33 import com.android.server.display.brightness.strategy.DisplayBrightnessStrategy;
34 import com.android.server.display.brightness.strategy.DozeBrightnessStrategy;
35 import com.android.server.display.brightness.strategy.FallbackBrightnessStrategy;
36 import com.android.server.display.brightness.strategy.FollowerBrightnessStrategy;
37 import com.android.server.display.brightness.strategy.InvalidBrightnessStrategy;
[all …]
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/brightness/ui/viewmodel/
DBrightnessSliderViewModelTest.kt17 package com.android.systemui.brightness.ui.viewmodel
23 import com.android.systemui.brightness.data.repository.fakeScreenBrightnessRepository
24 import com.android.systemui.brightness.domain.interactor.brightnessPolicyEnforcementInteractor
25 import com.android.systemui.brightness.domain.interactor.screenBrightnessInteractor
26 import com.android.systemui.brightness.shared.model.GammaBrightness
27 import com.android.systemui.brightness.shared.model.LinearBrightness
74 var brightness = 0.6f in brightnessChangeInRepository_changeInFlow() variable
75 fakeScreenBrightnessRepository.setBrightness(LinearBrightness(brightness)) in brightnessChangeInRepository_changeInFlow()
80 brightness, in brightnessChangeInRepository_changeInFlow()
86 brightness = 0.2f in brightnessChangeInRepository_changeInFlow()
[all …]
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/brightness/domain/interactor/
DScreenBrightnessInteractorTest.kt17 package com.android.systemui.brightness.domain.interactor
23 import com.android.systemui.brightness.data.repository.fakeScreenBrightnessRepository
24 import com.android.systemui.brightness.data.repository.screenBrightnessRepository
25 import com.android.systemui.brightness.shared.model.GammaBrightness
26 import com.android.systemui.brightness.shared.model.LinearBrightness
62 val brightness = 0.3f in gammaBrightness() constant
67 setBrightness(LinearBrightness(brightness)) in gammaBrightness()
73 .isEqualTo(BrightnessUtils.convertLinearToGammaFloat(brightness, min, max)) in gammaBrightness()
83 val brightness = 0.3f in gammaBrightness_constrained() constant
88 setBrightness(LinearBrightness(brightness)) in gammaBrightness_constrained()
[all …]
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/brightness/data/repository/
DScreenBrightnessDisplayManagerRepositoryTest.kt17 package com.android.systemui.brightness.data.repository
28 import com.android.systemui.brightness.shared.model.LinearBrightness
95 val brightness by collectLastValue(underTest.linearBrightness) in startingBrightnessInfo() constant
100 assertThat(brightness?.floatValue).isEqualTo(currentBrightnessInfo.brightness) in startingBrightnessInfo()
114 val brightness by collectLastValue(underTest.linearBrightness) in followsChangingBrightnessInfo() constant
129 assertThat(brightness?.floatValue).isEqualTo(currentBrightnessInfo.brightness) in followsChangingBrightnessInfo()
154 val brightness by collectLastValue(underTest.linearBrightness) in minMaxWhenCollecting() constant
180 val brightness = 0.3f in setTemporaryBrightness_insideBounds() constant
181 underTest.setTemporaryBrightness(LinearBrightness(brightness)) in setTemporaryBrightness_insideBounds()
184 verify(displayManager).setTemporaryBrightness(displayId, brightness) in setTemporaryBrightness_insideBounds()
[all …]
/frameworks/base/services/tests/displayservicetests/src/com/android/server/display/brightness/
DDisplayBrightnessControllerTest.java17 package com.android.server.display.brightness;
51 import com.android.server.display.brightness.strategy.AutoBrightnessFallbackStrategy;
52 import com.android.server.display.brightness.strategy.AutomaticBrightnessStrategy;
53 import com.android.server.display.brightness.strategy.DisplayBrightnessStrategy;
54 import com.android.server.display.brightness.strategy.OffloadBrightnessStrategy;
55 import com.android.server.display.brightness.strategy.TemporaryBrightnessStrategy;
294 final float brightness = 0.5f; in testConvertToNits() local
299 assertEquals(-1f, mDisplayBrightnessController.convertToNits(brightness), in testConvertToNits()
301 assertEquals(-1f, mDisplayBrightnessController.convertToAdjustedNits(brightness), in testConvertToNits()
312 when(automaticBrightnessController.convertToNits(brightness)).thenReturn(nits); in testConvertToNits()
[all …]
/frameworks/base/core/java/android/hardware/display/
DBrightnessInfo.java89 public final float brightness; field in BrightnessInfo
115 public BrightnessInfo(float brightness, float brightnessMinimum, float brightnessMaximum, in BrightnessInfo() argument
118 this(brightness, brightness, brightnessMinimum, brightnessMaximum, highBrightnessMode, in BrightnessInfo()
122 public BrightnessInfo(float brightness, float adjustedBrightness, float brightnessMinimum, in BrightnessInfo() argument
125 this.brightness = brightness; in BrightnessInfo()
171 dest.writeFloat(brightness); in writeToParcel()
194 brightness = source.readFloat(); in BrightnessInfo()
/frameworks/base/packages/SystemUI/src/com/android/systemui/brightness/ui/viewmodel/
DBrightnessSliderViewModel.kt17 package com.android.systemui.brightness.ui.viewmodel
19 import com.android.systemui.brightness.domain.interactor.BrightnessPolicyEnforcementInteractor
20 import com.android.systemui.brightness.domain.interactor.ScreenBrightnessInteractor
21 import com.android.systemui.brightness.shared.model.GammaBrightness
67 is Drag.Dragging -> screenBrightnessInteractor.setTemporaryBrightness(drag.brightness) in onDrag()
68 is Drag.Stopped -> screenBrightnessInteractor.setBrightness(drag.brightness) in onDrag()
87 val brightness: GammaBrightness constant
88 @JvmInline value class Dragging(override val brightness: GammaBrightness) : Drag
89 @JvmInline value class Stopped(override val brightness: GammaBrightness) : Drag
/frameworks/base/services/tests/displayservicetests/src/com/android/server/display/
DScreenOffBrightnessSensorControllerTest.java103 float brightness = 0.2f; in testBrightness() local
106 .thenReturn(brightness); in testBrightness()
107 assertEquals(brightness, mController.getAutomaticScreenBrightness(), 0); in testBrightness()
110 brightness = 0.4f; in testBrightness()
113 .thenReturn(brightness); in testBrightness()
114 assertEquals(brightness, mController.getAutomaticScreenBrightness(), 0); in testBrightness()
117 brightness = 0.6f; in testBrightness()
120 .thenReturn(brightness); in testBrightness()
121 assertEquals(brightness, mController.getAutomaticScreenBrightness(), 0); in testBrightness()
124 brightness = 0.8f; in testBrightness()
[all …]
DBrightnessSynchronizerTest.java238 private void putIntSetting(int brightness) { in putIntSetting() argument
239 Settings.System.putInt(mContentResolverSpy, Settings.System.SCREEN_BRIGHTNESS, brightness); in putIntSetting()
245 private void putFloatSetting(float brightness) { in putFloatSetting() argument
246 when(mDisplayManagerMock.getBrightness(eq(Display.DEFAULT_DISPLAY))).thenReturn(brightness); in putFloatSetting()
252 private void verifyIntWasSetTo(int brightness) throws Exception { in verifyIntWasSetTo() argument
253 assertEquals(brightness, getIntSetting()); in verifyIntWasSetTo()
256 private void verifyFloatWasSetTo(float brightness) { in verifyFloatWasSetTo() argument
257 verify(mDisplayManagerMock).setBrightness(eq(Display.DEFAULT_DISPLAY), eq(brightness)); in verifyFloatWasSetTo()
260 private int fToI(float brightness) { in fToI() argument
262 return BrightnessSynchronizer.brightnessFloatToIntSetting(mContext, brightness); in fToI()
[all …]
/frameworks/base/apct-tests/perftests/core/src/android/os/
DDisplayPerfTest.java59 float brightness = 0.3f; in testBrightnessChanges() local
61 setAndWaitToChangeBrightness(brightness); in testBrightnessChanges()
62 brightness = toggleBrightness(brightness); in testBrightnessChanges()
74 private void setAndWaitToChangeBrightness(float brightness) throws Exception { in setAndWaitToChangeBrightness() argument
75 mDisplayManager.setBrightness(0, brightness); in setAndWaitToChangeBrightness()
77 () -> isInRange(mDisplayManager.getBrightness(Display.DEFAULT_DISPLAY), brightness, in setAndWaitToChangeBrightness()
/frameworks/base/packages/SystemUI/src/com/android/systemui/brightness/dagger/
DScreenBrightnessModule.kt17 package com.android.systemui.brightness.dagger
19 import com.android.systemui.brightness.data.repository.BrightnessPolicyRepository
20 import com.android.systemui.brightness.data.repository.BrightnessPolicyRepositoryImpl
21 import com.android.systemui.brightness.data.repository.ScreenBrightnessDisplayManagerRepository
22 import com.android.systemui.brightness.data.repository.ScreenBrightnessRepository
23 import com.android.systemui.brightness.shared.model.BrightnessLog
/frameworks/base/packages/SystemUI/src/com/android/systemui/brightness/domain/interactor/
DScreenBrightnessInteractor.kt17 package com.android.systemui.brightness.domain.interactor in <lambda>()
20 import com.android.systemui.brightness.data.repository.ScreenBrightnessRepository in <lambda>()
21 import com.android.systemui.brightness.shared.model.BrightnessLog in <lambda>()
22 import com.android.systemui.brightness.shared.model.GammaBrightness in <lambda>()
23 import com.android.systemui.brightness.shared.model.LinearBrightness in <lambda>()
24 import com.android.systemui.brightness.shared.model.logDiffForTable in <lambda>()
64 ) { brightness, min, max -> in <lambda>() method
65 brightness.toGammaBrightness(min, max) in <lambda>()
/frameworks/base/services/core/java/com/android/server/display/brightness/strategy/
DAutomaticBrightnessStrategy.java16 package com.android.server.display.brightness.strategy;
32 import com.android.server.display.brightness.BrightnessEvent;
33 import com.android.server.display.brightness.BrightnessReason;
34 import com.android.server.display.brightness.BrightnessUtils;
35 import com.android.server.display.brightness.StrategyExecutionRequest;
36 import com.android.server.display.brightness.StrategySelectionNotifyRequest;
171 float brightness = getAutomaticScreenBrightness(null, in isAutoBrightnessValid() local
173 if (BrightnessUtils.isValidBrightnessValue(brightness) in isAutoBrightnessValid()
174 || brightness == PowerManager.BRIGHTNESS_OFF_FLOAT) { in isAutoBrightnessValid()
288 float brightness = getAutomaticScreenBrightness(brightnessEvent, in updateBrightness() local
[all …]
DDozeBrightnessStrategy.java17 package com.android.server.display.brightness.strategy;
20 import com.android.server.display.brightness.BrightnessReason;
21 import com.android.server.display.brightness.BrightnessUtils;
22 import com.android.server.display.brightness.StrategyExecutionRequest;
23 import com.android.server.display.brightness.StrategySelectionNotifyRequest;
DOverrideBrightnessStrategy.java17 package com.android.server.display.brightness.strategy;
20 import com.android.server.display.brightness.BrightnessReason;
21 import com.android.server.display.brightness.BrightnessUtils;
22 import com.android.server.display.brightness.StrategyExecutionRequest;
23 import com.android.server.display.brightness.StrategySelectionNotifyRequest;
DScreenOffBrightnessStrategy.java17 package com.android.server.display.brightness.strategy;
22 import com.android.server.display.brightness.BrightnessReason;
23 import com.android.server.display.brightness.BrightnessUtils;
24 import com.android.server.display.brightness.StrategyExecutionRequest;
25 import com.android.server.display.brightness.StrategySelectionNotifyRequest;
DInvalidBrightnessStrategy.java17 package com.android.server.display.brightness.strategy;
22 import com.android.server.display.brightness.BrightnessReason;
23 import com.android.server.display.brightness.BrightnessUtils;
24 import com.android.server.display.brightness.StrategyExecutionRequest;
25 import com.android.server.display.brightness.StrategySelectionNotifyRequest;
DBoostBrightnessStrategy.java17 package com.android.server.display.brightness.strategy;
22 import com.android.server.display.brightness.BrightnessReason;
23 import com.android.server.display.brightness.BrightnessUtils;
24 import com.android.server.display.brightness.StrategyExecutionRequest;
25 import com.android.server.display.brightness.StrategySelectionNotifyRequest;
/frameworks/base/services/core/jni/
Dcom_android_server_lights_LightsService.cpp44 static bool validate(jint light, jint flash, jint brightness) { in validate() argument
59 if (brightness != static_cast<jint>(Brightness::USER) && in validate()
60 brightness != static_cast<jint>(Brightness::SENSOR) && in validate()
61 brightness != static_cast<jint>(Brightness::LOW_PERSISTENCE)) { in validate()
62 ALOGE("Invalid brightness parameter %d.", brightness); in validate()
66 if (brightness == static_cast<jint>(Brightness::LOW_PERSISTENCE) && in validate()
82 Brightness brightness = static_cast<Brightness>(brightnessMode); in constructState() local
86 if (brightness == Brightness::LOW_PERSISTENCE) { in constructState()
96 state.brightnessMode = brightness; in constructState()
/frameworks/base/services/core/java/com/android/server/display/config/
DEvenDimmerBrightnessData.java77 float[] backlight, float[] brightness, Spline backlightToNits, in EvenDimmerBrightnessData() argument
83 mBrightness = brightness; in EvenDimmerBrightnessData()
134 float[] brightness = new float[brightnessPoints.size()]; in loadConfig() local
140 brightness[i] = val.getBrightness().floatValue(); in loadConfig()
174 return new EvenDimmerBrightnessData(transitionPoint, nits, backlight, brightness, in loadConfig()
177 new Spline.LinearSpline(brightness, backlight), in loadConfig()
178 new Spline.LinearSpline(backlight, brightness), in loadConfig()
183 return new EvenDimmerBrightnessData(transitionPoint, nits, backlight, brightness, in loadConfig()
186 Spline.createSpline(brightness, backlight), in loadConfig()
187 Spline.createSpline(backlight, brightness), in loadConfig()
/frameworks/base/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/
DOffloadBrightnessStrategyTest.java17 package com.android.server.display.brightness.strategy;
30 import com.android.server.display.brightness.BrightnessReason;
31 import com.android.server.display.brightness.StrategyExecutionRequest;
32 import com.android.server.display.brightness.StrategySelectionNotifyRequest;
61 float brightness = 0.2f; in testUpdateBrightnessWhenOffloadBrightnessIsSet() local
62 mOffloadBrightnessStrategy.setOffloadScreenBrightness(brightness); in testUpdateBrightnessWhenOffloadBrightnessIsSet()
67 .setBrightness(brightness) in testUpdateBrightnessWhenOffloadBrightnessIsSet()
69 .setSdrBrightness(brightness) in testUpdateBrightnessWhenOffloadBrightnessIsSet()
/frameworks/native/services/inputflinger/reader/controller/
DPeripheralController.cpp46 static inline int32_t toArgb(int32_t brightness, int32_t red, int32_t green, int32_t blue) { in toArgb() argument
47 return (brightness & 0xff) << 24 | (red & 0xff) << 16 | (green & 0xff) << 8 | (blue & 0xff); in toArgb()
76 int brightness = brightnessOpt.value(); in getRawLightBrightness() local
83 brightness = brightness * ratio; in getRawLightBrightness()
87 brightness, ratio); in getRawLightBrightness()
89 return brightness; in getRawLightBrightness()
92 void PeripheralController::Light::setRawLightBrightness(int32_t rawLightId, int32_t brightness) { in setRawLightBrightness() argument
102 brightness = ceil(brightness / ratio); in setRawLightBrightness()
106 brightness, ratio); in setRawLightBrightness()
108 context.setLightBrightness(rawLightId, brightness); in setRawLightBrightness()
[all …]

1234567891011