Fix SurfaceControl.setDisplayBrightness error msg

Bug: 178088604
Test: Run on a device and take bugreport to see the crash value
Change-Id: I1ef892c2287bd998d8fdce6b6760db09218affa7
This commit is contained in:
Zhomart Mukhamejanov
2021-04-30 16:41:33 -07:00
parent 9443a3e84d
commit 4266933cb0

View File

@@ -2468,7 +2468,7 @@ public final class SurfaceControl implements Parcelable {
if (Float.isNaN(sdrBrightness) || sdrBrightness > 1.0f
|| (sdrBrightness < 0.0f && sdrBrightness != -1.0f)) {
throw new IllegalArgumentException("sdrBrightness must be a number between 0.0f "
+ "and 1.0f, or -1 to turn the backlight off: " + displayBrightness);
+ "and 1.0f, or -1 to turn the backlight off: " + sdrBrightness);
}
return nativeSetDisplayBrightness(displayToken, sdrBrightness, sdrBrightnessNits,
displayBrightness, displayBrightnessNits);