diff options
author | Tomasz Wasilczyk <twasilczyk@google.com> | 2023-09-12 22:12:26 +0000 |
---|---|---|
committer | Tomasz Wasilczyk <twasilczyk@google.com> | 2023-09-12 22:13:09 +0000 |
commit | 8acdce346b94d81bbc0e133e61d7e3af00f7fbef (patch) | |
tree | 9ddfb2e6f27e37e0ac40b4982956562192953121 | |
parent | d5293cd8ce9ad22c623c953a8ce3122cf0825b57 (diff) | |
download | gs101-8acdce346b94d81bbc0e133e61d7e3af00f7fbef.tar.gz |
Don't depend on String8 cast to C string
Bug: 295394788
Test: m checkbuild
Change-Id: Idec78a8922beb4a5a4659c32f01086c929ac3eed
-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 d3b5810..1288bab 100644 --- a/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp +++ b/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp @@ -937,7 +937,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; @@ -946,7 +948,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(); } @@ -965,7 +967,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(); @@ -1127,7 +1129,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; |