From: Dave Daynard Date: Tue, 19 Aug 2014 01:15:21 +0000 (-0400) Subject: Hardware: Samsung: simplify CMHW isSupported check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5828e5e904aad7d762349e86dfc0f92134ccb393;p=GitHub%2FLineageOS%2Fandroid_hardware_samsung.git Hardware: Samsung: simplify CMHW isSupported check Change-Id: Ia07e20baf5c72dc33394ae48fbacd548592c207f --- diff --git a/cmhw/org/cyanogenmod/hardware/AdaptiveBacklight.java b/cmhw/org/cyanogenmod/hardware/AdaptiveBacklight.java index d96dad9..e39e2fa 100644 --- a/cmhw/org/cyanogenmod/hardware/AdaptiveBacklight.java +++ b/cmhw/org/cyanogenmod/hardware/AdaptiveBacklight.java @@ -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(); } /** diff --git a/cmhw/org/cyanogenmod/hardware/VibratorHW.java b/cmhw/org/cyanogenmod/hardware/VibratorHW.java index b6fa263..3ec6b5d 100755 --- a/cmhw/org/cyanogenmod/hardware/VibratorHW.java +++ b/cmhw/org/cyanogenmod/hardware/VibratorHW.java @@ -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() {