vibrator intensity: disable tunable framework if not supported
authorDavid Daynard <nardholio@gmail.com>
Sun, 25 Aug 2013 13:26:49 +0000 (09:26 -0400)
committerDaniel Hillenbrand <codeworkx@cyanogenmod.org>
Sun, 25 Aug 2013 16:24:47 +0000 (18:24 +0200)
Change-Id: I6481b82b7ee5412234d42e39f7f5560489f14af3

cmhw/org/cyanogenmod/hardware/VibratorHW.java

index 970d74e6b21259245cd99fdfe8b2c9e3820d7235..b6fa263d810fe07aadd6a100323ca2de1273e8a6 100755 (executable)
@@ -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()  {