diff options
author | Tomasz Wasilczyk <twasilczyk@google.com> | 2023-10-03 00:48:16 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-10-03 00:48:16 +0000 |
commit | 52dd0d81fbe18acaabafd347f743aa87132a87ca (patch) | |
tree | b76ce9e3d3fc9c20355fb8c2770d23cc76232866 | |
parent | 0fcd4596b12cf081f4116963897219c78c1667c2 (diff) | |
parent | cb3b13b334392947ac43e5b6ef6d48c590662956 (diff) | |
download | gs101-52dd0d81fbe18acaabafd347f743aa87132a87ca.tar.gz |
Don't depend on String8 cast to C string am: 8acdce346b am: c943f58653 am: cb3b13b334
Original change: https://android-review.googlesource.com/c/platform/hardware/google/graphics/gs101/+/2749177
Change-Id: Iaed5e8757692e20e8cb7fcc2cc48e606f670f0b5
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 c3b721f..7301370 100644 --- a/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp +++ b/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp @@ -971,7 +971,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; @@ -980,7 +982,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(); } @@ -999,7 +1001,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(); @@ -1161,7 +1163,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; |