Merge "Ensure valid brightness is sent to surface control" into sc-dev

This commit is contained in:
Fiona Campbell
2021-03-05 17:52:49 +00:00
committed by Android (Google) Code Review

View File

@@ -767,6 +767,12 @@ final class LocalDisplayAdapter extends DisplayAdapter {
}
private void setDisplayBrightness(float brightness) {
// Ensure brightnessState is valid, before processing and sending to
// surface control
if (Float.isNaN(brightness)) {
return;
}
if (DEBUG) {
Slog.d(TAG, "setDisplayBrightness("
+ "id=" + physicalDisplayId