From f138a2fb672039bb979e69d75e5e74404377daf5 Mon Sep 17 00:00:00 2001 From: David Daynard Date: Sun, 25 Aug 2013 09:26:49 -0400 Subject: [PATCH] vibrator intensity: disable tunable framework if not supported Change-Id: I6481b82b7ee5412234d42e39f7f5560489f14af3 --- cmhw/org/cyanogenmod/hardware/VibratorHW.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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() { -- 2.20.1