From 72e6293f27c1a41960dff988f8e59afd14ff8fc0 Mon Sep 17 00:00:00 2001 From: sbrissen Date: Mon, 28 Oct 2013 11:25:50 -0400 Subject: kona-common: Initial commit --- .../frameworks/base/core/res/res/values/config.xml | 82 ++++++++++++++++++++++ .../base/core/res/res/xml/power_profile.xml | 61 ++++++++++++++++ .../base/core/res/res/xml/storage_list.xml | 51 ++++++++++++++ .../cyanogenmod/hardware/AdaptiveBacklight.java | 32 +++++++++ .../cyanogenmod/hardware/AdaptiveBacklight.java | 74 +++++++++++++++++++ overlay/packages/apps/Browser/res/values/bools.xml | 16 +++++ overlay/packages/apps/Camera/res/values/config.xml | 23 ++++++ .../packages/apps/Launcher2/res/values/config.xml | 18 +++++ .../packages/apps/Settings/res/values/arrays.xml | 46 ++++++++++++ .../packages/apps/Settings/res/values/bools.xml | 23 ++++++ .../packages/apps/Settings/res/values/config.xml | 20 ++++++ overlay/packages/apps/Torch/res/values/config.xml | 36 ++++++++++ 12 files changed, 482 insertions(+) create mode 100644 overlay/frameworks/base/core/res/res/values/config.xml create mode 100644 overlay/frameworks/base/core/res/res/xml/power_profile.xml create mode 100644 overlay/frameworks/base/core/res/res/xml/storage_list.xml create mode 100644 overlay/frameworks/opt/hardware/src/org/cyanogenmod/hardware/AdaptiveBacklight.java create mode 100644 overlay/hardware/samsung/cmhw/org/cyanogenmod/hardware/AdaptiveBacklight.java create mode 100644 overlay/packages/apps/Browser/res/values/bools.xml create mode 100644 overlay/packages/apps/Camera/res/values/config.xml create mode 100644 overlay/packages/apps/Launcher2/res/values/config.xml create mode 100644 overlay/packages/apps/Settings/res/values/arrays.xml create mode 100644 overlay/packages/apps/Settings/res/values/bools.xml create mode 100644 overlay/packages/apps/Settings/res/values/config.xml create mode 100644 overlay/packages/apps/Torch/res/values/config.xml (limited to 'overlay') diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml new file mode 100644 index 0000000..0ec6032 --- /dev/null +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -0,0 +1,82 @@ + + + + + + + true + + + true + + + true + + true + -1 + 0 + 1 + + + + 1,1 + 0,1 + 7,1 + + + + + "rndis0" + + + + + "wlan0" + + + + + "bt-pan" + + + + 0 + 2 + 3 + 4 + 5 + 10 + 11 + 12 + + + + true + + + false + diff --git a/overlay/frameworks/base/core/res/res/xml/power_profile.xml b/overlay/frameworks/base/core/res/res/xml/power_profile.xml new file mode 100644 index 0000000..ad5f292 --- /dev/null +++ b/overlay/frameworks/base/core/res/res/xml/power_profile.xml @@ -0,0 +1,61 @@ + + + + + 0 + 302 + 445.8 + 107.6 + 0.6 + 0.4 + 31.0 + 6.5 + 33.5 + 624.5 + 0.2 + 140.9 + 18.5 + + 4.3 + 4.3 + + + 216000 + 312000 + 456000 + 608000 + 760000 + 816000 + 912000 + 1000000 + + 2.2 + 54.6 + + 100 + 107 + 116 + 123 + 135 + 138 + 142 + 148 + + 4600 + diff --git a/overlay/frameworks/base/core/res/res/xml/storage_list.xml b/overlay/frameworks/base/core/res/res/xml/storage_list.xml new file mode 100644 index 0000000..30c5bd6 --- /dev/null +++ b/overlay/frameworks/base/core/res/res/xml/storage_list.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + diff --git a/overlay/frameworks/opt/hardware/src/org/cyanogenmod/hardware/AdaptiveBacklight.java b/overlay/frameworks/opt/hardware/src/org/cyanogenmod/hardware/AdaptiveBacklight.java new file mode 100644 index 0000000..d128317 --- /dev/null +++ b/overlay/frameworks/opt/hardware/src/org/cyanogenmod/hardware/AdaptiveBacklight.java @@ -0,0 +1,32 @@ +/* + * 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; + +import org.cyanogenmod.hardware.util.FileUtils; + +import java.io.File; + +/** + * Adaptive backlight support (this refers to technologies like NVIDIA SmartDimmer, + * QCOM CABL or Samsung CABC). + */ +public class AdaptiveBacklight { + + @Override + private static String FILE_CABC = "/sys/class/mdnie/mdnie/cabc"; + +} diff --git a/overlay/hardware/samsung/cmhw/org/cyanogenmod/hardware/AdaptiveBacklight.java b/overlay/hardware/samsung/cmhw/org/cyanogenmod/hardware/AdaptiveBacklight.java new file mode 100644 index 0000000..84a216e --- /dev/null +++ b/overlay/hardware/samsung/cmhw/org/cyanogenmod/hardware/AdaptiveBacklight.java @@ -0,0 +1,74 @@ +/* + * 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; + +import org.cyanogenmod.hardware.util.FileUtils; + +import java.io.File; + +/** + * Adaptive backlight support (this refers to technologies like NVIDIA SmartDimmer, + * QCOM CABL or Samsung CABC). + */ +public class AdaptiveBacklight { + + private static String FILE_CABC = "/sys/class/mdnie/mdnie/cabc"; + + /** + * Whether device supports an adaptive backlight technology. + * + * @return boolean Supported devices must return always true + */ + public static boolean isSupported() { + File f = new File(FILE_CABC); + + if(f.exists()) { + return true; + } else { + return false; + } + } + + /** + * This method return the current activation status of the adaptive backlight technology. + * + * @return boolean Must be false when adaptive backlight is not supported or not activated, or + * the operation failed while reading the status; true in any other case. + */ + public static boolean isEnabled() { + if (Integer.parseInt(FileUtils.readOneLine(FILE_CABC)) == 1) { + return true; + } else { + return false; + } + } + + /** + * This method allows to setup adaptive backlight technology status. + * + * @param status The new adaptive backlight status + * @return boolean Must be false if adaptive backlight is not supported or the operation + * failed; true in any other case. + */ + public static boolean setEnabled(boolean status) { + if (status == true) { + return FileUtils.writeLine(FILE_CABC, "1"); + } else { + return FileUtils.writeLine(FILE_CABC, "0"); + } + } +} diff --git a/overlay/packages/apps/Browser/res/values/bools.xml b/overlay/packages/apps/Browser/res/values/bools.xml new file mode 100644 index 0000000..3218656 --- /dev/null +++ b/overlay/packages/apps/Browser/res/values/bools.xml @@ -0,0 +1,16 @@ + + + + true + diff --git a/overlay/packages/apps/Camera/res/values/config.xml b/overlay/packages/apps/Camera/res/values/config.xml new file mode 100644 index 0000000..122b4d2 --- /dev/null +++ b/overlay/packages/apps/Camera/res/values/config.xml @@ -0,0 +1,23 @@ + + + + + + false + diff --git a/overlay/packages/apps/Launcher2/res/values/config.xml b/overlay/packages/apps/Launcher2/res/values/config.xml new file mode 100644 index 0000000..22a4ed5 --- /dev/null +++ b/overlay/packages/apps/Launcher2/res/values/config.xml @@ -0,0 +1,18 @@ + + + + true + diff --git a/overlay/packages/apps/Settings/res/values/arrays.xml b/overlay/packages/apps/Settings/res/values/arrays.xml new file mode 100644 index 0000000..3b47031 --- /dev/null +++ b/overlay/packages/apps/Settings/res/values/arrays.xml @@ -0,0 +1,46 @@ + + + + + + 15 seconds + 30 seconds + 1 minute + 2 minutes + 5 minutes + 10 minutes + + + + + + 15000 + + 30000 + + 60000 + + 120000 + + 300000 + + 600000 + + diff --git a/overlay/packages/apps/Settings/res/values/bools.xml b/overlay/packages/apps/Settings/res/values/bools.xml new file mode 100644 index 0000000..2ebd9dd --- /dev/null +++ b/overlay/packages/apps/Settings/res/values/bools.xml @@ -0,0 +1,23 @@ + + + + + + true + + + true + diff --git a/overlay/packages/apps/Settings/res/values/config.xml b/overlay/packages/apps/Settings/res/values/config.xml new file mode 100644 index 0000000..a4a7315 --- /dev/null +++ b/overlay/packages/apps/Settings/res/values/config.xml @@ -0,0 +1,20 @@ + + + + + true + diff --git a/overlay/packages/apps/Torch/res/values/config.xml b/overlay/packages/apps/Torch/res/values/config.xml new file mode 100644 index 0000000..d13de94 --- /dev/null +++ b/overlay/packages/apps/Torch/res/values/config.xml @@ -0,0 +1,36 @@ + + + + + + + false + + + /sys/class/camera/rear/rear_flash + + + 1 + + -1 + + -1 + + -- cgit v1.1