/aosp12/frameworks/base/services/core/java/com/android/server/display/ |
H A D | BrightnessMappingStrategy.java | 412 brightness[i] = newBrightness; in smoothCurve() 416 prevBrightness = brightness[idx]; in smoothCurve() 428 brightness[i] = newBrightness; in smoothCurve() 473 float[] newBrightness = Arrays.copyOf(brightness, brightness.length); in getAdjustedCurve() 536 final int N = brightness.length; in SimpleMappingStrategy() 620 mUserBrightness = brightness; in addUserDataPoint() 736 mBrightness = brightness; in PhysicalMappingStrategy() 785 brightness = correctBrightness(brightness, packageName, category); in getBrightness() 789 return brightness; in getBrightness() 836 mUserBrightness = brightness; in addUserDataPoint() [all …]
|
H A D | BrightnessSetting.java | 99 void setBrightness(float brightness) { in setBrightness() argument 100 if (Float.isNaN(brightness)) { in setBrightness() 105 if (brightness == mBrightness) { in setBrightness() 109 mBrightness = brightness; in setBrightness() 111 brightness); in setBrightness() local 118 private void notifyListeners(float brightness) { in notifyListeners() argument 120 l.onBrightnessChanged(brightness); in notifyListeners() 132 void onBrightnessChanged(float brightness); in onBrightnessChanged() argument
|
H A D | DisplayManagerShellCommand.java | 101 float brightness = -1.0f; in setBrightness() local 103 brightness = Float.parseFloat(brightnessText); in setBrightness() 106 if (brightness < 0 || brightness > 1) { in setBrightness() 113 dm.setBrightness(Display.DEFAULT_DISPLAY, brightness); in setBrightness()
|
H A D | DisplayPowerState.java | 170 public void setSdrScreenBrightness(float brightness) { in setSdrScreenBrightness() argument 171 if (mSdrScreenBrightness != brightness) { in setSdrScreenBrightness() 173 Slog.d(TAG, "setSdrScreenBrightness: brightness=" + brightness); in setSdrScreenBrightness() 176 mSdrScreenBrightness = brightness; in setSdrScreenBrightness() 197 public void setScreenBrightness(float brightness) { in setScreenBrightness() argument 198 if (mScreenBrightness != brightness) { in setScreenBrightness() 200 Slog.d(TAG, "setScreenBrightness: brightness=" + brightness); in setScreenBrightness() 203 mScreenBrightness = brightness; in setScreenBrightness()
|
H A D | DisplayPowerController.java | 848 mBrightnessTracker.start(brightness); in initialize() 1549 mCachedBrightnessInfo.brightness, in getBrightnessInfo() 1558 private void saveBrightnessInfo(float brightness) { in saveBrightnessInfo() argument 1559 saveBrightnessInfo(brightness, brightness); in saveBrightnessInfo() 1564 mCachedBrightnessInfo.brightness = brightness; in saveBrightnessInfo() 2058 if (Float.isNaN(brightness)) { in getScreenBrightnessSetting() 2059 brightness = mScreenBrightnessDefault; in getScreenBrightnessSetting() 2061 return clampAbsoluteBrightness(brightness); in getScreenBrightnessSetting() 2157 private float convertToNits(float brightness) { in convertToNits() argument 2408 brightness)); in noteScreenBrightness() [all …]
|
/aosp12/frameworks/native/services/inputflinger/reader/controller/ |
H A D | PeripheralController.cpp | 79 brightness = brightness * ratio; in getRawLightBrightness() 83 brightness, ratio); in getRawLightBrightness() 85 return brightness; in getRawLightBrightness() 98 brightness = ceil(brightness / ratio); in setRawLightBrightness() 102 brightness, ratio); in setRawLightBrightness() 120 brightness = getAlpha(color); in setLightColor() 124 if (brightness > 0) { in setLightColor() 153 if (!brightness.has_value()) { in getLightColor() 162 if (brightness == 0) { in getLightColor() 207 if (brightness.has_value()) { in getLightColor() [all …]
|
/aosp12/frameworks/base/core/java/android/hardware/display/ |
H A D | BrightnessInfo.java | 61 public final float brightness; field in BrightnessInfo 81 public BrightnessInfo(float brightness, float brightnessMinimum, float brightnessMaximum, in BrightnessInfo() argument 83 this(brightness, brightness, brightnessMinimum, brightnessMaximum, highBrightnessMode, in BrightnessInfo() 87 public BrightnessInfo(float brightness, float adjustedBrightness, float brightnessMinimum, in BrightnessInfo() argument 90 this.brightness = brightness; in BrightnessInfo() 120 dest.writeFloat(brightness); in writeToParcel() 142 brightness = source.readFloat(); in BrightnessInfo()
|
H A D | BrightnessChangeEvent.java | 36 public final float brightness; field in BrightnessChangeEvent 126 private BrightnessChangeEvent(float brightness, long timeStamp, String packageName, in BrightnessChangeEvent() argument 132 this.brightness = brightness; in BrightnessChangeEvent() 155 this.brightness = other.brightness; in BrightnessChangeEvent() 177 brightness = source.readFloat(); in BrightnessChangeEvent() 215 dest.writeFloat(brightness); in writeToParcel() 259 public Builder setBrightness(float brightness) { in setBrightness() argument 260 mBrightness = brightness; in setBrightness()
|
H A D | BrightnessCorrection.java | 91 public float apply(@FloatRange(from = 0.0) float brightness) { in apply() 92 return mImplementation.apply(brightness); in apply() 189 float apply(float brightness); in apply() argument 224 public float apply(float brightness) { in apply() argument 225 return MathUtils.exp(mScale * MathUtils.log(brightness) + mTranslate); in apply()
|
/aosp12/packages/services/Car/service/src/com/android/car/hal/ |
H A D | PowerHalService.java | 131 void onDisplayBrightnessChange(int brightness); in onDisplayBrightnessChange() argument 297 public void sendDisplayBrightness(int brightness) { in sendDisplayBrightness() argument 298 if (brightness < 0) { in sendDisplayBrightness() 299 brightness = 0; in sendDisplayBrightness() 300 } else if (brightness > 100) { in sendDisplayBrightness() 301 brightness = 100; in sendDisplayBrightness() 455 if (brightness < 0) { in dispatchEvents() 458 brightness = 0; in dispatchEvents() 459 } else if (brightness > MAX_BRIGHTNESS) { in dispatchEvents() 462 brightness = MAX_BRIGHTNESS; in dispatchEvents() [all …]
|
/aosp12/frameworks/base/services/core/jni/ |
H A D | com_android_server_lights_LightsService.cpp | 44 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()
|
/aosp12/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/samples/simplecamera/ |
H A D | ImageGoodnessFilter.java | 140 contrastRating, colorfulness, brightness); in onProcess() 224 float brightness) { in computePictureScore() argument 235 colorfulness, brightness, score); in computePictureScore() 239 colorfulness, brightness, score); in computePictureScore() 242 colorfulness, brightness, score); in computePictureScore() 257 score += brightnessScore(brightness); in subComputeScore() 386 private float brightnessScore(float brightness) { in brightnessScore() argument 388 brightnessMean = brightness; in brightnessScore() 394 (brightness - brightnessMean) * DECAY; in brightnessScore() 399 } else if (brightness < brightnessMean) { in brightnessScore() [all …]
|
H A D | AvgBrightnessFilter.java | 54 float brightness; in onProcess() local 57 brightness = brightnessOperator(inputImage.getWidth(),inputImage.getHeight(), inputBuffer); in onProcess() 61 if (mLogVerbose) Log.v(TAG, "contrastRatio: " + brightness); in onProcess() 65 brightnessOutFrame.setValue(brightness); in onProcess()
|
/aosp12/frameworks/base/services/tests/servicestests/src/com/android/server/display/ |
H A D | BrightnessTrackerTest.java | 317 assertEquals(brightness, event.brightness, FLOAT_DELTA); in testBrightnessEvent() 329 final int brightness = 130; in testBrightnessFullPopulatedEvent() local 355 assertEquals(brightness, event.brightness, FLOAT_DELTA); in testBrightnessFullPopulatedEvent() 412 for (int brightness = 0; brightness <= 255; ++brightness) { in testLimitedBufferSize() 430 final int brightness = 20; in testLimitedSensorEvents() local 452 assertEquals(brightness, event.brightness, FLOAT_DELTA); in testLimitedSensorEvents() 597 final int brightness = 20; in testWriteThenRead() local 634 assertEquals(brightness, event.brightness, FLOAT_DELTA); in testWriteThenRead() 650 final int brightness = 20; in testWritePrunesOldEvents() local 688 assertEquals(brightness, event.brightness, FLOAT_DELTA); in testWritePrunesOldEvents() [all …]
|
H A D | HighBrightnessModeControllerTest.java | 424 float brightness = 0.5f; in testHdrBrightnessScaledNormalBrightness() local 426 DEFAULT_MIN, DEFAULT_MAX, brightness); // map value from normal range to hdr range in testHdrBrightnessScaledNormalBrightness() 427 hbmc.onBrightnessChanged(brightness); in testHdrBrightnessScaledNormalBrightness() 432 brightness = 0.33f; in testHdrBrightnessScaledNormalBrightness() 434 DEFAULT_MIN, DEFAULT_MAX, brightness); // map value from normal range to hdr range in testHdrBrightnessScaledNormalBrightness() 435 hbmc.onBrightnessChanged(brightness); in testHdrBrightnessScaledNormalBrightness() 440 brightness = DEFAULT_MIN; in testHdrBrightnessScaledNormalBrightness() 442 hbmc.onBrightnessChanged(brightness); in testHdrBrightnessScaledNormalBrightness() 447 brightness = TRANSITION_POINT; in testHdrBrightnessScaledNormalBrightness() 449 hbmc.onBrightnessChanged(brightness); in testHdrBrightnessScaledNormalBrightness()
|
/aosp12/frameworks/base/media/mca/filterpacks/native/imageproc/ |
H A D | brightness.c | 26 float brightness; member 44 ((BrightnessParameters*)user_data)->brightness = atof(value); in brightness_setvalue() 78 const float brightness = params->brightness; in brightness_process() local 81 const int factor = (int)(brightness * 255.0f); in brightness_process()
|
/aosp12/hardware/qcom/display/msm8909w_3100/liblight/ |
H A D | lights.c | 133 int brightness = rgb_to_brightness(state); in set_light_backlight() local 150 brightness = DEFAULT_LOW_PERSISTENCE_MODE_BRIGHTNESS; in set_light_backlight() 158 err = write_int(LCD_FILE, brightness); in set_light_backlight() 160 err = write_int(LCD_FILE2, brightness); in set_light_backlight() 178 int brightness = state->color & 0x00ffffff; in set_light_backlight_ext() local 181 if (brightness >= 0 && brightness <= g_brightness_max) { in set_light_backlight_ext() 182 set_brightness_ext_level(brightness); in set_light_backlight_ext()
|
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/doze/ |
H A D | DozeScreenBrightness.java | 188 int brightness = computeBrightness(sensorValue); in updateBrightnessAndReady() local 189 boolean brightnessReady = brightness > 0; in updateBrightnessAndReady() 192 clampToDimBrightnessForScreenOff(clampToUserSetting(brightness))); in updateBrightnessAndReady() 255 private int clampToUserSetting(int brightness) { in clampToUserSetting() argument 259 return Math.min(brightness, userSetting); in clampToUserSetting() 268 private int clampToDimBrightnessForScreenOff(int brightness) { in clampToDimBrightnessForScreenOff() argument 280 brightness - (int) Math.floor( in clampToDimBrightnessForScreenOff() 284 return brightness; in clampToDimBrightnessForScreenOff()
|
H A D | DozeBrightnessHostForwarder.java | 32 public void setDozeScreenBrightness(int brightness) { in setDozeScreenBrightness() argument 33 super.setDozeScreenBrightness(brightness); in setDozeScreenBrightness() 34 mHost.setDozeScreenBrightness(brightness); in setDozeScreenBrightness()
|
/aosp12/hardware/qcom/sm7250/display/liblight/ |
H A D | lights.c | 138 int brightness = rgb_to_brightness(state); in set_light_backlight() local 158 brightness = DEFAULT_LOW_PERSISTENCE_MODE_BRIGHTNESS; in set_light_backlight() 166 err = write_int(LCD_FILE, brightness); in set_light_backlight() 168 err = write_int(LCD_FILE2, brightness); in set_light_backlight() 176 static int set_rgb_led_brightness(enum rgb_led led, int brightness) in set_rgb_led_brightness() argument 181 return write_int(file, brightness); in set_rgb_led_brightness()
|
/aosp12/hardware/interfaces/light/2.0/ |
H A D | types.hal | 45 * Light brightness is managed by a user setting. 50 * Light brightness is managed by a light sensor. 59 * head mounted display (HMD). The actual display brightness in this mode is 71 * - Display brightness is set so that the display is still visible to the user 112 * - If you can only do a brightness ramp, then use this formula: 113 * unsigned char brightness = ((77*((color>>16)&0x00ff))
|
/aosp12/hardware/qcom/display/msm8960/liblight/ |
H A D | lights.c | 135 int brightness = rgb_to_brightness(state); in set_light_backlight() local 137 err = write_int(LCD_FILE, brightness); in set_light_backlight() 212 int brightness = ((77 * ((colorRGB >> 16) & 0xFF)) + in set_speaker_light_locked() local 215 write_int(WHITE_LED_FILE, (int) brightness); in set_speaker_light_locked()
|
/aosp12/hardware/qcom/sm8150/display/liblight/ |
H A D | lights.c | 134 int brightness = rgb_to_brightness(state); in set_light_backlight() local 159 err = write_int(LCD_FILE, brightness); in set_light_backlight() 161 err = write_int(LCD_FILE2, brightness); in set_light_backlight() 169 static int set_rgb_led_brightness(enum rgb_led led, int brightness) in set_rgb_led_brightness() argument 174 return write_int(file, brightness); in set_rgb_led_brightness()
|
/aosp12/hardware/qcom/display/msm8998/liblight/ |
H A D | lights.c | 131 int brightness = rgb_to_brightness(state); in set_light_backlight() local 148 brightness = DEFAULT_LOW_PERSISTENCE_MODE_BRIGHTNESS; in set_light_backlight() 156 err = write_int(LCD_FILE, brightness); in set_light_backlight() 158 err = write_int(LCD_FILE2, brightness); in set_light_backlight()
|
/aosp12/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/ |
H A D | DozeServiceFake.java | 56 public void setDozeScreenBrightness(int brightness) { in setDozeScreenBrightness() argument 57 screenBrightness = brightness; in setDozeScreenBrightness()
|