Hardware: Samsung: simplify CMHW isSupported check
authorDave Daynard <nardholio@gmail.com>
Tue, 19 Aug 2014 01:15:21 +0000 (21:15 -0400)
committerDave Daynard <nardholio@gmail.com>
Tue, 19 Aug 2014 01:15:21 +0000 (21:15 -0400)
Change-Id: Ia07e20baf5c72dc33394ae48fbacd548592c207f

cmhw/org/cyanogenmod/hardware/AdaptiveBacklight.java
cmhw/org/cyanogenmod/hardware/VibratorHW.java

index d96dad97f5b1a15a0b1cdcef5d2b9e58c3e7ec75..e39e2faf1f1d56c5bd1782c5b2a0dd9339387137 100644 (file)
@@ -37,12 +37,7 @@ public class AdaptiveBacklight {
      */
     public static boolean isSupported() {
         File f = new File(FILE_CABC);
-
-        if(f.exists()) {
-            return true;
-        } else {
-            return false;
-        }
+        return f.exists();
     }
 
     /**
index b6fa263d810fe07aadd6a100323ca2de1273e8a6..3ec6b5d8525b782464f4ca701b7840d9488029ce 100755 (executable)
@@ -30,12 +30,7 @@ public class VibratorHW {
 
     public static boolean isSupported() {
         File f = new File(LEVEL_PATH);
-
-        if(f.exists()) {
-            return true;
-        } else {
-            return false;
-        }
+        return f.exists();
     }
 
     public static int getMaxIntensity()  {