Skip to content
This repository has been archived by the owner on Oct 5, 2019. It is now read-only.

Update ThunderCharge and AiO HotPlug #520

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,20 @@ public class Battery {

private static final String CHARGE_RATE = "/sys/kernel/thundercharge_control";
private static final String CHARGE_RATE_ENABLE = CHARGE_RATE + "/enabled";
private static final String CUSTOM_CURRENT = CHARGE_RATE + "/custom_current";
private static final String CUSTOM_AC_CURRENT = CHARGE_RATE + "/custom_ac_current";

private static Integer sCapacity;

public static void setChargingCurrent(int value, Context context) {
run(Control.write(String.valueOf(value), CUSTOM_CURRENT), CUSTOM_CURRENT, context);
run(Control.write(String.valueOf(value), CUSTOM_AC_CURRENT), CUSTOM_AC_CURRENT, context);
}

public static int getChargingCurrent() {
return Utils.strToInt(Utils.readFile(CUSTOM_CURRENT));
return Utils.strToInt(Utils.readFile(CUSTOM_AC_CURRENT));
}

public static boolean hasChargingCurrent() {
return Utils.existFile(CUSTOM_CURRENT);
return Utils.existFile(CUSTOM_AC_CURRENT);
}

public static void enableChargeRate(boolean enable, Context context) {
Expand Down
12 changes: 6 additions & 6 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -338,12 +338,12 @@
<string name="busy_up_threshold_summary">Threshold when big CPUs should be turned on.</string>
<string name="offline_delay">Offline Delay</string>
<string name="offline_delay_summary">Time before turning off a CPU.</string>
<string name="aio_hotplug">AiO Hotplug</string>
<string name="aio_hotplug_summary">All in One HotPlug for Qualcomm devices. Developed by Shoaib0597.</string>
<string name="max_cpu_online_big">Maximum big CPUs Online</string>
<string name="max_cpu_online_big_summary">Maximum number of big CPUs that will be online.</string>
<string name="max_cpu_online_little">Maximum LITTLE CPUs Online</string>
<string name="max_cpu_online_little_summary">Maximum number of LITTLE CPUs that will be online.</string>
<string name="aio_hotplug">AiO HotPlug</string>
<string name="aio_hotplug_summary">An All in One HotPlug for Qualcomm SoCs, developed by Shoaib0597.</string>
<string name="max_cpu_online_big">big Cluster</string>
<string name="max_cpu_online_big_summary">Set the Maximum Number of Online Cores.</string>
<string name="max_cpu_online_little">LITTLE Cluster</string>
<string name="max_cpu_online_little_summary">Set the Maximum Number of Online Cores.</string>

<!--Thermal-->
<string name="thermal_info">Use only one thermal driver from the following options, using more at the same time may cause unexpected behavior.</string>
Expand Down