mirror of
https://github.com/chararomandroid/android_device_samsung_a20
synced 2026-08-24 04:45:32 -04:00
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:
parent
eea872d99a
commit
8d728a6111
6 changed files with 7 additions and 7 deletions
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue