diff options
author | Tomasz Wasilczyk <twasilczyk@google.com> | 2023-10-02 23:41:56 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-10-02 23:41:56 +0000 |
commit | c943f58653bcaa5e945fbfc06d38fc8922e4a642 (patch) | |
tree | eaef4ffbbce3cea2319b404607afa1527df086a2 | |
parent | 812edbfc7f88e7b2928393367add170a3bd8e1a2 (diff) | |
parent | 8acdce346b94d81bbc0e133e61d7e3af00f7fbef (diff) | |
download | gs101-c943f58653bcaa5e945fbfc06d38fc8922e4a642.tar.gz |
Don't depend on String8 cast to C string am: 8acdce346btmp_amf_298295554
Original change: https://android-review.googlesource.com/c/platform/hardware/google/graphics/gs101/+/2749177
Change-Id: Ib75335f44d0353ca9a6ee2ae45a637cd78f0b0ec
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp b/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp index 2bf949f..2607bb2 100644 --- a/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp +++ b/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp @@ -936,7 +936,9 @@ uint32_t ExynosPrimaryDisplayModule::getAtcLuxMapIndex(std::vector<atc_lux_map> int32_t ExynosPrimaryDisplayModule::setAtcStrength(uint32_t strength) { mAtcStrength.value.store(strength); if (mAtcStrength.value.is_dirty()) { - if (writeIntToFile(mAtcStrength.node, mAtcStrength.value.get()) != NO_ERROR) return -EPERM; + if (writeIntToFile(mAtcStrength.node.c_str(), mAtcStrength.value.get()) != NO_ERROR) { + return -EPERM; + } mAtcStrength.value.clear_dirty(); } return NO_ERROR; @@ -945,7 +947,7 @@ int32_t ExynosPrimaryDisplayModule::setAtcStrength(uint32_t strength) { int32_t ExynosPrimaryDisplayModule::setAtcAmbientLight(uint32_t ambient_light) { mAtcAmbientLight.value.store(ambient_light); if (mAtcAmbientLight.value.is_dirty()) { - if (writeIntToFile(mAtcAmbientLight.node, mAtcAmbientLight.value.get()) != NO_ERROR) + if (writeIntToFile(mAtcAmbientLight.node.c_str(), mAtcAmbientLight.value.get()) != NO_ERROR) return -EPERM; mAtcAmbientLight.value.clear_dirty(); } @@ -964,7 +966,7 @@ int32_t ExynosPrimaryDisplayModule::setAtcMode(std::string mode_name) { for (auto it = kAtcSubSetting.begin(); it != kAtcSubSetting.end(); it++) { mAtcSubSetting[it->first.c_str()].value.store(mode.sub_setting[it->first.c_str()]); if (mAtcSubSetting[it->first.c_str()].value.is_dirty()) { - if (writeIntToFile(mAtcSubSetting[it->first.c_str()].node, + if (writeIntToFile(mAtcSubSetting[it->first.c_str()].node.c_str(), mAtcSubSetting[it->first.c_str()].value.get()) != NO_ERROR) return -EPERM; mAtcSubSetting[it->first.c_str()].value.clear_dirty(); @@ -1126,7 +1128,7 @@ int32_t ExynosPrimaryDisplayModule::setAtcStDimming(uint32_t value) { int32_t ExynosPrimaryDisplayModule::setAtcEnable(bool enable) { mAtcEnable.value.store(enable); if (mAtcEnable.value.is_dirty()) { - if (writeIntToFile(mAtcEnable.node, enable) != NO_ERROR) return -EPERM; + if (writeIntToFile(mAtcEnable.node.c_str(), enable) != NO_ERROR) return -EPERM; mAtcEnable.value.clear_dirty(); } return NO_ERROR; |