Skip to content

Commit

Permalink
oneplus2: cmhw: Use cmsdk FileUtils
Browse files Browse the repository at this point in the history
Change-Id: Idebbc357888c8670829a70c69c2fa99f717b45c6
  • Loading branch information
mikeNG authored and Grarak committed Nov 1, 2016
1 parent 0e6f5bb commit 808af47
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions cmhw/org/cyanogenmod/hardware/KeyDisabler.java
Expand Up @@ -16,9 +16,7 @@

package org.cyanogenmod.hardware;

import java.io.File;

import org.cyanogenmod.hardware.util.FileUtils;
import org.cyanogenmod.internal.util.FileUtils;

/*
* Disable capacitive keys
Expand All @@ -34,11 +32,11 @@ public class KeyDisabler {
private static String CONTROL_PATH = "/proc/s1302/virtual_key";

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

public static boolean isActive() {
return (FileUtils.readOneLine(CONTROL_PATH).contains("enabled"));
return FileUtils.readOneLine(CONTROL_PATH).contains("enabled");
}

public static boolean setActive(boolean state) {
Expand Down

0 comments on commit 808af47

Please sign in to comment.