From 963ec1b29df4b95eb57dfb9f5d76dbf263586e21 Mon Sep 17 00:00:00 2001 From: Demon000 Date: Sat, 15 Feb 2020 11:14:48 +0000 Subject: [PATCH] sm6250-common: light: do not turn on breathing for unlit hardware states Change-Id: I093fb2fb81012a473eda232d3c3407d0e0791907 --- light/Light.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/light/Light.cpp b/light/Light.cpp index 19e578e..7c1b1e7 100644 --- a/light/Light.cpp +++ b/light/Light.cpp @@ -95,6 +95,11 @@ static void handleNotification(const LightState& state) { /* Disable breathing or blinking */ set(WHITE_LED BREATH, 0); + set(WHITE_LED BRIGHTNESS, 0); + + if (!whiteBrightness) { + return; + } switch (state.flashMode) { case Flash::HARDWARE: