summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRicardo Cerqueira <cyanogenmod@cerqueira.org>2014-01-21 22:34:08 +0000
committerRicardo Cerqueira <cyanogenmod@cerqueira.org>2014-01-21 22:37:51 +0000
commitb240ab8e7c1918202c8c98118aab2d34b0be6461 (patch)
tree49a1cbc45ed0e8bd7231a3fe78ce5272d369cf6e /src
parent93068f7be79bc72a952f7f1772063f54ef6280c2 (diff)
downloadandroid_hardware_lineage_lineagehw-b240ab8e7c1918202c8c98118aab2d34b0be6461.tar.gz
android_hardware_lineage_lineagehw-b240ab8e7c1918202c8c98118aab2d34b0be6461.tar.bz2
android_hardware_lineage_lineagehw-b240ab8e7c1918202c8c98118aab2d34b0be6461.zip
Add tap-to-wake class definition
Change-Id: Icaa7f8e8846ab4d7375a03b407fb3c80a194de49
Diffstat (limited to 'src')
-rw-r--r--src/org/cyanogenmod/hardware/TapToWake.java49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/org/cyanogenmod/hardware/TapToWake.java b/src/org/cyanogenmod/hardware/TapToWake.java
new file mode 100644
index 0000000..680de27
--- /dev/null
+++ b/src/org/cyanogenmod/hardware/TapToWake.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2014 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;
+
+/**
+ * Tap (usually double-tap) to wake. This *should always* be supported by
+ * the hardware directly. A lot of recent touch controllers have a firmware
+ * option for this
+ */
+public class TapToWake {
+
+ /**
+ * Whether device supports it
+ *
+ * @return boolean Supported devices must return always true
+ */
+ public static boolean isSupported() { return false; }
+
+ /**
+ * This method return the current activation state
+ *
+ * @return boolean Must be false when feature is not supported or
+ * disabled.
+ */
+ public static boolean isEnabled() { return false; }
+
+ /**
+ * This method allows to set activation state
+ *
+ * @param state The new state
+ * @return boolean for on/off, exception if unsupported
+ */
+ public static boolean setEnabled(boolean state) { throw new UnsupportedOperationException(); }
+
+}