summaryrefslogtreecommitdiffstats
path: root/hidl/light
diff options
context:
space:
mode:
authorJan Altensen <info@stricted.net>2020-02-03 18:57:34 +0100
committerJan Altensen <info@stricted.net>2020-02-03 19:08:20 +0100
commit83cc460bb7e784a07d0b2eb640505795aad7fbb9 (patch)
tree9fca404077f9ee89830316dd870d94e3487d8317 /hidl/light
parent0322a6f345fa3dc32271fdb5ca1d20d18910cfba (diff)
downloadhardware_samsung-83cc460bb7e784a07d0b2eb640505795aad7fbb9.tar.gz
hardware_samsung-83cc460bb7e784a07d0b2eb640505795aad7fbb9.tar.bz2
hardware_samsung-83cc460bb7e784a07d0b2eb640505795aad7fbb9.zip
samsung: hidl: light: use StringPrintf
Change-Id: I3f36a92f04b254770a768623a2d957729fa87150
Diffstat (limited to 'hidl/light')
-rw-r--r--hidl/light/Light.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/hidl/light/Light.cpp b/hidl/light/Light.cpp
index 3e9b17f..6516dd4 100644
--- a/hidl/light/Light.cpp
+++ b/hidl/light/Light.cpp
@@ -15,6 +15,7 @@
*/
#define LOG_TAG "android.hardware.light@2.0-service.samsung"
+#include <android-base/stringprintf.h>
#include <iomanip>
#include "Light.h"
@@ -155,10 +156,8 @@ void Light::setNotificationLED() {
}
state.color = calibrateColor(state.color & COLOR_MASK, adjusted_brightness);
- std::stringstream ss;
- ss << std::hex << "0x" << std::setfill('0') << std::setw(8) << state.color << std::dec
- << " " << state.flashOnMs << " " << state.flashOffMs;
- set(LED_BLINK_NODE, ss.str());
+ set(LED_BLINK_NODE, android::base::StringPrintf("0x%08x %d %d", state.color, state.flashOnMs,
+ state.flashOffMs));
#ifdef LED_BLN_NODE
if (bln) {