diff options
| author | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2014-03-05 01:24:30 +0000 |
|---|---|---|
| committer | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2014-03-05 01:24:30 +0000 |
| commit | 01627f7f48e31df4f519fa2d846397b168cf1d00 (patch) | |
| tree | 3da549ef73c2c20183d33ea18d1b074d9c2d29b6 | |
| parent | ef4e3048e3b705e845c3824143e00f35ec46ba99 (diff) | |
| download | android_hardware_lineage_lineagehw-01627f7f48e31df4f519fa2d846397b168cf1d00.tar.gz android_hardware_lineage_lineagehw-01627f7f48e31df4f519fa2d846397b168cf1d00.tar.bz2 android_hardware_lineage_lineagehw-01627f7f48e31df4f519fa2d846397b168cf1d00.zip | |
HAF: Add KeyDisabler stub
Allow disabling the capacitive keys on a device
Change-Id: I855cb094963bc3263fd68e4dacbbd8f331ccb825
| -rw-r--r-- | src/org/cyanogenmod/hardware/KeyDisabler.java | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/org/cyanogenmod/hardware/KeyDisabler.java b/src/org/cyanogenmod/hardware/KeyDisabler.java new file mode 100644 index 0000000..1e6ad28 --- /dev/null +++ b/src/org/cyanogenmod/hardware/KeyDisabler.java @@ -0,0 +1,53 @@ +/* + * 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; + +/* + * Disable capacitive keys + * + * This is intended for use on devices in which the capacitive keys + * can be fully disabled for replacement with a soft navbar. You + * really should not be using this on a device with mechanical or + * otherwise visible-when-inactive keys + */ + +public class KeyDisabler { + + /* + * All HAF classes should export this boolean. + * Real implementations must, of course, return true + */ + + public static boolean isSupported() { return false; } + + /* + * Are the keys currently blocked? + */ + + public static boolean isActive() { + return false; + } + + /* + * Disable capacitive keys + */ + + public static boolean setActive(boolean state) { + throw new UnsupportedOperationException(); + } + +} |
