Java Code Examples for com.grarak.kerneladiutor.utils.Utils#existFile()
The following examples show how to use
com.grarak.kerneladiutor.utils.Utils#existFile() .
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: Voltage.java From KernelAdiutor with GNU General Public License v3.0 | 6 votes |
private Voltage() { for (String path : mVoltages.keySet()) { if (Utils.existFile(path)) { PATH = path; break; } } if (PATH == null) return; String value = Utils.readFile(PATH).replace(" ", ""); if (!value.isEmpty()) { String[] lines = value.split(mSplitNewline.get(PATH)); sFreqs = new String[lines.length]; for (int i = 0; i < sFreqs.length; i++) { sFreqs[i] = lines[i].split(mSplitLine.get(PATH))[0].trim(); } } }
Example 2
Source File: Misc.java From KA27 with Apache License 2.0 | 5 votes |
public static boolean hasNewPowerSuspendState() { if (Utils.existFile(POWER_SUSPEND_STATE) && Utils.existFile(POWER_SUSPEND_VERSION)) { String version = Utils.readFile(POWER_SUSPEND_VERSION); if (version.contains("1.3") || version.contains("1.5")) return true; } return false; }
Example 3
Source File: Misc.java From KA27 with Apache License 2.0 | 5 votes |
public static boolean hasVibration() { for (String vibration: VIBRATION_ARRAY) if (Utils.existFile(vibration)) { VIBRATION_PATH = vibration; break; } return VIBRATION_PATH != null; }
Example 4
Source File: Screen.java From KA27 with Apache License 2.0 | 5 votes |
public static List < String > getColorCalibrationLimits() { List < String > list = new ArrayList < > (); switch (SCREEN_CALIBRATION) { case SCREEN_SAMOLED_COLOR_RED: case SCREEN_COLOR_CONTROL: for (int i = 60; i < 401; i++) list.add(String.valueOf(i)); break; case SCREEN_FB0_RGB: for (int i = 255; i < 32769; i++) list.add(String.valueOf(i)); break; case SCREEN_FB_KCAL: for (int i = 0; i < 256; i++) list.add(String.valueOf(i)); break; default: int max = 255; for (String file: SCREEN_KCAL_CTRL_NEW_ARRAY) if (Utils.existFile(file)) { max = 256; break; } for (int i = 0; i < max + 1; i++) list.add(String.valueOf(i)); break; } return list; }
Example 5
Source File: Backup.java From kernel_adiutor with Apache License 2.0 | 5 votes |
public static String getBootPartition() { if (boot == null) for (String partition : Boot) if (Utils.existFile(partition)) { boot = partition; return partition; } return boot; }
Example 6
Source File: GPU.java From KA27 with Apache License 2.0 | 5 votes |
public static int getGpu2dMaxFreq() { if (GPU_2D_MAX_FREQ != null) if (Utils.existFile(GPU_2D_MAX_FREQ)) { String value = Utils.readFile(GPU_2D_MAX_FREQ); if (value != null) return Utils.stringToInt(value); } return 0; }
Example 7
Source File: IntelliPlug.java From KernelAdiutor with GNU General Public License v3.0 | 5 votes |
private IntelliPlug() { if (Utils.existFile(HOTPLUG_INTELLI_PLUG)) mUseVersion5 = false; else if (Utils.existFile(HOTPLUG_INTELLI_PLUG_5)) mUseVersion5 = true; if (mUseVersion5 != null) { mHasInsanity = Utils.existFile(HOTPLUG_INTELLI_PLUG_INSANITY); } }
Example 8
Source File: CPUHotplug.java From kernel_adiutor with Apache License 2.0 | 4 votes |
public static boolean hasMBHotplugBoostEnable() { return Utils.existFile(Utils.getsysfspath(MB_HOTPLUG_ARRAY) + "/" + MB_BOOST_ENABLED); }
Example 9
Source File: Wake.java From kernel_adiutor with Apache License 2.0 | 4 votes |
public static boolean hasGesture() { return Utils.existFile(Utils.getsysfspath(GESTURE_CRTL)); }
Example 10
Source File: CPUHotplug.java From KA27 with Apache License 2.0 | 4 votes |
public static boolean hasMSMSleeperEnable() { return Utils.existFile(MSM_SLEEPER_ENABLE); }
Example 11
Source File: LMK.java From KernelAdiutor with GNU General Public License v3.0 | 4 votes |
public static boolean hasSwapWaitPercent() { return Utils.existFile(SWAP_WAIT_PERCENT); }
Example 12
Source File: CPUHotplug.java From KA27 with Apache License 2.0 | 4 votes |
public static boolean hasAlucardHotplugMinCpusOnline() { return Utils.existFile(ALUCARD_HOTPLUG_MIN_CPUS_ONLINE); }
Example 13
Source File: IO.java From KernelAdiutor with GNU General Public License v3.0 | 4 votes |
public boolean hasScheduler(Storage storage) { return Utils.existFile(getPath(storage, SCHEDULER)); }
Example 14
Source File: CPU.java From kernel_adiutor with Apache License 2.0 | 4 votes |
public static boolean hasCpuBoostWakeup() { return Utils.existFile(CPU_BOOST_WAKEUP); }
Example 15
Source File: CPUHotplug.java From KA27 with Apache License 2.0 | 4 votes |
public static boolean hasIntelliPlugScreenOffMax() { if (Utils.existFile(CPU_MAX_SCREEN_OFF_FREQ)) return false; String file = HOTPLUG_INTELLI_PLUG_SCREEN_OFF_MAX; if (TYPE == INTELLIPLUG_TYPE.INTELLIPLUG_5) file = HOTPLUG_INTELLI_PLUG_5_SCREEN_OFF_MAX; return Utils.existFile(file); }
Example 16
Source File: CPUHotplug.java From KA27 with Apache License 2.0 | 4 votes |
public static boolean hasMBHotplugMaxCpusOnlineSusp() { return Utils.existFile(Utils.getsysfspath(MB_HOTPLUG_ARRAY) + "/" + MB_CPUS_ONLINE_SUSP); }
Example 17
Source File: CPUHotplug.java From kernel_adiutor with Apache License 2.0 | 4 votes |
public static boolean hasMBHotplugPause() { return Utils.existFile(Utils.getsysfspath(MB_HOTPLUG_ARRAY) + "/" + MB_PAUSE); }
Example 18
Source File: CPUBoost.java From KernelAdiutor with GNU General Public License v3.0 | 4 votes |
public boolean hasCpuBoostDebugMask() { return Utils.existFile(CPU_BOOST_DEBUG_MASK); }
Example 19
Source File: PowerSuspend.java From KernelAdiutor with GNU General Public License v3.0 | 4 votes |
public static boolean hasOldState() { return Utils.existFile(STATE) && Utils.existFile(VERSION) && Utils.readFile(VERSION).contains("1.2"); }
Example 20
Source File: VM.java From kernel_adiutor with Apache License 2.0 | 4 votes |
public static boolean hasLaptopMode() { if (Utils.existFile(VM_LAPTOP_MODE)) return true; return false; }