diff options
| author | Jason Riordan <jriordan001@gmail.com> | 2015-11-21 13:44:27 -0500 |
|---|---|---|
| committer | LuK1337 <priv.luk@gmail.com> | 2016-01-27 16:48:46 +0100 |
| commit | adacbfc5c9c69279e717da32c8289dd3ae65a359 (patch) | |
| tree | ba5b09871b069dbcdc1d5d08c7dabe32bdecc46d /cmhw | |
| parent | e342e197b726b68691ba11a9723125561df6ab92 (diff) | |
msm8916-common: Migrate to native TAP_TO_WAKE
Change-Id: I3d3b1b32d5ea29c59d7b08812788e4d3a187d206
Diffstat (limited to 'cmhw')
| -rw-r--r-- | cmhw/org/cyanogenmod/hardware/TapToWake.java | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/cmhw/org/cyanogenmod/hardware/TapToWake.java b/cmhw/org/cyanogenmod/hardware/TapToWake.java deleted file mode 100644 index 8cbb21e..0000000 --- a/cmhw/org/cyanogenmod/hardware/TapToWake.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2015 The CyanogenMod Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cyanogenmod.hardware; - -import java.io.File; -import org.cyanogenmod.hardware.util.FileUtils; - -public class TapToWake { - - private static final String CONTROL_PATH = "/sys/bus/i2c/devices/i2c-5/5-0038/dclick_mode"; - private static boolean sEnabled = true; - - public static boolean isSupported() { - File f = new File(CONTROL_PATH); - return f.exists(); - } - - public static boolean isEnabled() { - return sEnabled; - } - - public static boolean setEnabled(boolean state) { - sEnabled = state; - return FileUtils.writeLine(CONTROL_PATH, (state ? "1" : "0")); - } -} |
