Migrate String8|16.setTo to assignment operator [sensors]
Bug: 295394788
Test: make checkbuild
Change-Id: I63b97b573f6b182ba36c4eb933b695d7a6ed59d0
Merged-In: I63b97b573f6b182ba36c4eb933b695d7a6ed59d0
diff --git a/libs/sensor/Sensor.cpp b/libs/sensor/Sensor.cpp
index f76d5cf..1d61805 100644
--- a/libs/sensor/Sensor.cpp
+++ b/libs/sensor/Sensor.cpp
@@ -631,7 +631,7 @@
if (size < len) {
return false;
}
- outputString8.setTo(static_cast<char const*>(buffer), len);
+ outputString8 = String8(static_cast<char const*>(buffer), len);
if (size < FlattenableUtils::align<4>(len)) {
ALOGE("Malformed Sensor String8 field. Should be in a 4-byte aligned buffer but is not.");