universal7885: libfileio: Fix the unoverloadable function error

device/samsung/universal7885-common/apps/aidl-support/libfileio/FileIO.cpp:27:5: error: functions that differ only in their return type cannot be overloaded
int readline(const char *path) {
~~~ ^
device/samsung/universal7885-common/apps/aidl-support/libfileio/FileIO.cpp:12:13: note: previous definition is here
std::string readline(const char *path) {
~~~~~~~~~~~ ^
1 error generated.

- Rename int version to 'readint' to fix
This commit is contained in:
roynatech2544 2022-11-26 19:11:40 +09:00
commit 8d728a6111
6 changed files with 7 additions and 7 deletions

View file

@ -43,7 +43,7 @@ static inline const char *BatterySysToPath(BatterySys type) {
// Methods from ::android::hardware::battery::V1_0::IBattery follow.
::ndk::ScopedAStatus BatteryStats::getBatteryStats(BatterySys stats,
int32_t *_aidl_return) {
*_aidl_return = FileIO::readline(BatterySysToPath(stats));
*_aidl_return = FileIO::readint(BatterySysToPath(stats));
return ::ndk::ScopedAStatus::ok();
}

View file

@ -37,7 +37,7 @@ constexpr const char *TORCH_LVL =
::ndk::ScopedAStatus
FlashBrightness::readFlashlightstats(bool s2mu106, int32_t *_aidl_return) {
*_aidl_return =
s2mu106 ? FileIO::readline(TORCH_LVL) / 21 : FileIO::readline(TORCH_LVL);
s2mu106 ? FileIO::readint(TORCH_LVL) / 21 : FileIO::readint(TORCH_LVL);
return ::ndk::ScopedAStatus::ok();
}

View file

@ -22,7 +22,7 @@ namespace aidl::vendor::eureka::hardware::parts {
void SmartCharge::battery_monitor(void) {
while (kShouldRun) {
auto batt = FileIO::readline(BATTERY_CAPACITY_CURRENT);
auto batt = FileIO::readint(BATTERY_CAPACITY_CURRENT);
if (batt >= limit) {
if (kTookAction)
goto sleep;