mirror of
https://github.com/chararomandroid/android_device_samsung_a20
synced 2026-08-23 12:35:33 -04:00
rootdir: Drop chown fastcharge sysfs to system
Also fix errors of aidl
This commit is contained in:
parent
497fa53db9
commit
4296d27bea
4 changed files with 3 additions and 13 deletions
|
|
@ -32,7 +32,7 @@ class Battery {
|
||||||
return mBattery.getBatteryStats(BatterySys.CHARGE) == 0
|
return mBattery.getBatteryStats(BatterySys.CHARGE) == 0
|
||||||
}
|
}
|
||||||
set(k) {
|
set(k) {
|
||||||
mBattery.setBatteryWritable(BatterySys.CHARGE, k)
|
mBattery.setBatteryWritable(BatterySys.CHARGE, !k)
|
||||||
}
|
}
|
||||||
|
|
||||||
var FastCharge: Boolean
|
var FastCharge: Boolean
|
||||||
|
|
|
||||||
|
|
@ -58,12 +58,13 @@ constexpr const char *FM_FREQ_SEEK =
|
||||||
break;
|
break;
|
||||||
case GetType::GET_TYPE_FM_SYSFS_IF:
|
case GetType::GET_TYPE_FM_SYSFS_IF:
|
||||||
*_aidl_return = access("/sys/devices/virtual/s610_radio/s610_radio/", F_OK);
|
*_aidl_return = access("/sys/devices/virtual/s610_radio/s610_radio/", F_OK);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
return ndk::ScopedAStatus::ok();
|
return ndk::ScopedAStatus::ok();
|
||||||
}
|
}
|
||||||
:ndk::ScopedAStatus FMSupport::setValue(SetType type, int value) {
|
::ndk::ScopedAStatus FMSupport::setValue(SetType type, int value) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case SetType::SET_TYPE_FM_FREQ:
|
case SetType::SET_TYPE_FM_FREQ:
|
||||||
FileIO::writeline(FM_FREQ_CTL, freq * 1000);
|
FileIO::writeline(FM_FREQ_CTL, freq * 1000);
|
||||||
|
|
|
||||||
|
|
@ -49,15 +49,7 @@ static inline const char *BatterySysToPath(BatterySys type) {
|
||||||
|
|
||||||
::ndk::ScopedAStatus BatteryStats::setBatteryWritable(BatterySys stats,
|
::ndk::ScopedAStatus BatteryStats::setBatteryWritable(BatterySys stats,
|
||||||
bool value) {
|
bool value) {
|
||||||
bool FastCharge = false;
|
|
||||||
if (FastCharge)
|
|
||||||
seteuid(ANDROID_SYSTEM_UID);
|
|
||||||
|
|
||||||
FileIO::writeline(BatterySysToPath(stats), value ? 1 : 0);
|
FileIO::writeline(BatterySysToPath(stats), value ? 1 : 0);
|
||||||
|
|
||||||
if (FastCharge)
|
|
||||||
seteuid(ANDROID_ROOT_UID);
|
|
||||||
|
|
||||||
return ::ndk::ScopedAStatus::ok();
|
return ::ndk::ScopedAStatus::ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,6 @@ on early-init
|
||||||
on init
|
on init
|
||||||
start watchdogd
|
start watchdogd
|
||||||
|
|
||||||
# Fastcharge
|
|
||||||
chown system radio /sys/class/sec/switch/afc_disable
|
|
||||||
|
|
||||||
write /proc/sys/vm/swappiness 160
|
write /proc/sys/vm/swappiness 160
|
||||||
|
|
||||||
# ZRAM setup
|
# ZRAM setup
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue