mirror of
https://github.com/chararomandroid/android_device_samsung_a20
synced 2026-08-21 11:55:31 -04:00
universal7885: parts-aidl: Charging is enabled on 0 disabled on 1
This commit is contained in:
parent
5b75120653
commit
e29ee0a60e
1 changed files with 3 additions and 3 deletions
|
|
@ -25,12 +25,12 @@ void SmartCharge::battery_monitor(void) {
|
|||
auto batt = FileIO::readline(BATTERY_CAPACITY_CURRENT);
|
||||
if (batt >= limit) {
|
||||
if (kTookAction) goto sleep;
|
||||
FileIO::writeline(BATTERY_CHARGE, 0);
|
||||
FileIO::writeline(BATTERY_CHARGE, 1);
|
||||
kTookAction = true;
|
||||
limit_stat += 1;
|
||||
} else if (batt <= restart) {
|
||||
if (kTookAction) goto sleep;
|
||||
FileIO::writeline(BATTERY_CHARGE, 1);
|
||||
FileIO::writeline(BATTERY_CHARGE, 0);
|
||||
kTookAction = true;
|
||||
restart_stat += 1;
|
||||
} else {
|
||||
|
|
@ -56,7 +56,7 @@ sleep:
|
|||
if (monitor_th != nullptr) {
|
||||
monitor_th = nullptr;
|
||||
}
|
||||
FileIO::writeline(BATTERY_CHARGE, 1);
|
||||
FileIO::writeline(BATTERY_CHARGE, 0);
|
||||
return ::ndk::ScopedAStatus::ok();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue