diff options
| author | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2013-07-24 00:31:20 +0100 |
|---|---|---|
| committer | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2013-07-24 00:31:20 +0100 |
| commit | 47532a2318844c5ea2f01c3194548322204335d5 (patch) | |
| tree | bfb9f8190ac86f2f42c8d82b96692d7c9cf1739a /src | |
| parent | 782e4235158c46f1418758d11ea89fa6878eacc1 (diff) | |
| download | android_frameworks_opt_hardware-47532a2318844c5ea2f01c3194548322204335d5.tar.gz android_frameworks_opt_hardware-47532a2318844c5ea2f01c3194548322204335d5.tar.bz2 android_frameworks_opt_hardware-47532a2318844c5ea2f01c3194548322204335d5.zip | |
Add DisplayColorCalibration class
Diffstat (limited to 'src')
| -rw-r--r-- | src/org/cyanogenmod/hardware/DisplayColorCalibration.java | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/src/org/cyanogenmod/hardware/DisplayColorCalibration.java b/src/org/cyanogenmod/hardware/DisplayColorCalibration.java new file mode 100644 index 0000000..e0d05fa --- /dev/null +++ b/src/org/cyanogenmod/hardware/DisplayColorCalibration.java @@ -0,0 +1,79 @@ +/* + * 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; + +/* + * Display RGB intensity calibration (kcal) + * + * Exports methods to get the valid value boundaries, the + * current color values, and a method to set new ones. + * + * Values exported by min/max can be the direct values required + * by the hardware, or a local (to DisplayColorCalibration) 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 DisplayColorCalibration { + + /* + * All HAF classes should export this boolean. + * Real implementations must, of course, return true + */ + + public static boolean isSupported() { return false; } + + /* + * Set the RGB values to the given input triplet. Input is + * expected to consist of 3 values, space-separated, each to + * be a value between the boundaries set by get(Max|Min)Value + * (see below), and it's meant to be locally interpreted/used. + */ + + public static boolean setColors(String colors) { + throw new UnsupportedOperationException(); + } + + /* + * What's the maximum integer value we take for a color + */ + + public static int getMaxValue() { + return -1; + } + + /* + * What's the minimum integer value we take for a color + */ + + public static int getMinValue() { + return -1; + } + + /* + * What's the current RGB triplet? + * This should return a space-separated set of integers in + * a string, same format as the input to setColors() + */ + + public static String getCurColors() { + return "0 0 0"; + } + +} |
