Java Code Examples for com.grarak.kerneladiutor.utils.Utils#strToInt()

The following examples show how to use com.grarak.kerneladiutor.utils.Utils#strToInt() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Sound.java    From KernelAdiutor with GNU General Public License v3.0 5 votes vote down vote up
public void setHandsetMicrophoneGain(String value, Context context) {
    int newGain = Utils.strToInt(value);
    if (newGain >= 0 && newGain <= 20) {
        fauxRun(value, HANDSET_MICROPHONE_GAIN, HANDSET_MICROPHONE_GAIN, context);
    } else if (newGain <= -1 && newGain >= -30) {
        value = String.valueOf(newGain + 256);
        fauxRun(value, HANDSET_MICROPHONE_GAIN, HANDSET_MICROPHONE_GAIN, context);
    }
}
 
Example 2
Source File: CPUFreq.java    From KernelAdiutor with GNU General Public License v3.0 5 votes vote down vote up
public void setMaxFreq(int freq, int min, int max, Context context) {
    MSMPerformance msmPerformance = MSMPerformance.getInstance();

    if (Utils.existFile(CPU_MSM_CPUFREQ_LIMIT) && freq > Utils.strToInt(Utils.readFile(CPU_MSM_CPUFREQ_LIMIT))) {
        run(Control.write(String.valueOf(freq), CPU_MSM_CPUFREQ_LIMIT), CPU_MSM_CPUFREQ_LIMIT, context);
    }
    int minFreq = getMinFreq(min, false);
    if (minFreq != 0 && freq < minFreq) {
        setMinFreq(freq, min, max, context);
    }
    if (Utils.existFile(Utils.strFormat(CPU_ENABLE_OC, 0))) {
        for (int i = min; i <= max; i++) {
            run(Control.write("1", Utils.strFormat(CPU_ENABLE_OC, i)),
                    Utils.strFormat(CPU_ENABLE_OC, i), context);
        }
    }
    if (msmPerformance.hasCpuMaxFreq()) {
        for (int i = min; i <= max; i++) {
            msmPerformance.setCpuMaxFreq(freq, i, context);
        }
    }
    if (Utils.existFile(Utils.strFormat(CPU_MAX_FREQ_KT, 0))) {
        applyCpu(CPU_MAX_FREQ_KT, String.valueOf(freq), min, max, context);
    } else {
        applyCpu(CPU_MAX_FREQ, String.valueOf(freq), min, max, context);
    }
    if (Utils.existFile(HARD_CPU_MAX_FREQ)) {
        run(Control.write(String.valueOf(freq), HARD_CPU_MAX_FREQ), HARD_CPU_MAX_FREQ, context);
    }
}
 
Example 3
Source File: IntelliPlug.java    From KernelAdiutor with GNU General Public License v3.0 4 votes vote down vote up
public int getIntelliPlugDeferSampling() {
    return Utils.strToInt(Utils.readFile(HOTPLUG_INTELLI_PLUG_5_DEFER_SAMPLING));
}
 
Example 4
Source File: ZenDecision.java    From KernelAdiutor with GNU General Public License v3.0 4 votes vote down vote up
public static int getZenDecisionBatThresholdIgnore() {
    return Utils.strToInt(Utils.readFile(HOTPLUG_ZEN_DECISION_BAT_THRESHOLD_IGNORE));
}
 
Example 5
Source File: MakoHotplug.java    From KernelAdiutor with GNU General Public License v3.0 4 votes vote down vote up
public static int getMakoHotplugSuspendFreq() {
    return Utils.strToInt(Utils.readFile(MAKO_HOTPLUG_SUSPEND_FREQ));
}
 
Example 6
Source File: Misc.java    From KernelAdiutor with GNU General Public License v3.0 4 votes vote down vote up
public int getChargeTimeout() {
    return Utils.strToInt(Utils.readFile(T2W_CHARGE_TIMEOUT_SMDK4412));
}
 
