From e8af307a2abacea07bfd1034b5acf8b50bc49fa4 Mon Sep 17 00:00:00 2001 From: Ricardo Cerqueira Date: Fri, 23 Aug 2013 15:59:20 +0100 Subject: Revert "Button & keyboard backlight brightness adjustment (1/2)" This reverts commit 281b4045e0baa18fcc5001f395ef39940048cd96, since backlight can and should be managed by the standard liblights support in PowerManager. Support for that was just added to Settings Change-Id: Ia6e6258a05222e2f63099febc71beeb345f0ad89 --- src/org/cyanogenmod/hardware/ButtonBacklight.java | 84 ---------------------- .../cyanogenmod/hardware/KeyboardBacklight.java | 84 ---------------------- 2 files changed, 168 deletions(-) delete mode 100644 src/org/cyanogenmod/hardware/ButtonBacklight.java delete mode 100644 src/org/cyanogenmod/hardware/KeyboardBacklight.java diff --git a/src/org/cyanogenmod/hardware/ButtonBacklight.java b/src/org/cyanogenmod/hardware/ButtonBacklight.java deleted file mode 100644 index 5d699f8..0000000 --- a/src/org/cyanogenmod/hardware/ButtonBacklight.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (C) 2013 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; - -/* - * Button backlight brightness adjustment - * - * Exports methods to get the valid value boundaries, the - * default and current backlight brightness, and a method to set - * the backlight brightness. - * - * Values exported by min/max can be the direct values required - * by the hardware, or a local (to ButtonBacklightBrightness) abstraction - * that's internally converted to something else prior to actual use. The - * Settings user interface will normalize these into a 0-100 (percentage) - * scale before showing them to the user, but all values passed to/from - * the client (Settings) are in this class' scale. - */ - -public class ButtonBacklight { - - /* - * All HAF classes should export this boolean. - * Real implementations must, of course, return true - */ - - public static boolean isSupported() { return false; } - - /* - * Set the button backlight brightness to given integer input. That'll - * be a value between the boundaries set by get(Max|Min)Intensity - * (see below), and it's meant to be locally interpreted/used. - */ - - public static boolean setBrightness(int brightness) { - throw new UnsupportedOperationException(); - } - - /* - * What's the maximum integer value we take for setBrightness()? - */ - - public static int getMaxBrightness() { - return -1; - } - - /* - * What's the minimum integer value we take for setBrightness()? - */ - - public static int getMinBrightness() { - return -1; - } - - /* - * What's the current brightness value? - */ - - public static int getCurBrightness() { - return -1; - } - - /* - * What's the shipping brightness value? - */ - - public static int getDefaultBrightness() { - return -1; - } -} diff --git a/src/org/cyanogenmod/hardware/KeyboardBacklight.java b/src/org/cyanogenmod/hardware/KeyboardBacklight.java deleted file mode 100644 index de32f3e..0000000 --- a/src/org/cyanogenmod/hardware/KeyboardBacklight.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (C) 2013 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; - -/* - * Keyboard backlight brightness adjustment - * - * Exports methods to get the valid value boundaries, the - * default and current backlight brightness, and a method to set - * the backlight brightness. - * - * Values exported by min/max can be the direct values required - * by the hardware, or a local (to KeyboardBacklightBrightness) abstraction - * that's internally converted to something else prior to actual use. The - * Settings user interface will normalize these into a 0-100 (percentage) - * scale before showing them to the user, but all values passed to/from - * the client (Settings) are in this class' scale. - */ - -public class KeyboardBacklight { - - /* - * All HAF classes should export this boolean. - * Real implementations must, of course, return true - */ - - public static boolean isSupported() { return false; } - - /* - * Set the keyboard backlight brightness to given integer input. That'll - * be a value between the boundaries set by get(Max|Min)Intensity - * (see below), and it's meant to be locally interpreted/used. - */ - - public static boolean setBrightness(int brightness) { - throw new UnsupportedOperationException(); - } - - /* - * What's the maximum integer value we take for setBrightness()? - */ - - public static int getMaxBrightness() { - return -1; - } - - /* - * What's the minimum integer value we take for setBrightness()? - */ - - public static int getMinBrightness() { - return -1; - } - - /* - * What's the current brightness value? - */ - - public static int getCurBrightness() { - return -1; - } - - /* - * What's the shipping brightness value? - */ - - public static int getDefaultBrightness() { - return -1; - } -} -- cgit v1.2.3