From 7ffb495501913cb6d725a1502c889fa8ecacffbd Mon Sep 17 00:00:00 2001 From: Jan Altensen Date: Wed, 7 Aug 2019 11:33:32 +0200 Subject: [PATCH] samsung: hidl: light: battery has lowest priority Change-Id: I90d61439f8a431f1836e439d34764b7eb7983db9 --- hidl/light/Light.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hidl/light/Light.cpp b/hidl/light/Light.cpp index cc5e5d4..3e9b17f 100644 --- a/hidl/light/Light.cpp +++ b/hidl/light/Light.cpp @@ -125,10 +125,7 @@ void Light::setNotificationLED() { bool bln = false; #endif - if (mBatteryState.color & COLOR_MASK) { - adjusted_brightness = LED_BRIGHTNESS_BATTERY; - state = mBatteryState; - } else if (mNotificationState.color & COLOR_MASK) { + if (mNotificationState.color & COLOR_MASK) { adjusted_brightness = LED_BRIGHTNESS_NOTIFICATION; state = mNotificationState; #ifdef LED_BLN_NODE @@ -144,6 +141,9 @@ void Light::setNotificationLED() { if (state.flashMode == Flash::NONE) { state.color = 0; } + } else if (mBatteryState.color & COLOR_MASK) { + adjusted_brightness = LED_BRIGHTNESS_BATTERY; + state = mBatteryState; } else { set(LED_BLINK_NODE, "0x00000000 0 0"); return; -- 2.20.1