From 50c588b53f561a33e62e0acc04cb6ae2c41f952f Mon Sep 17 00:00:00 2001 From: repo Shareef Ali Date: Fri, 26 Dec 2014 23:40:22 -0600 Subject: [PATCH] AdaptiveBacklight: fix illegal value exception. Change-Id: I8ea84451c8dd4be35a2d2e62547fc81a2b704dd1 --- cmhw/org/cyanogenmod/hardware/AdaptiveBacklight.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmhw/org/cyanogenmod/hardware/AdaptiveBacklight.java b/cmhw/org/cyanogenmod/hardware/AdaptiveBacklight.java index e39e2faf..10f7d20e 100644 --- a/cmhw/org/cyanogenmod/hardware/AdaptiveBacklight.java +++ b/cmhw/org/cyanogenmod/hardware/AdaptiveBacklight.java @@ -19,6 +19,7 @@ package org.cyanogenmod.hardware; import org.cyanogenmod.hardware.util.FileUtils; import android.os.SystemProperties; +import android.text.TextUtils; import java.io.File; @@ -47,7 +48,7 @@ public class AdaptiveBacklight { * the operation failed while reading the status; true in any other case. */ public static boolean isEnabled() { - if (Integer.parseInt(FileUtils.readOneLine(FILE_CABC)) == 1) { + if (TextUtils.equals(FileUtils.readOneLine(FILE_CABC), "1")) { return true; } else { return false;