From 5828e5e904aad7d762349e86dfc0f92134ccb393 Mon Sep 17 00:00:00 2001 From: Dave Daynard Date: Mon, 18 Aug 2014 21:15:21 -0400 Subject: [PATCH] Hardware: Samsung: simplify CMHW isSupported check Change-Id: Ia07e20baf5c72dc33394ae48fbacd548592c207f --- cmhw/org/cyanogenmod/hardware/AdaptiveBacklight.java | 7 +------ cmhw/org/cyanogenmod/hardware/VibratorHW.java | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) 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() { -- 2.20.1