samsung: hidl: light: battery has lowest priority

Change-Id: I90d61439f8a431f1836e439d34764b7eb7983db9
tirimbino
Jan Altensen 5 years ago
parent 519e3c5175
commit 7ffb495501
No known key found for this signature in database
GPG Key ID: 3E45BB95F7AD33DA
  1. 8
      hidl/light/Light.cpp

@ -125,10 +125,7 @@ void Light::setNotificationLED() {
bool bln = false; bool bln = false;
#endif #endif
if (mBatteryState.color & COLOR_MASK) { if (mNotificationState.color & COLOR_MASK) {
adjusted_brightness = LED_BRIGHTNESS_BATTERY;
state = mBatteryState;
} else if (mNotificationState.color & COLOR_MASK) {
adjusted_brightness = LED_BRIGHTNESS_NOTIFICATION; adjusted_brightness = LED_BRIGHTNESS_NOTIFICATION;
state = mNotificationState; state = mNotificationState;
#ifdef LED_BLN_NODE #ifdef LED_BLN_NODE
@ -144,6 +141,9 @@ void Light::setNotificationLED() {
if (state.flashMode == Flash::NONE) { if (state.flashMode == Flash::NONE) {
state.color = 0; state.color = 0;
} }
} else if (mBatteryState.color & COLOR_MASK) {
adjusted_brightness = LED_BRIGHTNESS_BATTERY;
state = mBatteryState;
} else { } else {
set(LED_BLINK_NODE, "0x00000000 0 0"); set(LED_BLINK_NODE, "0x00000000 0 0");
return; return;

Loading…
Cancel
Save