From: David Daynard Date: Sun, 25 Aug 2013 13:26:49 +0000 (-0400) Subject: vibrator intensity: disable tunable framework if not supported X-Git-Tag: cm-10.2-M1~9 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f138a2fb672039bb979e69d75e5e74404377daf5;p=GitHub%2FLineageOS%2Fandroid_hardware_samsung.git vibrator intensity: disable tunable framework if not supported Change-Id: I6481b82b7ee5412234d42e39f7f5560489f14af3 --- diff --git a/cmhw/org/cyanogenmod/hardware/VibratorHW.java b/cmhw/org/cyanogenmod/hardware/VibratorHW.java index 970d74e..b6fa263 100755 --- a/cmhw/org/cyanogenmod/hardware/VibratorHW.java +++ b/cmhw/org/cyanogenmod/hardware/VibratorHW.java @@ -29,7 +29,13 @@ public class VibratorHW { private static String LEVEL_THRESHOLD_PATH = "/sys/class/timed_output/vibrator/pwm_threshold"; public static boolean isSupported() { - return true; + File f = new File(LEVEL_PATH); + + if(f.exists()) { + return true; + } else { + return false; + } } public static int getMaxIntensity() {