Enable features in gproj source
that havent written into gee's overlays.
Note that gamma control and on-screen navbar still
needs kernel support
Change-Id: I0671564d4e907b80f6db15406d634b39733eddf3
diff --git a/cmhw/org/cyanogenmod/hardware/DisplayColorCalibration.java b/cmhw/org/cyanogenmod/hardware/DisplayColorCalibration.java
new file mode 100644
index 0000000..f933f3d
--- /dev/null
+++ b/cmhw/org/cyanogenmod/hardware/DisplayColorCalibration.java
@@ -0,0 +1,44 @@
+/*
+ * 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;
+
+public class DisplayColorCalibration {
+ private static final String COLOR_FILE = "/sys/devices/platform/kcal_ctrl.0/kcal";
+ private static final String COLOR_FILE_CTRL = "/sys/devices/platform/kcal_ctrl.0/kcal_ctrl";
+
+ public static boolean isSupported() {
+ return true;
+ }
+
+ public static int getMaxValue() {
+ return 255;
+ }
+ public static int getMinValue() {
+ return 0;
+ }
+ public static String getCurColors() {
+ return FileUtils.readOneLine(COLOR_FILE);
+ }
+ public static boolean setColors(String colors) {
+ if (!FileUtils.writeLine(COLOR_FILE, colors)) {
+ return false;
+ }
+ return FileUtils.writeLine(COLOR_FILE_CTRL, "1");
+ }
+}
diff --git a/cmhw/org/cyanogenmod/hardware/KeyDisabler.java b/cmhw/org/cyanogenmod/hardware/KeyDisabler.java
new file mode 100644
index 0000000..a1960e8
--- /dev/null
+++ b/cmhw/org/cyanogenmod/hardware/KeyDisabler.java
@@ -0,0 +1,44 @@
+/*
+ * 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;
+
+import org.cyanogenmod.hardware.util.FileUtils;
+
+/*
+ * 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 {
+
+ private static String CONTROL_PATH = "/sys/devices/virtual/input/lge_touch/keypad_enable";
+
+ public static boolean isSupported() { return true; }
+
+ public static boolean isActive() {
+ return (FileUtils.readOneLine(CONTROL_PATH).equals("0"));
+ }
+
+ public static boolean setActive(boolean state) {
+ return FileUtils.writeLine(CONTROL_PATH, (state ? "0" : "1"));
+ }
+
+}
diff --git a/cmhw/org/cyanogenmod/hardware/VibratorHW.java b/cmhw/org/cyanogenmod/hardware/VibratorHW.java
new file mode 100644
index 0000000..bd605c8
--- /dev/null
+++ b/cmhw/org/cyanogenmod/hardware/VibratorHW.java
@@ -0,0 +1,47 @@
+/*
+ * 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;
+
+public class VibratorHW {
+
+ private static String AMP_PATH = "/sys/class/timed_output/vibrator/amp";
+
+ public static boolean isSupported() {
+ return true;
+ }
+
+ public static int getMaxIntensity() {
+ return 100;
+ }
+ public static int getMinIntensity() {
+ return 50;
+ }
+ public static int getWarningThreshold() {
+ return -1;
+ }
+ public static int getCurIntensity() {
+ return Integer.parseInt(FileUtils.readOneLine(AMP_PATH));
+ }
+ public static int getDefaultIntensity() {
+ return 70;
+ }
+ public static boolean setIntensity(int intensity) {
+ return FileUtils.writeLine(AMP_PATH, String.valueOf(intensity));
+ }
+}
diff --git a/gee-common.mk b/gee-common.mk
index ceb2efd..e1ffa69 100644
--- a/gee-common.mk
+++ b/gee-common.mk
@@ -21,6 +21,8 @@
DEVICE_PACKAGE_OVERLAYS := device/lge/gee-common/overlay
+BOARD_HARDWARE_CLASS := device/lge/gee-common/cmhw/
+
# This device is xhdpi. However the platform doesn't
# currently contain all of the bitmaps at xhdpi density so
# we do this little trick to fall back to the hdpi version
@@ -207,7 +209,7 @@
libmmcamera_interface
PRODUCT_PACKAGES += \
- libmm-omxcore \
+ libmm-omxcore \
libdivxdrmdecrypt \
libOmxVdec \
libOmxVenc \
@@ -235,8 +237,7 @@
PRODUCT_PACKAGES += \
bdAddrLoader \
libwfcu \
- conn_init \
- OmniTorch
+ conn_init
PRODUCT_PACKAGES += \
keystore.msm8960
@@ -247,11 +248,9 @@
# Telephony Properties
PRODUCT_PROPERTY_OVERRIDES += \
telephony.lteOnCdmaDevice=1 \
- telephony.lte.cdma.device=1 \
telephony.lteOnGsmDevice=1 \
- telephony.lte.gsm.device=1 \
- ro.telephony.default_network=10 \
- ro.ril.def.preferred.network=10 \
+ ro.telephony.default_network=9 \
+ ro.ril.def.preferred.network=9 \
ril.subscription.types=NV,RUIM
PRODUCT_PROPERTY_OVERRIDES += \
@@ -259,7 +258,7 @@
PRODUCT_PROPERTY_OVERRIDES += \
wifi.interface=wlan0 \
- wifi.supplicant_scan_interval=15
+ wifi.supplicant_scan_interval=90
# Enable AAC 5.1 output
PRODUCT_PROPERTY_OVERRIDES += \
@@ -276,10 +275,9 @@
persist.sys.usb.config=mtp
PRODUCT_RUNTIMES := \
- runtime_libdvm_default
-
-PRODUCT_RUNTIMES += \
+ runtime_libdvm_default \
runtime_libart
+
# QRNGD
PRODUCT_PACKAGES += qrngd
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index 6a4fc04..44244be 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -291,7 +291,7 @@
before automatically restore the default connection. Set -1 if the connection
does not require auto-restore. -->
<!-- the 6th element indicates boot-time dependency-met value. -->
- <string-array translatable="false" name="networkAttributes">
+ <string-array translatable="false" name="networkAttributes">
<item>"wifi,1,1,1,-1,true"</item>
<item>"mobile,0,0,0,-1,true"</item>
<item>"mobile_mms,2,0,2,60000,true"</item>
@@ -305,7 +305,7 @@
<item>"wifi_p2p,13,1,0,-1,true"</item>
</string-array>
-<bool name="config_telephony_use_own_number_for_voicemail">true</bool>
+ <bool name="config_telephony_use_own_number_for_voicemail">true</bool>
<!-- If the DUN connection for this CDMA device supports more than just DUN -->
<!-- traffic you should list them here. -->
@@ -317,6 +317,9 @@
<item>"dun"</item>
<item>"mms"</item>
<item>"supl"</item>
+ <item>"bt-pan"</item>
</string-array>
+ <integer name="config_deviceHardwareKeys">7</integer>
+
</resources>
diff --git a/overlay/packages/apps/Camera/res/values/cm_arrays.xml b/overlay/packages/apps/Camera/res/values/cm_arrays.xml
new file mode 100644
index 0000000..0c4b3b0
--- /dev/null
+++ b/overlay/packages/apps/Camera/res/values/cm_arrays.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012-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.
+-->
+<resources>
+ <string-array name="pref_camera_iso_entryvalues" translatable="false">
+ <item>auto</item>
+ <item>HJR</item>
+ <item>SPORTS</item>
+ <item>NIGHT</item>
+ <item>MOVIE</item>
+ <item>6400</item>
+ <item>3200</item>
+ <item>1600</item>
+ <item>1200</item>
+ <item>1000</item>
+ <item>800</item>
+ <item>400</item>
+ <item>200</item>
+ <item>100</item>
+ <item>50</item>
+ </string-array>
+</resources>
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..073ab61
--- /dev/null
+++ b/overlay/packages/apps/Settings/res/values/config.xml
@@ -0,0 +1,12 @@
+<resources>
+ <!-- Home button Wake Support. Some devices do not support this.
+ Setting to false will disable Home button Wake support -->
+ <bool name="config_show_homeWake">false</bool>
+
+ <!-- Volume rocker support. Some devices do not have a volume rocker. -->
+ <bool name="has_volume_rocker">true</bool>
+
+ <!-- Volume Rocker Wake Support. Some devices do not support (PMU) this.
+ Setting to false will disable Volume Rocker Wake support -->
+ <bool name="config_show_volumeRockerWake">true</bool>
+</resources>