mirror of
https://github.com/team-infusion-developers/android_hardware_samsung.git
synced 2024-11-06 21:55:41 +00:00
AdaptiveBacklight: fix illegal value exception.
Change-Id: I8ea84451c8dd4be35a2d2e62547fc81a2b704dd1
This commit is contained in:
parent
a81d58b35e
commit
50c588b53f
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue