summaryrefslogtreecommitdiff
path: root/cmhw
diff options
context:
space:
mode:
authornailyk-fr <nailyk_git@nailyk.fr>2016-09-01 20:41:49 +0200
committernailyk-fr <nailyk_git@nailyk.fr>2017-02-21 13:39:18 +0100
commit270ec8ce019ccc6dc4362f4c9a8d0bde2eb6bf68 (patch)
tree160c87c6778b31170abb7e3754861230c4980155 /cmhw
parent41128676f37eee884e473bc1ee24da0c420f5fd8 (diff)
shinano-common: CMHW: Disable dynamic vtg_level
* 3.4 (stock and concept) doesn't provide vtg_level for now. Disable it. Change-Id: I70b7c93fafe192b1e3913c700c511f177b322ecf
Diffstat (limited to 'cmhw')
-rw-r--r--cmhw/org/cyanogenmod/hardware/VibratorHW.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/cmhw/org/cyanogenmod/hardware/VibratorHW.java b/cmhw/org/cyanogenmod/hardware/VibratorHW.java
index 7683919..2cf3c0a 100644
--- a/cmhw/org/cyanogenmod/hardware/VibratorHW.java
+++ b/cmhw/org/cyanogenmod/hardware/VibratorHW.java
@@ -20,7 +20,7 @@ import org.cyanogenmod.hardware.util.FileUtils;
public class VibratorHW {
- private static String LEVEL_PATH = "/sys/devices/virtual/timed_output/vibrator/vtg_level";
+// private static String LEVEL_PATH = "/sys/devices/virtual/timed_output/vibrator/vtg_level";
public static boolean isSupported() {
return true;
@@ -30,18 +30,23 @@ public class VibratorHW {
return 31;
}
public static int getMinIntensity() {
- return 21;
+ return 31;
}
public static int getWarningThreshold() {
return 31;
}
public static int getCurIntensity() {
- return Integer.parseInt(FileUtils.readOneLine(LEVEL_PATH));
+// return Integer.parseInt(FileUtils.readOneLine(LEVEL_PATH));
+ return 31;
}
public static int getDefaultIntensity() {
return 31;
}
public static boolean setIntensity(int intensity) {
- return FileUtils.writeLine(LEVEL_PATH, String.valueOf(intensity));
+// return FileUtils.writeLine(LEVEL_PATH, String.valueOf(intensity));
+ if (intensity == 31) {
+ return true;
+ }
+ return false;
}
}