Skip to content

Commit

Permalink
cmhw: Use cmsdk FileUtils
Browse files Browse the repository at this point in the history
Change-Id: Idebbc357888c8670829a70c69c2fa99f717b45c6
  • Loading branch information
mikeNG authored and bgcngm committed Jun 16, 2016
1 parent 4ca738f commit a6e45f7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions cmhw/org/cyanogenmod/hardware/KeyDisabler.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@

package org.cyanogenmod.hardware;

import org.cyanogenmod.hardware.util.FileUtils;

import java.io.File;
import org.cyanogenmod.internal.util.FileUtils;

/*
* Disable capacitive keys
Expand All @@ -34,11 +32,11 @@ public class KeyDisabler {
private static String CONTROL_PATH = "/sys/devices/soc/75ba000.i2c/i2c-12/12-0020/input/input1/0dbutton";

public static boolean isSupported() {
return new File(CONTROL_PATH).exists();
return FileUtils.isFileWritable(CONTROL_PATH);
}

public static boolean isActive() {
return (FileUtils.readOneLine(CONTROL_PATH).equals("0"));
return FileUtils.readOneLine(CONTROL_PATH).equals("0");
}

public static boolean setActive(boolean state) {
Expand Down

0 comments on commit a6e45f7

Please sign in to comment.