Example 7
Source File: AdrenoIdler.java    From KernelAdiutor with GNU General Public License v3.0 4 votes vote down vote up
public static int getAdrenoIdlerIdleWait() {
    return Utils.strToInt(Utils.readFile(ADRENO_IDLER_IDLEWAIT));
}
 
Example 8
Source File: BluPlug.java    From KernelAdiutor with GNU General Public License v3.0 4 votes vote down vote up
public static int getBluPlugMaxCoresScreenOff() {
    return Utils.strToInt(Utils.readFile(HOTPLUG_BLU_PLUG_MAX_CORES_SCREEN_OFF));
}
 
Example 9
Source File: MSMHotplug.java    From KernelAdiutor with GNU General Public License v3.0 4 votes vote down vote up
public int getMsmHotplugHistorySize() {
    return Utils.strToInt(Utils.readFile(HOTPLUG_MSM_HISTORY_SIZE));
}
 
Example 10
Source File: MSMThermal.java    From KernelAdiutor with GNU General Public License v3.0 4 votes vote down vote up
public int getThermalLimitLow() {
    return Utils.strToInt(Utils.readFile(getParent(PARAMETERS_THERMAL_LIMIT_LOW)));
}
 
Example 11
Source File: IntelliPlug.java    From KernelAdiutor with GNU General Public License v3.0 4 votes vote down vote up
public int getIntelliPlugProfile() {
    String file = HOTPLUG_INTELLI_PLUG_PROFILE;
    if (mUseVersion5) file = HOTPLUG_INTELLI_PLUG_5_PROFILE;
    return Utils.strToInt(Utils.readFile(file));
}
 
Example 12
Source File: BluPlug.java    From KernelAdiutor with GNU General Public License v3.0 4 votes vote down vote up
public static int getBluPlugMinOnline() {
    return Utils.strToInt(Utils.readFile(HOTPLUG_BLU_PLUG_MIN_ONLINE));
}
 
Example 13
Source File: ZSwap.java    From KernelAdiutor with GNU General Public License v3.0 4 votes vote down vote up
public static int getMaxPoolPercent() {
    return Utils.strToInt(Utils.readFile(MAX_POOL_PERCENT));
}
 
Example 14
Source File: MakoHotplug.java    From KernelAdiutor with GNU General Public License v3.0 4 votes vote down vote up
public static int getMakoHotplugHighLoadCounter() {
    return Utils.strToInt(Utils.readFile(MAKO_HOTPLUG_HIGH_LOAD_COUNTER));
}
 
Example 15
Source File: IntelliPlug.java    From KernelAdiutor with GNU General Public License v3.0 4 votes vote down vote up
public int getIntelliPlugCpusBoosted() {
    return Utils.strToInt(Utils.readFile(HOTPLUG_INTELLI_PLUG_5_CPUS_BOOSTED));
}
 
Example 16
Source File: GPUFreq.java    From KernelAdiutor with GNU General Public License v3.0 4 votes vote down vote up
public int get2dMaxFreq() {
    return Utils.strToInt(Utils.readFile(MAX_KGSL2D0_QCOM_FREQ));
}
 
Example 17
Source File: Calibration.java    From KernelAdiutor with GNU General Public License v3.0 4 votes vote down vote up
public int getScreenValue() {
    return Utils.strToInt(Utils.readFile(KCAL_CTRL_VAL));
}
 
Example 18
Source File: Sec.java    From KernelAdiutor with GNU General Public License v3.0 4 votes vote down vote up
public static int getNotificationDelayOff() {
    return Utils.strToInt(Utils.readFile(LNDOFF));
}
 
Example 19
Source File: KSM.java    From KernelAdiutor with GNU General Public License v3.0 4 votes vote down vote up
public int getMaxCpuPercentage() {
    return Utils.strToInt(Utils.readFile(MAX_CPU_PERCENTAGE));
}
 
Example 20
Source File: ThunderPlug.java    From KernelAdiutor with GNU General Public License v3.0 4 votes vote down vote up
public static int getThunderPlugLoadThreshold() {
    return Utils.strToInt(Utils.readFile(HOTPLUG_THUNDER_PLUG_LOAD_THRESHOLD));
}