diff options
author | Yifan Hong <elsk@google.com> | 2017-03-02 02:21:56 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2017-03-02 02:21:56 +0000 |
commit | 3268291060919c1f64a316386e5367da7ed19375 (patch) | |
tree | fef7cb065212e406babb5dc48a58d489c134866e /sensors | |
parent | c2278c20c8f48dccf3c318402e64f5c89a4322b0 (diff) | |
parent | 5f81564de2fc85d4ba5e547bee20fd32c6f436ec (diff) | |
download | platform_hardware_interfaces-3268291060919c1f64a316386e5367da7ed19375.tar.gz platform_hardware_interfaces-3268291060919c1f64a316386e5367da7ed19375.tar.bz2 platform_hardware_interfaces-3268291060919c1f64a316386e5367da7ed19375.zip |
Merge "Revert "Revert "Revert "Protect against null strings in hal wrapper implementation.""""
Diffstat (limited to 'sensors')
-rw-r--r-- | sensors/1.0/default/convert.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sensors/1.0/default/convert.cpp b/sensors/1.0/default/convert.cpp index 748a9639c6..306d3a3bc2 100644 --- a/sensors/1.0/default/convert.cpp +++ b/sensors/1.0/default/convert.cpp @@ -25,8 +25,8 @@ namespace V1_0 { namespace implementation { void convertFromSensor(const sensor_t &src, SensorInfo *dst) { - dst->name = src.name == nullptr ? "" : src.name; - dst->vendor = src.vendor == nullptr ? "" : src.vendor; + dst->name = src.name; + dst->vendor = src.vendor; dst->version = src.version; dst->sensorHandle = src.handle; dst->type = (SensorType)src.type; @@ -36,8 +36,8 @@ void convertFromSensor(const sensor_t &src, SensorInfo *dst) { dst->minDelay = src.minDelay; dst->fifoReservedEventCount = src.fifoReservedEventCount; dst->fifoMaxEventCount = src.fifoMaxEventCount; - dst->typeAsString = src.stringType == nullptr ? "" : src.stringType; - dst->requiredPermission = src.requiredPermission == nullptr ? "" : src.requiredPermission; + dst->typeAsString = src.stringType; + dst->requiredPermission = src.requiredPermission; dst->maxDelay = src.maxDelay; dst->flags = src.flags; } |