forked from donjohanliebert/hardware_xiaomi
aidl: light: Fix a bug where breath wouldn't be disabled when not needed
Change-Id: I65c84c845fe8fb514d6b8345013077e3d0946972
This commit is contained in:
parent
d71257fb4a
commit
481f209d2a
@ -115,12 +115,9 @@ void Lights::setLED(const HwLightState& state) {
|
||||
if (mWhiteLED) {
|
||||
rc = kLEDs[WHITE].setBreath(blink);
|
||||
} else {
|
||||
if (!!color.red)
|
||||
rc &= kLEDs[RED].setBreath(blink);
|
||||
if (!!color.green)
|
||||
rc &= kLEDs[GREEN].setBreath(blink);
|
||||
if (!!color.blue)
|
||||
rc &= kLEDs[BLUE].setBreath(blink);
|
||||
rc = kLEDs[RED].setBreath(blink && color.red);
|
||||
rc &= kLEDs[GREEN].setBreath(blink && color.green);
|
||||
rc &= kLEDs[BLUE].setBreath(blink && color.blue);
|
||||
}
|
||||
if (rc)
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user