Merge "Ensure valid brightness is sent to surface control" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
faa55308ea
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user