diff options
author | Jason Vidal <vidwhal@gmail.com> | 2017-06-11 08:02:38 +0000 |
---|---|---|
committer | Simon Shields <simon@lineageos.org> | 2017-06-19 13:54:09 +0000 |
commit | e95e9c31a11cdbaba5589190d8cd9cd4099a4fea (patch) | |
tree | 2c71d4a939855898f33a4f228017d30ae7c81c63 | |
parent | df15802d15796cd3439af80b010cfab60a66d1b5 (diff) | |
download | android_hardware_samsung-e95e9c31a11cdbaba5589190d8cd9cd4099a4fea.tar.gz android_hardware_samsung-e95e9c31a11cdbaba5589190d8cd9cd4099a4fea.tar.bz2 android_hardware_samsung-e95e9c31a11cdbaba5589190d8cd9cd4099a4fea.zip |
liblights: Fix fast blinking notification LEDs.
Seems that the fast blinking notification LEDs experienced on some
Samsung devices was due to the removal of these two lines that clean
the 'blink' array. Propose re-inserting to correct the fast blinking
LED issue.
Change-Id: I88ea828a50468aae494b1dd54290607308de543a
-rw-r--r-- | liblights/lights.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/liblights/lights.c b/liblights/lights.c index 27be248..875cf65 100644 --- a/liblights/lights.c +++ b/liblights/lights.c @@ -199,6 +199,10 @@ static int write_leds(const struct led_config *led) ALOGV("%s: color=0x%08x, delay_on=%d, delay_off=%d, blink=%s", __func__, led->color, led->delay_on, led->delay_off, blink); + /* Add '\n' here to make the above log message clean. */ + blink[count] = '\n'; + blink[count+1] = '\0'; + pthread_mutex_lock(&g_lock); err = write_str(LED_BLINK_NODE, blink); pthread_mutex_unlock(&g_lock); |