summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKalimochoAz <calimochoazucarado@gmail.com>2012-07-23 03:04:48 +0200
committerKalimochoAz <calimochoazucarado@gmail.com>2012-07-23 03:04:48 +0200
commit8e8baa74c467a51dcf1338d3096875f5a0baf868 (patch)
treea2bb25cd987bd47e79f0bc2399f6dd46b42acffc
parent55709d40c8df61c6badb8a8ecab6ebfd34b95d60 (diff)
parentb5f4a69e24cd5dae6c2d014b078c3a2966d14611 (diff)
downloaddevice_samsung_crespo-8e8baa74c467a51dcf1338d3096875f5a0baf868.zip
device_samsung_crespo-8e8baa74c467a51dcf1338d3096875f5a0baf868.tar.gz
device_samsung_crespo-8e8baa74c467a51dcf1338d3096875f5a0baf868.tar.bz2
Merge remote-tracking branch 'github/ics' into 23072012
Conflicts: Android.mk BoardConfigCommon.mk board-info.txt device_base.mk egl.cfg factory-images/generate-factory-images-package.sh kernel overlay/frameworks/base/core/res/res/values/config.xml Change-Id: If153de549a1a3b5145f856de6c55c825d3124a11
-rw-r--r--.gitignore2
-rw-r--r--Android.mk2
-rwxr-xr-xBoardConfigCommon.mk11
-rw-r--r--CrespoParts/Android.mk15
-rw-r--r--CrespoParts/AndroidManifest.xml31
-rwxr-xr-xCrespoParts/res/drawable/blue_tuning_preview.xml9
-rw-r--r--CrespoParts/res/drawable/color_tuning_preview.xml9
-rwxr-xr-xCrespoParts/res/drawable/green_tuning_preview.xml9
-rwxr-xr-xCrespoParts/res/drawable/ic_launcher_cmdevicesettings.pngbin0 -> 8207 bytes
-rwxr-xr-xCrespoParts/res/drawable/red_tuning_preview.xml9
-rw-r--r--CrespoParts/res/layout/idle_stats_dialog.xml87
-rwxr-xr-xCrespoParts/res/layout/preference_colorgamma_presets.xml120
-rw-r--r--CrespoParts/res/layout/preference_dialog_color_tuning.xml119
-rw-r--r--CrespoParts/res/layout/preference_dialog_gamma_tuning.xml119
-rwxr-xr-xCrespoParts/res/layout/top.xml5
-rw-r--r--CrespoParts/res/values-da/strings.xml49
-rw-r--r--CrespoParts/res/values-de/arrays.xml28
-rw-r--r--CrespoParts/res/values-de/strings.xml57
-rw-r--r--CrespoParts/res/values-es/arrays.xml22
-rw-r--r--CrespoParts/res/values-es/strings.xml49
-rw-r--r--CrespoParts/res/values-fr/strings.xml50
-rw-r--r--CrespoParts/res/values-it/arrays.xml28
-rw-r--r--CrespoParts/res/values-it/strings.xml48
-rw-r--r--CrespoParts/res/values-ja/arrays.xml54
-rw-r--r--CrespoParts/res/values-ja/strings.xml55
-rw-r--r--CrespoParts/res/values-ko/arrays.xml28
-rw-r--r--CrespoParts/res/values-ko/strings.xml55
-rw-r--r--CrespoParts/res/values-nl/strings.xml49
-rwxr-xr-xCrespoParts/res/values-pt-rBR/arrays.xml27
-rwxr-xr-xCrespoParts/res/values-pt-rBR/strings.xml48
-rw-r--r--CrespoParts/res/values-pt-rPT/arrays.xml27
-rw-r--r--CrespoParts/res/values-pt-rPT/strings.xml52
-rw-r--r--CrespoParts/res/values-ru/arrays.xml28
-rw-r--r--CrespoParts/res/values-ru/strings.xml54
-rw-r--r--CrespoParts/res/values-tr/strings.xml50
-rw-r--r--CrespoParts/res/values-zh-rCN/arrays.xml34
-rw-r--r--CrespoParts/res/values-zh-rCN/strings.xml40
-rw-r--r--CrespoParts/res/values-zh-rTW/arrays.xml34
-rw-r--r--CrespoParts/res/values-zh-rTW/strings.xml54
-rw-r--r--CrespoParts/res/values/arrays.xml54
-rw-r--r--CrespoParts/res/values/strings.xml56
-rwxr-xr-xCrespoParts/res/xml/display_preferences.xml19
-rw-r--r--CrespoParts/res/xml/general_preferences.xml25
-rw-r--r--CrespoParts/src/com/cyanogenmod/settings/device/ColorHackPresets.java212
-rw-r--r--CrespoParts/src/com/cyanogenmod/settings/device/ColorTuningPreference.java264
-rw-r--r--CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java163
-rwxr-xr-xCrespoParts/src/com/cyanogenmod/settings/device/DisplayFragmentActivity.java54
-rw-r--r--CrespoParts/src/com/cyanogenmod/settings/device/GammaTuningPreference.java272
-rw-r--r--CrespoParts/src/com/cyanogenmod/settings/device/GeneralFragmentActivity.java159
-rw-r--r--CrespoParts/src/com/cyanogenmod/settings/device/Hspa.java57
-rw-r--r--CrespoParts/src/com/cyanogenmod/settings/device/Startup.java18
-rw-r--r--CrespoParts/src/com/cyanogenmod/settings/device/Utils.java149
-rw-r--r--board-info.txt1
-rw-r--r--cm.dependencies7
-rw-r--r--cm.mk19
-rw-r--r--device.mk1
-rw-r--r--device_base.mk24
-rw-r--r--egl.cfg1
-rwxr-xr-xfactory-images/generate-factory-images-package.sh1
-rw-r--r--graphics.c314
-rw-r--r--libcamera/Android.mk4
-rwxr-xr-xlibcamera/SecCamera.cpp3
-rwxr-xr-xlibcamera/SecCameraHWInterface.cpp29
-rw-r--r--libcamera/SecCameraUtils.cpp72
-rw-r--r--libcamera/SecCameraUtils.h44
-rwxr-xr-xliblight/lights.c28
-rw-r--r--libs3cjpeg/Android.mk2
-rw-r--r--overlay/frameworks/base/core/res/res/values/config.xml3
-rw-r--r--overlay/frameworks/base/packages/SystemUI/res/values/config.xml29
-rw-r--r--sec_mm/sec_omx/sec_codecs/video/mfc_c110/include/SsbSipMfcApi.h2
-rwxr-xr-xvendorsetup.sh23
71 files changed, 3625 insertions, 51 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..c77d927
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+*.orig
+*~
diff --git a/Android.mk b/Android.mk
index dc60df9..247d657 100644
--- a/Android.mk
+++ b/Android.mk
@@ -15,7 +15,5 @@
LOCAL_PATH := $(call my-dir)
ifneq ($(filter crespo crespo4g,$(TARGET_DEVICE)),)
-
include $(call all-makefiles-under,$(LOCAL_PATH))
-
endif
diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk
index 69ef4ba..18712d0 100755
--- a/BoardConfigCommon.mk
+++ b/BoardConfigCommon.mk
@@ -60,11 +60,21 @@ TARGET_RECOVERY_PIXEL_FORMAT := "BGRA_8888"
TARGET_RECOVERY_UI_LIB := librecovery_ui_crespo
TARGET_RELEASETOOLS_EXTENSIONS := device/samsung/crespo
+# Define kernel config for inline building
+TARGET_KERNEL_CONFIG := crespo_defconfig
+TARGET_KERNEL_SOURCE := kernel/samsung/crespo
+
TARGET_USERIMAGES_USE_EXT4 := true
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 536870912
BOARD_USERDATAIMAGE_PARTITION_SIZE := 1073741824
BOARD_FLASH_BLOCK_SIZE := 4096
+
+BOARD_HAS_NO_SELECT_BUTTON := true
+BOARD_CUSTOM_GRAPHICS := ../../../device/samsung/crespo/graphics.c
+
+BOARD_USE_SKIA_LCDTEXT := true
+
# Connectivity - Wi-Fi
WPA_SUPPLICANT_VERSION := VER_0_8_X
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
@@ -88,3 +98,4 @@ USE_OPENGL_RENDERER := true
TARGET_DISABLE_TRIPLE_BUFFERING := false
BOARD_ALLOW_EGL_HIBERNATION := true
+
diff --git a/CrespoParts/Android.mk b/CrespoParts/Android.mk
new file mode 100644
index 0000000..ef015ef
--- /dev/null
+++ b/CrespoParts/Android.mk
@@ -0,0 +1,15 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_STATIC_JAVA_LIBRARIES := android-support-v13
+
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+
+LOCAL_PACKAGE_NAME := CrespoParts
+LOCAL_CERTIFICATE := platform
+
+include $(BUILD_PACKAGE)
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/CrespoParts/AndroidManifest.xml b/CrespoParts/AndroidManifest.xml
new file mode 100644
index 0000000..12b1009
--- /dev/null
+++ b/CrespoParts/AndroidManifest.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.cyanogenmod.settings.device"
+ android:sharedUserId="android.uid.system" >
+
+ <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
+ <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
+
+ <application android:label="@string/app_name" >
+ <activity
+ android:name="com.cyanogenmod.settings.device.DeviceSettings"
+ android:icon="@drawable/ic_launcher_cmdevicesettings"
+ android:label="@string/app_name" >
+ <intent-filter>
+ <action android:name="com.cyanogenmod.action.LAUNCH_DEVICE_SETTINGS" />
+ <action android:name="android.intent.action.MAIN" />
+ </intent-filter>
+ </activity>
+
+ <receiver android:name=".Startup" >
+ <intent-filter android:priority="100" >
+ <action android:name="android.intent.action.BOOT_COMPLETED" />
+ </intent-filter>
+ </receiver>
+
+ <activity android:name=".GeneralFragmentActivity" />
+ <activity android:name=".DisplayFragmentActivity" />
+ <activity android:name=".SoundFragmentActivity" />
+ </application>
+
+</manifest>
diff --git a/CrespoParts/res/drawable/blue_tuning_preview.xml b/CrespoParts/res/drawable/blue_tuning_preview.xml
new file mode 100755
index 0000000..98ea313
--- /dev/null
+++ b/CrespoParts/res/drawable/blue_tuning_preview.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle">
+ <gradient
+ android:angle="0"
+ android:startColor="#000000"
+ android:endColor="#0000FF" />
+</shape> \ No newline at end of file
diff --git a/CrespoParts/res/drawable/color_tuning_preview.xml b/CrespoParts/res/drawable/color_tuning_preview.xml
new file mode 100644
index 0000000..2d83c10
--- /dev/null
+++ b/CrespoParts/res/drawable/color_tuning_preview.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle">
+ <gradient
+ android:angle="0"
+ android:startColor="#000000"
+ android:endColor="#FFFFFF" />
+</shape> \ No newline at end of file
diff --git a/CrespoParts/res/drawable/green_tuning_preview.xml b/CrespoParts/res/drawable/green_tuning_preview.xml
new file mode 100755
index 0000000..4f09471
--- /dev/null
+++ b/CrespoParts/res/drawable/green_tuning_preview.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle">
+ <gradient
+ android:angle="0"
+ android:startColor="#000000"
+ android:endColor="#00FF00" />
+</shape> \ No newline at end of file
diff --git a/CrespoParts/res/drawable/ic_launcher_cmdevicesettings.png b/CrespoParts/res/drawable/ic_launcher_cmdevicesettings.png
new file mode 100755
index 0000000..66de9c3
--- /dev/null
+++ b/CrespoParts/res/drawable/ic_launcher_cmdevicesettings.png
Binary files differ
diff --git a/CrespoParts/res/drawable/red_tuning_preview.xml b/CrespoParts/res/drawable/red_tuning_preview.xml
new file mode 100755
index 0000000..a55ea12
--- /dev/null
+++ b/CrespoParts/res/drawable/red_tuning_preview.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle">
+ <gradient
+ android:angle="0"
+ android:startColor="#000000"
+ android:endColor="#FF0000" />
+</shape> \ No newline at end of file
diff --git a/CrespoParts/res/layout/idle_stats_dialog.xml b/CrespoParts/res/layout/idle_stats_dialog.xml
new file mode 100644
index 0000000..279bb19
--- /dev/null
+++ b/CrespoParts/res/layout/idle_stats_dialog.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="utf-8"?>
+<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:stretchColumns="1,2,3"
+ android:padding="3dip">
+
+ <TableRow >
+
+ <TextView
+ android:layout_column="1"
+ android:text="@string/label_state" />
+
+ <TextView
+ android:layout_column="2"
+ android:gravity="right"
+ android:text="@string/label_time" />
+
+ <TextView
+ android:layout_column="3"
+ android:gravity="right"
+ android:text="@string/label_average" />
+ </TableRow>
+
+ <View
+ android:layout_height="1dip"
+ android:layout_marginBottom="3dip"
+ android:background="#FF909090" />
+
+ <TableRow >
+
+ <TextView
+ android:layout_column="1"
+ android:text="@string/label_idle1" />
+
+ <TextView
+ android:layout_column="2"
+ android:gravity="right"
+ android:id="@+id/time1"
+ android:text="@+id/time1" />
+
+ <TextView
+ android:layout_column="3"
+ android:gravity="right"
+ android:id="@+id/avg1"
+ android:text="@+id/avg1" />
+ </TableRow>
+
+ <TableRow >
+
+ <TextView
+ android:layout_column="1"
+ android:text="@string/label_idle2" />
+
+ <TextView
+ android:layout_column="2"
+ android:gravity="right"
+ android:id="@+id/time2"
+ android:text="@+id/time2" />
+
+ <TextView
+ android:layout_column="3"
+ android:gravity="right"
+ android:id="@+id/avg2"
+ android:text="@+id/avg2" />
+ </TableRow>
+
+ <TableRow >
+
+ <TextView
+ android:layout_column="1"
+ android:text="@string/label_idle3" />
+
+ <TextView
+ android:layout_column="2"
+ android:gravity="right"
+ android:id="@+id/time3"
+ android:text="@+id/time3" />
+
+ <TextView
+ android:layout_column="3"
+ android:gravity="right"
+ android:id="@+id/avg3"
+ android:text="@+id/avg3" />
+ </TableRow>
+
+</TableLayout>
diff --git a/CrespoParts/res/layout/preference_colorgamma_presets.xml b/CrespoParts/res/layout/preference_colorgamma_presets.xml
new file mode 100755
index 0000000..bd50287
--- /dev/null
+++ b/CrespoParts/res/layout/preference_colorgamma_presets.xml
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:gravity="center_horizontal"
+ android:paddingBottom="20dip">
+
+ <ImageView
+ android:id="@+id/imageView0"
+ android:layout_width="match_parent"
+ android:layout_height="200dp"
+ android:paddingLeft="20dip"
+ android:paddingRight="20dip"
+ android:paddingTop="5dip"
+ android:src="@drawable/color_tuning_preview" />
+
+ <ImageView
+ android:id="@+id/imageView1"
+ android:layout_width="match_parent"
+ android:layout_height="50dp"
+ android:paddingLeft="20dip"
+ android:paddingRight="20dip"
+ android:paddingTop="5dip"
+ android:src="@drawable/red_tuning_preview" />
+
+ <ImageView
+ android:id="@+id/imageView2"
+ android:layout_width="match_parent"
+ android:layout_height="50dp"
+ android:layout_below="@+id/imageView1"
+ android:paddingLeft="20dip"
+ android:paddingRight="20dip"
+ android:paddingTop="5dip"
+ android:src="@drawable/green_tuning_preview" />
+
+ <ImageView
+ android:id="@+id/imageView3"
+ android:layout_width="match_parent"
+ android:layout_height="50dp"
+ android:layout_below="@+id/imageView2"
+ android:paddingLeft="20dip"
+ android:paddingRight="20dip"
+ android:paddingTop="5dip"
+ android:src="@drawable/blue_tuning_preview" />
+
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@+id/imageView0"
+ android:orientation="vertical" >
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="1" >
+
+ <Button
+ android:id="@+id/btnPreset1"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/preset1_default_title" android:textSize="10dp" android:width="100dp"/>
+
+ <Button
+ android:id="@+id/btnPreset2"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/preset2_default_title" android:textSize="10dp" android:width="100dp"/>
+
+ <Button
+ android:id="@+id/btnPreset3"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/preset3_default_title" android:textSize="10dp" android:width="100dp"/>
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" >
+
+ <Button
+ android:id="@+id/btnPreset4"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/preset4_default_title" android:textSize="10dp" android:width="100dp"/>
+
+ <Button
+ android:id="@+id/btnPreset5"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/preset5_default_title" android:textSize="10dp" android:width="100dp"/>
+
+ <Button
+ android:id="@+id/btnPreset6"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/preset6_default_title" android:textSize="10dp" android:width="100dp"/>
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="320dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1" >
+
+ <TextView
+ android:id="@+id/textView1"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/credits_presets" android:textSize="12dp"/>
+
+ </LinearLayout>
+ </LinearLayout>
+
+ </RelativeLayout>
+
+</ScrollView>
diff --git a/CrespoParts/res/layout/preference_dialog_color_tuning.xml b/CrespoParts/res/layout/preference_dialog_color_tuning.xml
new file mode 100644
index 0000000..068f88c
--- /dev/null
+++ b/CrespoParts/res/layout/preference_dialog_color_tuning.xml
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:gravity="center_horizontal"
+ android:paddingBottom="20dip">
+
+ <TextView android:id="@+id/color_red_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/color_red_title"
+ android:paddingTop="10dip"
+ android:paddingLeft="20dip"
+ android:paddingRight="20dip" />
+ <TextView android:id="@+id/color_red_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:paddingTop="10dip"
+ android:paddingLeft="20dip"
+ android:paddingRight="20dip" />
+ <SeekBar android:id="@+id/color_red_seekbar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/color_red_text"
+ android:paddingTop="2dip"
+ android:paddingLeft="20dip"
+ android:paddingRight="20dip" />
+
+ <TextView android:id="@+id/color_green_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/color_red_seekbar"
+ android:text="@string/color_green_title"
+ android:paddingTop="10dip"
+ android:paddingLeft="20dip"
+ android:paddingRight="20dip" />
+ <TextView android:id="@+id/color_green_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/color_red_seekbar"
+ android:layout_alignParentRight="true"
+ android:paddingTop="10dip"
+ android:paddingLeft="20dip"
+ android:paddingRight="20dip" />
+ <SeekBar android:id="@+id/color_green_seekbar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/color_green_text"
+ android:paddingTop="2dip"
+ android:paddingLeft="20dip"
+ android:paddingRight="20dip" />
+
+ <TextView android:id="@+id/color_blue_text"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/color_green_seekbar"
+ android:text="@string/color_blue_title"
+ android:paddingTop="10dip"
+ android:paddingLeft="20dip"
+ android:paddingRight="20dip" />
+ <TextView android:id="@+id/color_blue_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/color_green_seekbar"
+ android:layout_alignParentRight="true"
+ android:paddingTop="10dip"
+ android:paddingLeft="20dip"
+ android:paddingRight="20dip" />
+ <SeekBar android:id="@+id/color_blue_seekbar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/color_blue_text"
+ android:paddingTop="2dip"
+ android:paddingLeft="20dip"
+ android:paddingRight="20dip" />
+
+ <ImageView android:id="@+id/black_scale_picture_color"
+ android:src="@drawable/color_tuning_preview"
+ android:layout_width="match_parent"
+ android:layout_height="40dip"
+ android:layout_below="@id/color_blue_seekbar"
+ android:paddingTop="20dip"
+ android:paddingLeft="20dip"
+ android:paddingRight="20dip" />
+
+ <LinearLayout
+ android:id="@+id/linearLayout1"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@+id/black_scale_picture_color" >
+
+ <Button
+ android:id="@+id/btnColorDefault"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/color_default_title" />
+
+ <Button
+ android:id="@+id/btnColorCM"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/color_CM_title" />
+
+ <Button
+ android:id="@+id/btnColorDark"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/color_dark_title" />
+
+ </LinearLayout>
+
+ </RelativeLayout>
+</ScrollView>
diff --git a/CrespoParts/res/layout/preference_dialog_gamma_tuning.xml b/CrespoParts/res/layout/preference_dialog_gamma_tuning.xml
new file mode 100644
index 0000000..110dc32
--- /dev/null
+++ b/CrespoParts/res/layout/preference_dialog_gamma_tuning.xml
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:gravity="center_horizontal"
+ android:paddingBottom="20dip">
+
+ <TextView android:id="@+id/gamma_red_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/color_red_title"
+ android:paddingTop="10dip"
+ android:paddingLeft="20dip"
+ android:paddingRight="20dip" />
+ <TextView android:id="@+id/gamma_red_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:paddingTop="10dip"
+ android:paddingLeft="20dip"
+ android:paddingRight="20dip" />
+ <SeekBar android:id="@+id/gamma_red_seekbar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/gamma_red_text"
+ android:paddingTop="2dip"
+ android:paddingLeft="20dip"
+ android:paddingRight="20dip" />
+
+ <TextView android:id="@+id/gamma_green_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/gamma_red_seekbar"
+ android:text="@string/color_green_title"
+ android:paddingTop="10dip"
+ android:paddingLeft="20dip"
+ android:paddingRight="20dip" />
+ <TextView android:id="@+id/gamma_green_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/gamma_red_seekbar"
+ android:layout_alignParentRight="true"
+ android:paddingTop="10dip"
+ android:paddingLeft="20dip"
+ android:paddingRight="20dip" />
+ <SeekBar android:id="@+id/gamma_green_seekbar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/gamma_green_text"
+ android:paddingTop="2dip"
+ android:paddingLeft="20dip"
+ android:paddingRight="20dip" />
+
+ <TextView android:id="@+id/gamma_blue_text"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/gamma_green_seekbar"
+ android:text="@string/color_blue_title"
+ android:paddingTop="10dip"
+ android:paddingLeft="20dip"
+ android:paddingRight="20dip" />
+ <TextView android:id="@+id/gamma_blue_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/gamma_green_seekbar"
+ android:layout_alignParentRight="true"
+ android:paddingTop="10dip"
+ android:paddingLeft="20dip"
+ android:paddingRight="20dip" />
+ <SeekBar android:id="@+id/gamma_blue_seekbar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/gamma_blue_text"
+ android:paddingTop="2dip"
+ android:paddingLeft="20dip"
+ android:paddingRight="20dip" />
+
+ <ImageView android:id="@+id/black_scale_picture"
+ android:src="@drawable/color_tuning_preview"
+ android:layout_width="match_parent"
+ android:layout_height="40dip"
+ android:layout_below="@id/gamma_blue_seekbar"
+ android:paddingTop="20dip"
+ android:paddingLeft="20dip"
+ android:paddingRight="20dip" />
+
+ <LinearLayout
+ android:id="@+id/linearLayout1"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@+id/black_scale_picture" >
+
+ <Button
+ android:id="@+id/btnGammaDefault"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/gamma_default_title" />
+
+ <Button
+ android:id="@+id/btnGammaCM"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/gamma_CM_title" />
+
+ <Button
+ android:id="@+id/btnGammaBright"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/gamma_bright_title" />
+
+ </LinearLayout>
+
+ </RelativeLayout>
+</ScrollView>
diff --git a/CrespoParts/res/layout/top.xml b/CrespoParts/res/layout/top.xml
new file mode 100755
index 0000000..744b568
--- /dev/null
+++ b/CrespoParts/res/layout/top.xml
@@ -0,0 +1,5 @@
+<android.support.v4.view.ViewPager xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/viewPager"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+
diff --git a/CrespoParts/res/values-da/strings.xml b/CrespoParts/res/values-da/strings.xml
new file mode 100644
index 0000000..116377b
--- /dev/null
+++ b/CrespoParts/res/values-da/strings.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="app_name">Nexus S Indstillinger</string>
+
+ <string name="category_screen_title">WM8994 Indstillinger ( voodoo )</string>
+ <string name="color_tuning_title_head">Farve Justering</string>
+ <string name="color_tuning_summary_head">Juster skærm farve</string>
+ <string name="color_red_title">Rød</string>
+ <string name="color_green_title">Grøn</string>
+ <string name="color_blue_title">Blå</string>
+
+ <!-- WM8994 Control Settings -->
+ <string name="general_sound_title">Lyd</string>
+ <!-- Categories -->
+ <string name="category_wm8994_internal_speaker">Intern Højtaler Indstillinger</string>
+ <string name="category_wm8994_signal_processing">Signal Bearbejdning</string>
+ <string name="category_wm8994_headphone_amp">Høretelefons Forstærker</string>
+ <string name="category_wm8994_codec_optimization">Codec Optimering</string>
+ <string name="category_wm8994_dac_config">Digital/Analog Konverterings Indstillinger</string>
+ <string name="category_wm8994_analog_path">Analog Linie Konfiguration</string>
+ <string name="category_wm8994_mic_settings">Microfon Indstillinger</string>
+ <!-- Titles/Summaries -->
+ <string name="wm8994_settings_title_head">Lyd Instillinger</string>
+ <string name="wm8994_settings_title_subhead">Lyd Indstillinger</string>
+ <string name="wm8994_settings_summary_head">Avanceret kontrol af WM8994 lyd bearbejdnings hardware</string>
+ <string name="pref_wm8994_control_enable_title">Aktiver WM8994 Kontrol</string>
+ <string name="pref_wm8994_control_enable_summary">Aktiver avanceret kontrol af WM8994 bearbejdnings hardware</string>
+ <string name="pref_wm8994_speaker_tuning_title">Juster højtaler til musik</string>
+ <string name="pref_wm8994_speaker_tuning_summary">Rekonfigurer hardware EQ for mere bas og balanceret lyd</string>
+ <string name="pref_wm8994_mono_downmix_title">Mono downmix</string>
+ <string name="pref_wm8994_mono_downmix_summary">Downmix stereo lyd til mono (for stereo outputs, så som høretelefoner)</string>
+ <string name="pref_wm8994_stereo_expansion_title">Stereo ekspansion</string>
+ <string name="pref_wm8994_stereo_expansion_summary">"Udvid" stereo lyd via digital signal bearbejdning</string>
+ <string name="pref_wm8994_dac_direct_title">D/AC direkte</string>
+ <string name="pref_wm8994_dac_direct_summary">Tilgå digital/analog konverter direkte, udenom channel mixer. Giver renere lyd (sænker signal-to-noise forholdet)</string>
+ <string name="pref_wm8994_dac_osr128_title">Hi-fi afspilning</string>
+ <string name="pref_wm8994_dac_osr128_summary">Digital-til-analog konverter 128x oversampling -- renere lyd når der afspilles musik</string>
+ <string name="pref_wm8994_adc_osr128_title">Hi-fi optagelse</string>
+ <string name="pref_wm8994_adc_osr128_summary">Analog-to-digital konverter 128x oversampling -- øger kvaliteten af optagelser</string>
+ <string name="pref_wm8994_fll_tuning_title">Tuned lyd frekvens</string>
+ <string name="pref_wm8994_fll_tuning_summary">Brug tuned WM8994 lyd frekvens kilde -- øger kvaliteten af lyd</string>
+
+ <string name="category_touchkey_title">Touch Knapper</string>
+ <string name="backlight_timeout_title_head">Baggrundslys Timeout</string>
+ <string name="backlight_timeout_summary_head">Indstil forsinkelsen for hvornår touch knappernes lys skal slukkes</string>
+ <string name="blink_timeout_title_head">Blink Timeout</string>
+ <string name="blink_timeout_summary_head">Indstil forsinkelsen for hvornår touch knappernes blink lys automatisk skal slukkes efter en notifikation</string>
+
+</resources>
diff --git a/CrespoParts/res/values-de/arrays.xml b/CrespoParts/res/values-de/arrays.xml
new file mode 100644
index 0000000..1829723
--- /dev/null
+++ b/CrespoParts/res/values-de/arrays.xml
@@ -0,0 +1,28 @@
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string-array name="backlight_timeout_entries">
+ <item>2 Sekunden</item>
+ <item>Standard (5 Sekunden)</item>
+ <item>10 Sekunden</item>
+ <item>15 Sekunden</item>
+ <item>20 Sekunden</item>
+ <item>30 Sekunden</item>
+ <item>Nie</item>
+ </string-array>
+
+ <string-array name="blink_timeout_entries">
+ <item>1 Minute</item>
+ <item>2 Minuten</item>
+ <item>Standard (5 Minuten)</item>
+ <item>10 Minuten</item>
+ <item>15 Minuten</item>
+ <item>30 Minuten</item>
+ <item>Nie</item>
+ </string-array>
+
+ <string-array name="hspa_entries">
+ <item>Nur UMTS</item>
+ <item>Nur HSDPA</item>
+ <item>HSDPA + HSUPA</item>
+ </string-array>
+
+</resources>
diff --git a/CrespoParts/res/values-de/strings.xml b/CrespoParts/res/values-de/strings.xml
new file mode 100644
index 0000000..77189bb
--- /dev/null
+++ b/CrespoParts/res/values-de/strings.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="app_name">Nexus S Einstellungen</string>
+
+ <!-- Page Headers -->
+ <string name="general_title">ALLGEMEIN</string>
+ <string name="display_title">BILDSCHIRM</string>
+ <string name="sound_title">TON</string>
+
+ <string name="category_cpu_title">Prozessor</string>
+ <string name="cpu_deepidle_title_head">Deep Idle</string>
+ <string name="cpu_deepidle_summary_head">Aktiviert Deep Idle (Tiefschlaf), um die Akku Laufzeit zu erhöhen.</string>
+ <string name="category_screen_title">WM8994 Einstellungen (voodoo)</string>
+ <string name="color_tuning_title_head">Farbmultiplikator</string>
+ <string name="color_tuning_summary_head">Farbmultiplikator einstellen</string>
+ <string name="gamma_tuning_title_head">Gammakorrektur</string>
+ <string name="gamma_tuning_summary_head">Gammawert einstellen</string>
+ <string name="color_hack_presets_title_head">Farb-Voreinstellungen</string>
+ <string name="color_hack_presets_summary_head">Voreinstellungen für Gammakorrektur und Farbmultiplikator</string>
+ <string name="color_red_title">Rot</string>
+ <string name="color_green_title">Grün</string>
+ <string name="color_blue_title">Blau</string>
+ <string name="gamma_default_title">Standard</string>
+ <string name="gamma_CM_title">CM</string>
+ <string name="gamma_bright_title">Hell</string>
+ <string name="color_default_title">Standard</string>
+ <string name="color_CM_title">CM</string>
+ <string name="color_dark_title">Dunkel</string>
+
+ <string name="preset1_default_title">Standard</string>
+ <string name="preset2_default_title">Natürlich</string>
+ <string name="preset3_default_title">Dunkles Blau</string>
+ <string name="preset4_default_title">Warm</string>
+ <string name="preset5_default_title">Kalt</string>
+ <string name="preset6_default_title">X-Processing</string>
+ <string name="credits_presets">Dank an: ale.landra91 cpaixao provolinoo</string>
+
+
+ <string name="category_touchkey_title">Touch Keys</string>
+ <string name="touchkey_notification_title_head">Hintergrundbeleuchtung</string>
+ <string name="touchkey_notification_summary_head">Die Hintergrundbeleuchtung wird nach erhalten einer Nachricht aktiviert.</string>
+
+ <string name="category_radio_title">Mobilfunk</string>
+ <string name="hspa_title_head">HSPA</string>
+ <string name="hspa_summary_head">HSDPA/HSUPA aktivieren</string>
+
+ <string name="label_deepidle_stats">Deep Idle Statistik</string>
+ <string name="label_state">Status</string>
+ <string name="label_time">Zeit(ms)</string>
+ <string name="label_average">Mittel(ms)</string>
+ <string name="label_reset">Zurücksetzen</string>
+ <string name="label_close">Schließen</string>
+ <string name="label_idle1">Normal Idle</string>
+ <string name="label_idle2">Deep Idle (TOP=EIN)</string>
+ <string name="label_idle3">Deep Idle (TOP=AUS)</string>
+
+</resources>
diff --git a/CrespoParts/res/values-es/arrays.xml b/CrespoParts/res/values-es/arrays.xml
new file mode 100644
index 0000000..8f0d39d
--- /dev/null
+++ b/CrespoParts/res/values-es/arrays.xml
@@ -0,0 +1,22 @@
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string-array name="backlight_timeout_entries">
+ <item>2 segundos</item>
+ <item>Por defecto (5 segundos)</item>
+ <item>10 segundos</item>
+ <item>15 segundos</item>
+ <item>20 segundos</item>
+ <item>30 segundos</item>
+ <item>Nunca</item>
+ </string-array>
+
+ <string-array name="blink_timeout_entries">
+ <item>1 minuto</item>
+ <item>2 minutos</item>
+ <item>Por defecto (5 minutos)</item>
+ <item>10 minutos</item>
+ <item>15 minutos</item>
+ <item>30 minutos</item>
+ <item>Nunca</item>
+ </string-array>
+
+</resources>
diff --git a/CrespoParts/res/values-es/strings.xml b/CrespoParts/res/values-es/strings.xml
new file mode 100644
index 0000000..0ba86fd
--- /dev/null
+++ b/CrespoParts/res/values-es/strings.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="app_name">Parámetros Nexus S</string>
+
+ <string name="category_screen_title">Parámetros WM8994 ( voodoo )</string>
+ <string name="color_tuning_title_head">Modificar Color</string>
+ <string name="color_tuning_summary_head">Calibrar color pantalla</string>
+ <string name="color_red_title">Rojo</string>
+ <string name="color_green_title">Verde</string>
+ <string name="color_blue_title">Azul</string>
+
+ <!-- WM8994 Control Settings -->
+ <string name="general_sound_title">Sonido</string>
+ <!-- Categories -->
+ <string name="category_wm8994_internal_speaker">Configurar altavoz interno</string>
+ <string name="category_wm8994_signal_processing">Procesado de señal</string>
+ <string name="category_wm8994_headphone_amp">Configurar manoslibres</string>
+ <string name="category_wm8994_codec_optimization">Optimización codec</string>
+ <string name="category_wm8994_dac_config">Parámetros Digital/Analogico</string>
+ <string name="category_wm8994_analog_path">Parámetros camino analógico</string>
+ <string name="category_wm8994_mic_settings">Parámetros del micro</string>
+ <!-- Titles/Summaries -->
+ <string name="wm8994_settings_title_head">Parámetros del sonido</string>
+ <string name="wm8994_settings_title_subhead">Parámetros del sonido</string>
+ <string name="wm8994_settings_summary_head">Control avanzado del procesador de sonido del WM8994</string>
+ <string name="pref_wm8994_control_enable_title">Habilitar control WM8994</string>
+ <string name="pref_wm8994_control_enable_summary">Habilitar el control de procesador de sonido del WM8994</string>
+ <string name="pref_wm8994_speaker_tuning_title">Ajustar altavoz para música</string>
+ <string name="pref_wm8994_speaker_tuning_summary">Reconfigurar el EQ para tener más bajos y sonido balanceado</string>
+ <string name="pref_wm8994_mono_downmix_title">Mezclador a mono</string>
+ <string name="pref_wm8994_mono_downmix_summary">Degrada estereo para salir en mono (para salidas estereo, como los cascos)</string>
+ <string name="pref_wm8994_stereo_expansion_title">Expansión estereo</string>
+ <string name="pref_wm8994_stereo_expansion_summary">"Expande" sonido estereo via procesado digital de señal</string>
+ <string name="pref_wm8994_dac_direct_title">D/AC directo</string>
+ <string name="pref_wm8994_dac_direct_summary">Acceso directo al convertidor digital/analogico, inhibiendo el mezclador de canales. Produce mayor señal limpia</string>
+ <string name="pref_wm8994_dac_osr128_title">Reproducción Hi-fi</string>
+ <string name="pref_wm8994_dac_osr128_summary">Convertidor Digital-a-analogico 128x sobre muestreada -- sonido más claro al reproducir música</string>
+ <string name="pref_wm8994_adc_osr128_title">Grabación Hi-fi</string>
+ <string name="pref_wm8994_adc_osr128_summary">Convertidor Digital-a-analogico 128x sobre muestreada -- sonido más claro al grabar</string>
+ <string name="pref_wm8994_fll_tuning_title">Reloj audio mejorado</string>
+ <string name="pref_wm8994_fll_tuning_summary">Usar el reloj del sonido del WM8994 -- mejora la calidad del sonido</string>
+
+ <string name="category_touchkey_title">Teclas</string>
+ <string name="backlight_timeout_title_head">Tiempo de luz teclado</string>
+ <string name="backlight_timeout_summary_head">Adjusta el tiempo al que se desactiva la luz de las teclas con la pantalla encendida</string>
+ <string name="blink_timeout_title_head">Tiempo de parpadeo</string>
+ <string name="blink_timeout_summary_head">Adjusta el tiempo al que deja de parpadear el teclado después de que llegue una notificación</string>
+
+</resources>
diff --git a/CrespoParts/res/values-fr/strings.xml b/CrespoParts/res/values-fr/strings.xml
new file mode 100644
index 0000000..cd8df9d
--- /dev/null
+++ b/CrespoParts/res/values-fr/strings.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="app_name">Paramètres Nexus S</string>
+
+ <string name="category_screen_title">Paramètres WM8994 ( voodoo )</string>
+ <string name="color_tuning_title_head">Réglages Couleurs</string>
+ <string name="color_tuning_summary_head">Calibrage des couleurs de l\'écran</string>
+ <string name="color_red_title">Rouge</string>
+ <string name="color_green_title">Vert</string>
+ <string name="color_blue_title">Bleu</string>
+
+ <!-- WM8994 Control Settings -->
+ <string name="general_sound_title">Son</string>
+ <!-- Categories -->
+ <string name="category_wm8994_internal_speaker">Configuration Haut-Parleur Interne</string>
+ <string name="category_wm8994_signal_processing">Traitement du Signal</string>
+ <string name="category_wm8994_headphone_amp">Amplificateur Ecouteurs</string>
+ <string name="category_wm8994_codec_optimization">Optimisation du Codec</string>
+ <string name="category_wm8994_dac_config">Configuration du Convertisseur Analogique Numérique</string>
+ <string name="category_wm8994_analog_path">Configuration du Chemin Analogique</string>
+ <string name="category_wm8994_mic_settings">Configuration du Micro</string>
+ <!-- Titles/Summaries -->
+ <string name="wm8994_settings_title_head">Paramètres du Son</string>
+ <string name="wm8994_settings_title_subhead">Paamètres du Son</string>
+ <string name="wm8994_settings_summary_head">Contrôle Avancé du Matériel de Traitement du Son WM8994</string>
+ <string name="pref_wm8994_control_enable_title">Activer le Contrôle WM8994</string>
+ <string name="pref_wm8994_control_enable_summary">Activer les Contrôles Avancés du Matériel de Traitement du Son WM8994</string>
+ <string name="pref_wm8994_speaker_tuning_title">Régler le Haut-Parleur pour la Musique</string>
+ <string name="pref_wm8994_speaker_tuning_summary">Reconfigurer le matériel EQ pour un son plus grave et équilibré</string>
+ <string name="pref_wm8994_mono_downmix_title">Mélangeur Mono</string>
+ <string name="pref_wm8994_mono_downmix_summary">Mixer le signal stéréo en mono (vers une sortie stéréo, comme des écouteurs)</string>
+ <string name="pref_wm8994_stereo_expansion_title">Expansion Stéréo</string>
+ <string name="pref_wm8994_stereo_expansion_summary">"Expand" le signal stéréo via le processeur de traitement du signal numérique</string>
+ <string name="pref_wm8994_dac_direct_title">D/AC direct</string>
+ <string name="pref_wm8994_dac_direct_summary">Accéder au convertisseur numérique analogique directement, en court-circuitant le mélangeur de canaux. Produit un son plus propre (signal sur bruit meilleur)</string>
+ <string name="pref_wm8994_dac_osr128_title">Reproduction HiFi</string>
+ <string name="pref_wm8994_dac_osr128_summary">Suréchantillonnage 128x du convertisseur analogique numérique -- son plus propre pour la reproduction de musique</string>
+ <string name="pref_wm8994_adc_osr128_title">Enregistrement HiFi</string>
+ <string name="pref_wm8994_adc_osr128_summary">Suréchantillonnage 128x du convertisseur analogique numérique -- améliore la qualité des enregistrements</string>
+ <string name="pref_wm8994_fll_tuning_title">Horloge audio précise</string>
+ <string name="pref_wm8994_fll_tuning_summary">Utiliser une source horloge audio précise -- améliore la qualité du son</string>
+
+ <string name="category_touchkey_title">Touches tactiles</string>
+ <string name="backlight_timeout_title_head">Délai rétroéclairage</string>
+ <string name="backlight_timeout_summary_head">Régler le délai avant l\'extinction du rétroéclairage des touches tactiles</string>
+ <string name="blink_timeout_title_head">Délai clignotement</string>
+ <string name="blink_timeout_summary_head">Régler le délai avant l\'arrêt du clignotement du rétroéclairage des touches tactiles après une notification</string>
+
+</resources>
+
diff --git a/CrespoParts/res/values-it/arrays.xml b/CrespoParts/res/values-it/arrays.xml
new file mode 100644
index 0000000..f377f3e
--- /dev/null
+++ b/CrespoParts/res/values-it/arrays.xml
@@ -0,0 +1,28 @@
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string-array name="backlight_timeout_entries">
+ <item>2 secondi</item>
+ <item>Default (5 secondi)</item>
+ <item>10 secondi</item>
+ <item>15 secondi</item>
+ <item>20 secondi</item>
+ <item>30 secondi</item>
+ <item>Mai</item>
+ </string-array>
+
+ <string-array name="blink_timeout_entries">
+ <item>1 minuto</item>
+ <item>2 minuti</item>
+ <item>Default (5 minuti)</item>
+ <item>10 minuti</item>
+ <item>15 minuti</item>
+ <item>30 minuti</item>
+ <item>Mai</item>
+ </string-array>
+
+ <string-array name="hspa_entries">
+ <item>Solo UMTS</item>
+ <item>Solo HSDPA</item>
+ <item>HSDPA + HSUPA</item>
+ </string-array>
+
+</resources>
diff --git a/CrespoParts/res/values-it/strings.xml b/CrespoParts/res/values-it/strings.xml
new file mode 100644
index 0000000..277a3f0
--- /dev/null
+++ b/CrespoParts/res/values-it/strings.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="app_name">Impostazioni Nexus S</string>
+ <string name="general_title">GENERALE</string>
+ <string name="display_title">DISPLAY</string>
+ <string name="sound_title">AUDIO</string>
+ <string name="category_cpu_title">CPU</string>
+ <string name="cpu_deepidle_title_head">Deep Idle</string>
+ <string name="cpu_deepidle_summary_head">Abilita deep idle.</string>
+ <string name="category_screen_title">Impostazioni WM8994 ( voodoo )</string>
+ <string name="color_tuning_title_head">Regolazione Moltiplicatori Colore</string>
+ <string name="color_tuning_summary_head">Calibrazione moltiplicatori colori</string>
+ <string name="gamma_tuning_title_head">Regolazione Colore Gamma</string>
+ <string name="gamma_tuning_summary_head">Calibrazione correzione colore gamma</string>
+ <string name="color_hack_presets_title_head">Set colori alternativo</string>
+ <string name="color_hack_presets_summary_head">Impostazioni gamma e moltiplicatori testati da alcuni utenti</string>
+ <string name="color_red_title">Rosso</string>
+ <string name="color_green_title">Verde</string>
+ <string name="color_blue_title">Blu</string>
+ <string name="gamma_default_title">Default</string>
+ <string name="gamma_CM_title">Impost. CM</string>
+ <string name="gamma_bright_title">Impost. luminosità</string>
+ <string name="color_default_title">Default</string>
+ <string name="color_CM_title">Impost. CM</string>
+ <string name="color_dark_title">Impost. Scuro</string>
+ <string name="preset1_default_title">Default.</string>
+ <string name="preset2_default_title">Naturali</string>
+ <string name="preset3_default_title">Blu scuro</string>
+ <string name="preset4_default_title">Caldo</string>
+ <string name="preset5_default_title">Freddo scuro</string>
+ <string name="preset6_default_title">Cross Proc.</string>
+ <string name="credits_presets">Credits: ale.landra91 cpaixao provolinoo</string>
+ <string name="category_touchkey_title">TASTI A SFIORAMENTO</string>
+ <string name="touchkey_notification_title_head">BLN</string>
+ <string name="touchkey_notification_summary_head">La retroilluminazione dei tasti a sfioramento sarà attivata quando ci sarà una notifica.</string>
+ <string name="category_radio_title">Radio</string>
+ <string name="hspa_title_head">HSPA</string>
+ <string name="hspa_summary_head">Abilita HSDPA/HSUPA</string>
+ <string name="label_deepidle_stats">Stati inattività</string>
+ <string name="label_state">Stato</string>
+ <string name="label_time">Tempo (ms)</string>
+ <string name="label_average">Media (ms)</string>
+ <string name="label_reset">Resetta</string>
+ <string name="label_close">Chiudi</string>
+ <string name="label_idle1">Idle</string>
+ <string name="label_idle2">Deep Idle (TOP=ON)</string>
+ <string name="label_idle3">Deep Idle (TOP=OFF)</string>
+</resources>
diff --git a/CrespoParts/res/values-ja/arrays.xml b/CrespoParts/res/values-ja/arrays.xml
new file mode 100644
index 0000000..7b6f3e3
--- /dev/null
+++ b/CrespoParts/res/values-ja/arrays.xml
@@ -0,0 +1,54 @@
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string-array name="backlight_timeout_entries">
+ <item>2 秒</item>
+ <item>デフォルト (5 秒)</item>
+ <item>10 秒</item>
+ <item>15 秒</item>
+ <item>20 秒</item>
+ <item>30 秒</item>
+ <item>させない</item>
+ </string-array>
+
+ <string-array name="backlight_timeout_entries_values" translatable="false">
+ <item>2</item>
+ <item>5</item>
+ <item>10</item>
+ <item>15</item>
+ <item>20</item>
+ <item>30</item>
+ <item>0</item>
+ </string-array>
+
+ <string-array name="blink_timeout_entries">
+ <item>1 分</item>
+ <item>2 分</item>
+ <item>デフォルト (5 分)</item>
+ <item>10 分</item>
+ <item>15 分</item>
+ <item>30 分</item>
+ <item>させない</item>
+ </string-array>
+
+ <string-array name="blink_timeout_entries_values" translatable="false">
+ <item>1</item>
+ <item>2</item>
+ <item>5</item>
+ <item>10</item>
+ <item>15</item>
+ <item>30</item>
+ <item>0</item>
+ </string-array>
+
+ <string-array name="hspa_entries">
+ <item>UMTS のみ</item>
+ <item>HSDPA のみ</item>
+ <item>HSDPA と HSUPA</item>
+ </string-array>
+
+ <string-array name="hspa_entries_values" translatable="false">
+ <item>21</item>
+ <item>22</item>
+ <item>23</item>
+ </string-array>
+
+</resources>
diff --git a/CrespoParts/res/values-ja/strings.xml b/CrespoParts/res/values-ja/strings.xml
new file mode 100644
index 0000000..9123ca9
--- /dev/null
+++ b/CrespoParts/res/values-ja/strings.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="app_name">Nexus S 設定</string>
+
+ <string name="category_screen_title">WM8994 設定 ( voodoo )</string>
+ <string name="color_tuning_title_head">色の調整</string>
+ <string name="color_tuning_summary_head">画面色の調整</string>
+ <string name="gamma_tuning_title_head">ガンマの調整</string>
+ <string name="gamma_tuning_summary_head">ガンマ補正の調整</string>
+ <string name="color_red_title">赤</string>
+ <string name="color_green_title">緑</string>
+ <string name="color_blue_title">青</string>
+
+ <!-- WM8994 Control Settings -->
+ <string name="general_sound_title">サウンド</string>
+ <!-- Categories -->
+ <string name="category_wm8994_internal_speaker">スピーカー設定</string>
+ <string name="category_wm8994_signal_processing">信号処理</string>
+ <string name="category_wm8994_headphone_amp">ヘッドフォンアンプ</string>
+ <string name="category_wm8994_codec_optimization">Codec最適化</string>
+ <string name="category_wm8994_dac_config">デジタル/アナログコンバータ設定</string>
+ <string name="category_wm8994_analog_path">アナログパス設定</string>
+ <string name="category_wm8994_mic_settings">マイク設定</string>
+ <!-- Titles/Summaries -->
+ <string name="wm8994_settings_title_head">サウンド設定</string>
+ <string name="wm8994_settings_title_subhead">サウンド設定</string>
+ <string name="wm8994_settings_summary_head">WM8994サウンドプロセッサの高度な制御</string>
+ <string name="pref_wm8994_control_enable_title">WM8994サウンドプロセッサの制御を有効にする</string>
+ <string name="pref_wm8994_control_enable_summary">WM8994サウンドプロセッサの高度な制御を有効にする</string>
+ <string name="pref_wm8994_speaker_tuning_title">音楽再生用のスピーカー調整</string>
+ <string name="pref_wm8994_speaker_tuning_summary">より豊かな低音とバランスの取れた音質にするためハードウェアEQを再設定する</string>
+ <string name="pref_wm8994_mono_downmix_title">モノダウンミックス</string>
+ <string name="pref_wm8994_mono_downmix_summary">ステレオサウンドをモノラルサウンドへダウンミックスする(ヘッドホンなどのステレオ出力用)</string>
+ <string name="pref_wm8994_stereo_expansion_title">ステレオ拡張モード</string>
+ <string name="pref_wm8994_stereo_expansion_summary">DSPを使用することによりステレオサウンドを拡張する</string>
+ <string name="pref_wm8994_dac_direct_title">D/AC ダイレクト</string>
+ <string name="pref_wm8994_dac_direct_summary">チャンネルのミキサーをバイパスし、直接デジタル/アナログコンバーターにアクセスする。よりクリアな音質を生成(S/N比)</string>
+ <string name="pref_wm8994_dac_osr128_title">Hi-fi再生</string>
+ <string name="pref_wm8994_dac_osr128_summary">デジタル - アナログ コンバーター 128x オーバーサンプリング -- よりクリアな音で音楽を再生する</string>
+ <string name="pref_wm8994_adc_osr128_title">Hi-fi録音</string>
+ <string name="pref_wm8994_adc_osr128_summary">アナログ - デジタル コンバーター 128x オーバーサンプリング -- 録音品質を向上させる</string>
+ <string name="pref_wm8994_fll_tuning_title">チューニング済みのaudio clock</string>
+ <string name="pref_wm8994_fll_tuning_summary">チューニング済みのWM8994オーディオクロックソースを使用 -- 音質を向上させる</string>
+
+ <string name="category_touchkey_title">タッチキー</string>
+ <string name="backlight_timeout_title_head">バックライトのタイムアウト</string>
+ <string name="backlight_timeout_summary_head">タッチキーのバックライトが自動的にオフになるまでの遅延を調整する</string>
+ <string name="blink_timeout_title_head">点滅のタイムアウト</string>
+ <string name="blink_timeout_summary_head">タッチキーの点滅のバックライトが通知した後、自動的に消えるまでの遅延時間を調整する</string>
+
+ <string name="category_radio_title">ラジオ</string>
+ <string name="hspa_title_head">HSPA</string>
+ <string name="hspa_summary_head">HSDPA/HSUPAを有効にする</string>
+
+</resources>
diff --git a/CrespoParts/res/values-ko/arrays.xml b/CrespoParts/res/values-ko/arrays.xml
new file mode 100644
index 0000000..d28384e
--- /dev/null
+++ b/CrespoParts/res/values-ko/arrays.xml
@@ -0,0 +1,28 @@
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string-array name="backlight_timeout_entries">
+ <item>2 초</item>
+ <item>기본값 (5 초)</item>
+ <item>10 초</item>
+ <item>15 초</item>
+ <item>20 초</item>
+ <item>30 초</item>
+ <item>안함</item>
+ </string-array>
+
+ <string-array name="blink_timeout_entries">
+ <item>1 분</item>
+ <item>2 분</item>
+ <item>기본값(5 분)</item>
+ <item>10 분</item>
+ <item>15 분</item>
+ <item>30 분</item>
+ <item>안함</item>
+ </string-array>
+
+ <string-array name="hspa_entries">
+ <item>UMTS 전용</item>
+ <item>HSDPA 전용</item>
+ <item>HSDPA + HSUPA</item>
+ </string-array>
+
+</resources>
diff --git a/CrespoParts/res/values-ko/strings.xml b/CrespoParts/res/values-ko/strings.xml
new file mode 100644
index 0000000..981c071
--- /dev/null
+++ b/CrespoParts/res/values-ko/strings.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="app_name">넥서스 S 설정</string>
+
+ <!-- Page Headers -->
+ <string name="general_title">일반</string>
+ <string name="display_title">화면</string>
+ <string name="sound_title">소리</string>
+
+ <string name="category_cpu_title">CPU</string>
+ <string name="cpu_deepidle_title_head">Deep Idle</string>
+ <string name="cpu_deepidle_summary_head">Deep idle 활성화.</string>
+ <string name="category_screen_title">WM8994 설정 ( voodoo )</string>
+ <string name="color_tuning_title_head">색상 혼합 설정</string>
+ <string name="color_tuning_summary_head">화면 색상 배율을 조절합니다.</string>
+ <string name="gamma_tuning_title_head">색상 감마 조정</string>
+ <string name="gamma_tuning_summary_head">색상 감마를 조정합니다.</string>
+ <string name="color_hack_presets_title_head">색상 프리셋</string>
+ <string name="color_hack_presets_summary_head">일부 유저들이 만든 감마와 배율 프리셋입니다</string>
+ <string name="color_red_title">빨강</string>
+ <string name="color_green_title">녹색</string>
+ <string name="color_blue_title">파랑</string>
+ <string name="gamma_default_title">기본값</string>
+ <string name="gamma_CM_title">CM 설정</string>
+ <string name="gamma_bright_title">밝은 설정</string>
+ <string name="color_default_title">기본값</string>
+ <string name="color_CM_title">CM 설정</string>
+ <string name="color_dark_title">어두운 설정</string>
+
+ <string name="preset1_default_title">기본값</string>
+ <string name="preset2_default_title">자연스러운</string>
+ <string name="preset3_default_title">어두운 파랑</string>
+ <string name="preset4_default_title">따뜻한</string>
+ <string name="preset5_default_title">어둡고 차가운</string>
+ <string name="preset6_default_title">Cross Proc.</string>
+ <string name="credits_presets">제작: ale.landra91 cpaixao provolinoo</string>
+
+ <string name="category_touchkey_title">터치 키</string>
+ <string name="touchkey_notification_title_head">터치 키 백라이트 알림</string>
+ <string name="touchkey_notification_summary_head">알림이 있을 때 터치 키 백라이트가 켜집니다.</string>
+
+ <string name="category_radio_title">무선</string>
+ <string name="hspa_title_head">HSPA</string>
+ <string name="hspa_summary_head">HSDPA/HSUPA 활성화</string>
+
+ <string name="label_deepidle_stats">Idle 통계</string>
+ <string name="label_state">상태</string>
+ <string name="label_time">시간 (ms)</string>
+ <string name="label_average">평균 (ms)</string>
+ <string name="label_reset">초기화 </string>
+ <string name="label_close">닫기</string>
+ <string name="label_idle1">Idle</string>
+ <string name="label_idle2">Deep Idle (TOP=ON)</string>
+ <string name="label_idle3">Deep Idle (TOP=OFF)</string>
+</resources>
diff --git a/CrespoParts/res/values-nl/strings.xml b/CrespoParts/res/values-nl/strings.xml
new file mode 100644
index 0000000..14cc02c
--- /dev/null
+++ b/CrespoParts/res/values-nl/strings.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="app_name">Nexus S-instellingen</string>
+
+ <string name="category_screen_title">WM8994-instellingen ( voodoo )</string>
+ <string name="color_tuning_title_head">Kleuraanpassing</string>
+ <string name="color_tuning_summary_head">Kalibreer schermkleur</string>
+ <string name="color_red_title">Rood</string>
+ <string name="color_green_title">Groen</string>
+ <string name="color_blue_title">Blauw</string>
+
+ <!-- WM8994 Control Settings -->
+ <string name="general_sound_title">Geluid</string>
+ <!-- Categories -->
+ <string name="category_wm8994_internal_speaker">Interne luidspreker aanpassen</string>
+ <string name="category_wm8994_signal_processing">Signal Processing</string>
+ <string name="category_wm8994_headphone_amp">Koptelefoon Amplifier</string>
+ <string name="category_wm8994_codec_optimization">Codec Optimalisatie</string>
+ <string name="category_wm8994_dac_config">Digitaal/Analoog Converter-instellingen</string>
+ <string name="category_wm8994_analog_path">Analog Path aanpassen</string>
+ <string name="category_wm8994_mic_settings">Microfoon-instellingen</string>
+ <!-- Titles/Summaries -->
+ <string name="wm8994_settings_title_head">Geluidsinstellingen</string>
+ <string name="wm8994_settings_title_subhead">Geluidsinstellingen</string>
+ <string name="wm8994_settings_summary_head">Geavanceerde controle van de WM8994-geluidsprocessor hardware</string>
+ <string name="pref_wm8994_control_enable_title">Schakel WM8994-control in</string>
+ <string name="pref_wm8994_control_enable_summary">Schakel geavanceerde controle van de WM8994-geluidsprocessor hardware in</string>
+ <string name="pref_wm8994_speaker_tuning_title">Tune speaker for music</string>
+ <string name="pref_wm8994_speaker_tuning_summary">Reconfigures the hardware EQ voor een betere bass en gebalanceerd geluid</string>
+ <string name="pref_wm8994_mono_downmix_title">Mono downmix</string>
+ <string name="pref_wm8994_mono_downmix_summary">Downmix stereo sound to mono (for stereo outputs, such as headphones)</string>
+ <string name="pref_wm8994_stereo_expansion_title">Stereo-uitbreiding</string>
+ <string name="pref_wm8994_stereo_expansion_summary">"Expand" stereo sound via digital signal processing</string>
+ <string name="pref_wm8994_dac_direct_title">D/AC direct</string>
+ <string name="pref_wm8994_dac_direct_summary">Stuur de digitaal/analoog-converter rechtstreeks aan, bypassing the channel mixer. Zorgt voor helderder geluid (lower signal-to-noise ratio)</string>
+ <string name="pref_wm8994_dac_osr128_title">Hi-fi playback</string>
+ <string name="pref_wm8994_dac_osr128_summary">Digitaal-to-analoog-converter 128x oversampling -- cleaner sound when playing music</string>
+ <string name="pref_wm8994_adc_osr128_title">Hi-fi recording</string>
+ <string name="pref_wm8994_adc_osr128_summary">Analoog-to-digitaal-converter 128x oversampling -- increases quality of recordings</string>
+ <string name="pref_wm8994_fll_tuning_title">Tuned audio clock</string>
+ <string name="pref_wm8994_fll_tuning_summary">Use tuned WM8994 audio clock source -- verbetert de geluidskwaliteit</string>
+
+ <string name="category_touchkey_title">Touch Keys</string>
+ <string name="backlight_timeout_title_head">Backlight Timeout</string>
+ <string name="backlight_timeout_summary_head">Pas de vertraging aan voor het touch key-backlight uitgaat</string>
+ <string name="blink_timeout_title_head">Blink Timeout</string>
+ <string name="blink_timeout_summary_head">Pas de vertraging aan voor het knipperend touch key-backlight uitgaat na een notificatie</string>
+
+</resources>
diff --git a/CrespoParts/res/values-pt-rBR/arrays.xml b/CrespoParts/res/values-pt-rBR/arrays.xml
new file mode 100755
index 0000000..e7c3fe6
--- /dev/null
+++ b/CrespoParts/res/values-pt-rBR/arrays.xml
@@ -0,0 +1,27 @@
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string-array name="backlight_timeout_entries">
+ <item>2 segundos</item>
+ <item>Pré-definido (5 segundos)</item>
+ <item>10 segundos</item>
+ <item>15 segundos</item>
+ <item>20 segundos</item>
+ <item>30 segundos</item>
+ <item>Nunca</item>
+ </string-array>
+
+ <string-array name="blink_timeout_entries">
+ <item>1 minuto</item>
+ <item>2 minutos</item>
+ <item>Pré-definido (5 minutos)</item>
+ <item>10 minutos</item>
+ <item>15 minutos</item>
+ <item>30 minutos</item>
+ <item>Nunca</item>
+ </string-array>
+
+ <string-array name="hspa_entries">
+ <item>Apenas UMTS</item>
+ <item>Apenas HSDPA</item>
+ <item>HSDPA + HSUPA</item>
+ </string-array>
+</resources> \ No newline at end of file
diff --git a/CrespoParts/res/values-pt-rBR/strings.xml b/CrespoParts/res/values-pt-rBR/strings.xml
new file mode 100755
index 0000000..e69046b
--- /dev/null
+++ b/CrespoParts/res/values-pt-rBR/strings.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="app_name">Configurações Nexus S</string>
+ <string name="general_title">GERAL</string>
+ <string name="display_title">TELA</string>
+ <string name="sound_title">SOM</string>
+ <string name="category_cpu_title">CPU</string>
+ <string name="cpu_deepidle_title_head">Ociosidade Profunda</string>
+ <string name="cpu_deepidle_summary_head">Ativa ociosidade profunda.</string>
+ <string name="category_screen_title">Configurações WM8994 ( voodoo )</string>
+ <string name="color_tuning_title_head">Ajuste de Cor</string>
+ <string name="color_tuning_summary_head">Ajustar cor da tela</string>
+ <string name="gamma_tuning_title_head">Ajudar cor gama</string>
+ <string name="gamma_tuning_summary_head">Calibrar correção da cor gama</string>
+ <string name="color_hack_presets_title_head">Predefinições de cor</string>
+ <string name="color_hack_presets_summary_head">Predefinições para gama e multiplicadores testados por alguns usuários</string>
+ <string name="color_red_title">Vermelho</string>
+ <string name="color_green_title">Verde</string>
+ <string name="color_blue_title">Azul</string>
+ <string name="gamma_default_title">Padrão</string>
+ <string name="gamma_CM_title">Conf. CM</string>
+ <string name="gamma_bright_title">Conf. de Brilho</string>
+ <string name="color_default_title">Padrão</string>
+ <string name="color_CM_title">Conf. CM</string>
+ <string name="color_dark_title">Conf. Escuro</string>
+ <string name="preset1_default_title">Padrão</string>
+ <string name="preset2_default_title">Natural</string>
+ <string name="preset3_default_title">Azul Escuro</string>
+ <string name="preset4_default_title">Quente</string>
+ <string name="preset5_default_title">Frio Escuro</string>
+ <string name="preset6_default_title">Proc. Cruzado</string>
+ <string name="credits_presets">Créditos: ale.landra91 cpaixao provolinoo</string>
+ <string name="category_touchkey_title">Teclas Sensíveis ao Toque</string>
+ <string name="touchkey_notification_title_head">Notificações de Luz de Fundo</string>
+ <string name="touchkey_notification_summary_head">As luzes de fundo das teclas sensíveis ao toque irão acender quando houver uma notificação.</string>
+ <string name="category_radio_title">Rádio</string>
+ <string name="hspa_title_head">HSPA</string>
+ <string name="hspa_summary_head">Ativar HSDPA/HSUPA</string>
+ <string name="label_deepidle_stats">Estátitiscas de Ociosidade</string>
+ <string name="label_state">Estado</string>
+ <string name="label_time">Tempo (ms)</string>
+ <string name="label_average">Média (ms)</string>
+ <string name="label_reset">Restaurar</string>
+ <string name="label_close">Fechar</string>
+ <string name="label_idle1">Ocioso</string>
+ <string name="label_idle2">Ociosidade Profunda (TOP=LIGADO)</string>
+ <string name="label_idle3">Ociosidade Profunda (TOP=DESLIGADO)</string>
+</resources> \ No newline at end of file
diff --git a/CrespoParts/res/values-pt-rPT/arrays.xml b/CrespoParts/res/values-pt-rPT/arrays.xml
new file mode 100644
index 0000000..790c219
--- /dev/null
+++ b/CrespoParts/res/values-pt-rPT/arrays.xml
@@ -0,0 +1,27 @@
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string-array name="backlight_timeout_entries">
+ <item>2 segundo</item>
+ <item>Pré-definido (5 segundos)</item>
+ <item>10 segundos</item>
+ <item>15 segundos</item>
+ <item>20 segundos</item>
+ <item>30 segundos</item>
+ <item>Nunca</item>
+ </string-array>
+
+ <string-array name="blink_timeout_entries">
+ <item>1 minuto</item>
+ <item>2 minuto</item>
+ <item>Pré-definido (5 minutos)</item>
+ <item>10 minutos</item>
+ <item>15 minutos</item>
+ <item>30 minutos</item>
+ <item>Nunca</item>
+ </string-array>
+
+ <string-array name="hspa_entries">
+ <item>Apenas UMTS</item>
+ <item>Apenas HSDPA</item>
+ <item>HSDPA + HSUPA</item>
+ </string-array>
+</resources>
diff --git a/CrespoParts/res/values-pt-rPT/strings.xml b/CrespoParts/res/values-pt-rPT/strings.xml
new file mode 100644
index 0000000..3b32960
--- /dev/null
+++ b/CrespoParts/res/values-pt-rPT/strings.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="app_name">Definições Nexus S</string>
+
+ <string name="category_screen_title">Definições WM8994 ( voodoo )</string>
+ <string name="color_tuning_title_head">Ajuste de Cor</string>
+ <string name="color_tuning_summary_head">Calibrar cor do ecrã</string>
+ <string name="color_red_title">Vermelho</string>
+ <string name="color_green_title">Verde</string>
+ <string name="color_blue_title">Azul</string>
+
+ <!-- WM8994 Control Settings -->
+ <string name="general_sound_title">Som</string>
+ <!-- Categories -->
+ <string name="category_wm8994_internal_speaker">Configuração do Altifalante Interno</string>
+ <string name="category_wm8994_signal_processing">Processamento de Sinal</string>
+ <string name="category_wm8994_headphone_amp">Amplificador de auscutador</string>
+ <string name="category_wm8994_codec_optimization">Optimização de Codec</string>
+ <string name="category_wm8994_dac_config">Definições de conversão Digital/Analógico</string>
+ <string name="category_wm8994_analog_path">Definições de roteamento Analógico</string>
+ <string name="category_wm8994_mic_settings">Definições de Microfone</string>
+ <!-- Titles/Summaries -->
+ <string name="wm8994_settings_title_head">Definições de Som</string>
+ <string name="wm8994_settings_title_subhead">Definições de Som</string>
+ <string name="wm8994_settings_summary_head">Controlo avançado do processador de som WM8994</string>
+ <string name="pref_wm8994_control_enable_title">Activar controlo WM8994</string>
+ <string name="pref_wm8994_control_enable_summary">Activar controlo avançado para o processador de som WM8994</string>
+ <string name="pref_wm8994_speaker_tuning_title">Ajustar altifalante para música</string>
+ <string name="pref_wm8994_speaker_tuning_summary">Reconfigurar equalizador de hardware para obter mais Bass/Boost</string>
+ <string name="pref_wm8994_mono_downmix_title">Downmix Mono</string>
+ <string name="pref_wm8994_mono_downmix_summary">Transforma estéreo sound em mono (para outputs estéreo, tais como headphones)</string>
+ <string name="pref_wm8994_stereo_expansion_title">Expansão estéreo</string>
+ <string name="pref_wm8994_stereo_expansion_summary">"Expande" som estéreo através de processamento digital</string>
+ <string name="pref_wm8994_dac_direct_title">D/AC directamente</string>
+ <string name="pref_wm8994_dac_direct_summary">Acede ao conversor digital/analógco directamente, evitando o misturador de canal. Produz áudio mais limpo (rácio de signal-noise mais baixo)</string>
+ <string name="pref_wm8994_dac_osr128_title">Som Hi-fi</string>
+ <string name="pref_wm8994_dac_osr128_summary">Conversor Digital-para-analógico com 128x de oversampling -- som mais limpo ao tocar música</string>
+ <string name="pref_wm8994_adc_osr128_title">Gravação Hi-fi</string>
+ <string name="pref_wm8994_adc_osr128_summary">Conversor Analógico-para-digital com 128x de oversampling -- aumenta a qualidade das gravações</string>
+ <string name="pref_wm8994_fll_tuning_title">Ligar ao relógio de áudio</string>
+ <string name="pref_wm8994_fll_tuning_summary">Usar o processador WM8994 como relógio para áudio -- aumenta a qualidade do som</string>
+
+ <string name="category_touchkey_title">Botões Capacitivos</string>
+ <string name="backlight_timeout_title_head">Temporizador Luz de Fundo</string>
+ <string name="backlight_timeout_summary_head">Ajusta o tempo que as teclas capacitivas demoram a desligar a sua luz de fundo</string>
+ <string name="blink_timeout_title_head">Temporizador de Intermitência</string>
+ <string name="blink_timeout_summary_head">Ajusta o tempo que as teclas demoram a desligar a retroiluminação intermitente após notificação.</string>
+
+ <string name="category_radio_title">Radio</string>
+ <string name="hspa_title_head">HSPA</string>
+ <string name="hspa_summary_head">Activar HSDPA/HSUPA</string>
+</resources>
diff --git a/CrespoParts/res/values-ru/arrays.xml b/CrespoParts/res/values-ru/arrays.xml
new file mode 100644
index 0000000..aa58f8b
--- /dev/null
+++ b/CrespoParts/res/values-ru/arrays.xml
@@ -0,0 +1,28 @@
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string-array name="backlight_timeout_entries">
+ <item>2 секунды</item>
+ <item>По умолчанию (5 секунд)</item>
+ <item>10 секунд</item>
+ <item>15 секунд</item>
+ <item>20 секунд</item>
+ <item>30 секунд</item>
+ <item>Никогда</item>
+ </string-array>
+
+ <string-array name="blink_timeout_entries">
+ <item>1 минута</item>
+ <item>2 минуты</item>
+ <item>По умолчанию (5 минут)</item>
+ <item>10 минут</item>
+ <item>15 минут</item>
+ <item>30 минут</item>
+ <item>Никогда</item>
+ </string-array>
+
+ <string-array name="hspa_entries">
+ <item>Только UMTS</item>
+ <item>Только HSDPA</item>
+ <item>HSDPA + HSUPA</item>
+ </string-array>
+
+</resources>
diff --git a/CrespoParts/res/values-ru/strings.xml b/CrespoParts/res/values-ru/strings.xml
new file mode 100644
index 0000000..5b1adf2
--- /dev/null
+++ b/CrespoParts/res/values-ru/strings.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="app_name">Настройки Nexus S</string>
+
+ <string name="category_screen_title">Настройки WM8994 ( voodoo )</string>
+ <string name="color_tuning_title_head">Настройка умножителей цвета</string>
+ <string name="color_tuning_summary_head">Калибровка умножителей цветов экрана</string>
+ <string name="gamma_tuning_title_head">Настройка цветовой гаммы</string>
+ <string name="gamma_tuning_summary_head">Калибровка гамма-коррекции цвета</string>
+ <string name="color_red_title">Красный</string>
+ <string name="color_green_title">Зелёный</string>
+ <string name="color_blue_title">Синий</string>
+
+ <!-- WM8994 Control Settings -->
+ <string name="general_sound_title">Звук</string>
+ <!-- Categories -->
+ <string name="category_wm8994_internal_speaker">Настройка внутренних динамиков</string>
+ <string name="category_wm8994_signal_processing">Обработка сигналов</string>
+ <string name="category_wm8994_headphone_amp">Усиление наушников</string>
+ <string name="category_wm8994_codec_optimization">Оптимизация кодека</string>
+ <string name="category_wm8994_dac_config">Настройка цифрового/аналогового конвертера</string>
+ <string name="category_wm8994_analog_path">Настройки аналогового пути</string>
+ <string name="category_wm8994_mic_settings">Настройки микрофона</string>
+ <!-- Titles/Summaries -->
+ <string name="wm8994_settings_title_head">Настройки звука</string>
+ <string name="wm8994_settings_title_subhead">Настройки звука</string>
+ <string name="wm8994_settings_summary_head">Расширенное управление звуковым процессором WM8994</string>
+ <string name="pref_wm8994_control_enable_title">Включить управление WM8994</string>
+ <string name="pref_wm8994_control_enable_summary">Включить расширенное управление звуковым процессором WM8994</string>
+ <string name="pref_wm8994_speaker_tuning_title">Настройка динамиков для воспроизведения музыки</string>
+ <string name="pref_wm8994_speaker_tuning_summary">Перенастройка аппаратного эквалайзера для получения более низчких частот и сбалансированного звука</string>
+ <string name="pref_wm8994_mono_downmix_title">Конвертация в моно</string>
+ <string name="pref_wm8994_mono_downmix_summary">Конвертировать стереозвук в моно (для стереовыводы, например для наушников)</string>
+ <string name="pref_wm8994_stereo_expansion_title">Расширение стерео</string>
+ <string name="pref_wm8994_stereo_expansion_summary">Расширить стереозвук через обработку цифровых сигналов</string>
+ <string name="pref_wm8994_dac_direct_title">Прямой D/AC</string>
+ <string name="pref_wm8994_dac_direct_summary">Доступ к цифровому/аналоговому преобразователю напрямую, минуя канальный микшер. Способствует чистому звуку (более низкое соотношение сигнал-шум)</string>
+ <string name="pref_wm8994_dac_osr128_title">Hi-fi воспроизведение</string>
+ <string name="pref_wm8994_dac_osr128_summary">128-передискретизация цифрово-аналогового преобразователя - чистый звук при воспроизведении музыки</string>
+ <string name="pref_wm8994_adc_osr128_title">Hi-fi запись</string>
+ <string name="pref_wm8994_adc_osr128_summary">128-передискретизация аналого-цифрового преобразователя - повышает качество записи</string>
+ <string name="pref_wm8994_fll_tuning_title">Настройка аудио-частот</string>
+ <string name="pref_wm8994_fll_tuning_summary">Использовать настроенные аудио-частоты WM8994 - улучшает качество звука</string>
+
+ <string name="category_touchkey_title">Сенсорные кнопки</string>
+ <string name="backlight_timeout_title_head">Таймаут подсветки</string>
+ <string name="backlight_timeout_summary_head">Как долго работает подсветка сенсорных кнопок</string>
+ <string name="blink_timeout_title_head">Таймаут мигания</string>
+ <string name="blink_timeout_summary_head">Как долго будут мигать сенсорные кнопки после уведомления</string>
+
+ <string name="category_radio_title">Радиомодуль</string>
+ <string name="hspa_title_head">HSPA</string>
+ <string name="hspa_summary_head">Включить HSDPA/HSUPA</string>
+</resources>
diff --git a/CrespoParts/res/values-tr/strings.xml b/CrespoParts/res/values-tr/strings.xml
new file mode 100644
index 0000000..469f5fd
--- /dev/null
+++ b/CrespoParts/res/values-tr/strings.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+ <string name="app_name">Nexus S ayarları</string>
+
+ <string name="category_screen_title">WM8994 ayarları ( voodoo )</string>
+ <string name="color_tuning_title_head">Renk ayarı</string>
+ <string name="color_tuning_summary_head">Ekran rengi kalibrasyonu</string>
+ <string name="color_red_title">Kırmızı</string>
+ <string name="color_green_title">Yeşil</string>
+ <string name="color_blue_title">Mavi</string>
+
+ <!-- WM8994 Kontrol Ayarları -->
+ <string name="general_sound_title">Ses</string>
+ <!-- Kategoriler -->
+ <string name="category_wm8994_internal_speaker">Dahili hoparlör konfigürasyonu</string>
+ <string name="category_wm8994_signal_processing">Sinyal işleme</string>
+ <string name="category_wm8994_headphone_amp">Kulaklık amplifikatörü</string>
+ <string name="category_wm8994_codec_optimization">Codec optimizasyonu</string>
+ <string name="category_wm8994_dac_config">Dijital / Analog Dönüştürücü ayarları</string>
+ <string name="category_wm8994_analog_path">Analog yol konfigürasyonu</string>
+ <string name="category_wm8994_mic_settings">Mikrofon ayarları</string>
+ <!-- Titles/Summaries -->
+ <string name="wm8994_settings_title_head">Ses ayarları</string>
+ <string name="wm8994_settings_title_subhead">Ses ayarları</string>
+ <string name="wm8994_settings_summary_head">WM8994 Ses işlemcisi donanımı gelişmiş kontrolü</string>
+ <string name="pref_wm8994_control_enable_title">WM8994 Kontrolünü etkinleştir</string>
+ <string name="pref_wm8994_control_enable_summary">WM8994 ses işlemcisi donanımı için gelişmiş denetimlerini etkinleştirme</string>
+ <string name="pref_wm8994_speaker_tuning_title">Müzik için hoparlör ayarı</string>
+ <string name="pref_wm8994_speaker_tuning_summary">Daha fazla bas ve dengeli bir ses elde etmek için EQ donanımını yeniden yapılandırır</string>
+ <string name="pref_wm8994_mono_downmix_title">Mono indirgeme</string>
+ <string name="pref_wm8994_mono_downmix_summary">Stereo sesi monoya indirgeme (stereo çıkış, kulaklık gibi)</string>
+ <string name="pref_wm8994_stereo_expansion_title">Stereo geliştirme</string>
+ <string name="pref_wm8994_stereo_expansion_summary">Dijital sinyal işleme üzerinden stereo ses "Gelistirme"</string>
+ <string name="pref_wm8994_dac_direct_title">D / AC direkt</string>
+ <string name="pref_wm8994_dac_direct_summary">Kanal mikser atlayarak, doğrudan, analog / dijital dönüştürücü erişim. Temiz ses (düşük sinyal-gürültü oranı) üretir.</string>
+ <string name="pref_wm8994_dac_osr128_title">Hi-fi oynatma</string>
+ <string name="pref_wm8994_dac_osr128_summary">Dijital-analog çevirici 128x örnekleme - Müzik çalarken daha temiz ses</string>
+ <string name="pref_wm8994_adc_osr128_title">Hi-fi kaydı</string>
+ <string name="pref_wm8994_adc_osr128_summary">Analog-dijital dönüştürücü 128x örnekleme -- kayıtların kalitesini artırır</string>
+ <string name="pref_wm8994_fll_tuning_title">Ayarlı ses saati</string>
+ <string name="pref_wm8994_fll_tuning_summary">WM8994 ses saati kaynağı ayarlı kullan - ses kalitesini artırır</string>
+
+ <string name="category_touchkey_title">Dokunmatik tuşlar</string>
+ <string name="backlight_timeout_title_head">Arka ışık zaman aşımı</string>
+ <string name="backlight_timeout_summary_head">Dokunmatik tuşa ışığı otomatik kapanmadan önceki gecikmeyi ayarlayın</string>
+ <string name="blink_timeout_title_head">Yanıp sönme zaman aşımı</string>
+ <string name="blink_timeout_summary_head">Bir bildirim sonrası dokunmatik tuşun yanıp söner arka ışığın otomatik kapanmadan önceki gecikmeyi ayarlayın.</string>
+
+</resources>
diff --git a/CrespoParts/res/values-zh-rCN/arrays.xml b/CrespoParts/res/values-zh-rCN/arrays.xml
new file mode 100644
index 0000000..ff3e52a
--- /dev/null
+++ b/CrespoParts/res/values-zh-rCN/arrays.xml
@@ -0,0 +1,34 @@
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string-array name="backlight_timeout_entries">
+ <item>2秒</item>
+ <item>默认(5秒)</item>
+ <item>10秒</item>
+ <item>15秒</item>
+ <item>20秒</item>
+ <item>30秒</item>
+ <item>永不</item>
+ </string-array>
+
+ <!-- skipping untranslatable /resources:0/string-array:name=backlight_timeout_entries_values -->
+
+ <string-array name="blink_timeout_entries">
+ <item>1分钟</item>
+ <item>2分钟</item>
+ <item>默认(5分钟)</item>
+ <item>10分钟</item>
+ <item>15分钟</item>
+ <item>30分钟</item>
+ <item>永不</item>
+ </string-array>
+
+ <!-- skipping untranslatable /resources:0/string-array:name=blink_timeout_entries_values -->
+
+ <string-array name="hspa_entries">
+ <item>仅 UMTS</item>
+ <item>仅 HSDPA</item>
+ <item>HSDPA+HSUPA</item>
+ </string-array>
+
+ <!-- skipping untranslatable /resources:0/string-array:name=hspa_entries_values -->
+
+</resources>
diff --git a/CrespoParts/res/values-zh-rCN/strings.xml b/CrespoParts/res/values-zh-rCN/strings.xml
new file mode 100644
index 0000000..8a266c2
--- /dev/null
+++ b/CrespoParts/res/values-zh-rCN/strings.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="app_name">Nexus S 设置</string>
+
+ <string name="general_title">常规</string>
+ <string name="display_title">显示</string>
+ <string name="sound_title">音效</string>
+
+ <!-- skip 'category_cpu_title' translation -->
+ <string name="cpu_deepidle_title_head">深度休眠</string>
+ <string name="cpu_deepidle_summary_head">启用深度休眠, 以便延长电池寿命. (当前属于实验性质!)</string>
+
+ <string name="category_screen_title">WM8994 设置(Voodoo)</string>
+ <string name="color_tuning_title_head">颜色增值</string>
+ <string name="color_tuning_summary_head">调整屏幕颜色增值</string>
+ <string name="gamma_tuning_title_head">伽玛颜色校正</string>
+ <string name="gamma_tuning_summary_head">调整伽玛颜色校正</string>
+ <string name="color_red_title">红</string>
+ <string name="color_green_title">绿</string>
+ <string name="color_blue_title">蓝</string>
+
+ <string name="lulzactive_tuning_title_head">Lulzactive 调整</string>
+ <string name="lulzactive_tuning_summary_head">lulzactive调节器的控制器参数</string>
+ <string name="inccpuload_title">% 改变</string>
+ <string name="pumpup_title">上调幅度</string>
+ <string name="pumpdown_title">下调幅度</string>
+ <string name="upsampletime_title">增加前时间[ms]</string>
+ <string name="downsampletime_title">下降前时间[ms]</string>
+ <string name="lulz_default_title">默认</string>
+ <string name="lulz_batt_title">省电</string>
+ <string name="lulz_speed_title">快速</string>
+
+ <string name="category_touchkey_title">触控键</string>
+ <string name="touchkey_notification_title_head">背光灯提醒</string>
+ <string name="touchkey_notification_summary_head">当有通知时触控键背光灯点亮.</string>
+
+ <string name="category_radio_title">无线电</string>
+ <string name="hspa_title_head">HSPA</string>
+ <string name="hspa_summary_head">启用 HSDPA/HSUPA</string>
+</resources>
diff --git a/CrespoParts/res/values-zh-rTW/arrays.xml b/CrespoParts/res/values-zh-rTW/arrays.xml
new file mode 100644
index 0000000..e4b3886
--- /dev/null
+++ b/CrespoParts/res/values-zh-rTW/arrays.xml
@@ -0,0 +1,34 @@
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string-array name="backlight_timeout_entries">
+ <item>2秒</item>
+ <item>預設(5秒)</item>
+ <item>10秒</item>
+ <item>15秒</item>
+ <item>20秒</item>
+ <item>30秒</item>
+ <item>永不</item>
+ </string-array>
+
+ <!-- skipping untranslatable /resources:0/string-array:name=backlight_timeout_entries_values -->
+
+ <string-array name="blink_timeout_entries">
+ <item>1分鐘</item>
+ <item>2分鐘</item>
+ <item>預設(5分鐘)</item>
+ <item>10分鐘</item>
+ <item>15分鐘</item>
+ <item>30分鐘</item>
+ <item>永不</item>
+ </string-array>
+
+ <!-- skipping untranslatable /resources:0/string-array:name=blink_timeout_entries_values -->
+
+ <string-array name="hspa_entries">
+ <item>僅 UMTS</item>
+ <item>僅 HSDPA</item>
+ <item>HSDPA+HSUPA</item>
+ </string-array>
+
+ <!-- skipping untranslatable /resources:0/string-array:name=hspa_entries_values -->
+
+</resources>
diff --git a/CrespoParts/res/values-zh-rTW/strings.xml b/CrespoParts/res/values-zh-rTW/strings.xml
new file mode 100644
index 0000000..0f475de
--- /dev/null
+++ b/CrespoParts/res/values-zh-rTW/strings.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="app_name">Nexus S 設定</string>
+
+ <string name="category_screen_title">WM8994 設定(Voodoo)</string>
+ <string name="color_tuning_title_head">色彩增值</string>
+ <string name="color_tuning_summary_head">調整螢幕色彩增值</string>
+ <string name="gamma_tuning_title_head">伽馬色彩校正</string>
+ <string name="gamma_tuning_summary_head">調整伽馬色彩校正</string>
+ <string name="color_red_title">紅</string>
+ <string name="color_green_title">綠</string>
+ <string name="color_blue_title">藍</string>
+
+ <!-- WM8994 Control Settings -->
+ <string name="general_sound_title">音效</string>
+ <!-- Categories -->
+ <string name="category_wm8994_internal_speaker">內置喇叭設定</string>
+ <string name="category_wm8994_signal_processing">訊號處理</string>
+ <string name="category_wm8994_headphone_amp">耳機擴音</string>
+ <string name="category_wm8994_codec_optimization">編碼優化</string>
+ <string name="category_wm8994_dac_config">數碼/類比轉換器設定</string>
+ <string name="category_wm8994_analog_path">類比路徑設定</string>
+ <string name="category_wm8994_mic_settings">麥克風設定</string>
+ <!-- Titles/Summaries -->
+ <string name="wm8994_settings_title_head">音效設定</string>
+ <string name="wm8994_settings_title_subhead">音效設定</string>
+ <string name="wm8994_settings_summary_head">WM8994 音效處理器硬體進階控制</string>
+ <string name="pref_wm8994_control_enable_title">啟用 WM8994 控制</string>
+ <string name="pref_wm8994_control_enable_summary">啟用 WM8994 音效處理器硬體的進階控制</string>
+ <string name="pref_wm8994_speaker_tuning_title">為音樂調整喇叭</string>
+ <string name="pref_wm8994_speaker_tuning_summary">重新設置硬體等化器以穫取更加低音及均衡的音效</string>
+ <string name="pref_wm8994_mono_downmix_title">單聲道混合</string>
+ <string name="pref_wm8994_mono_downmix_summary">將雙聲道混合成單聲道(用於雙聲道輸出,例如耳機)</string>
+ <string name="pref_wm8994_stereo_expansion_title">雙聲道擴展</string>
+ <string name="pref_wm8994_stereo_expansion_summary">透過數碼訊號處理,將雙聲道音效“擴展”</string>
+ <string name="pref_wm8994_dac_direct_title">直接轉換數碼/類比</string>
+ <string name="pref_wm8994_dac_direct_summary">繞過頻道混音器,直接存取數碼/類比轉換器,以產生更清晰音訊(較低的訊噪比)</string>
+ <string name="pref_wm8994_dac_osr128_title">Hi-Fi 播放</string>
+ <string name="pref_wm8994_dac_osr128_summary">數碼至類比的128倍過採樣轉換,使播放音樂時的音質更清晰</string>
+ <string name="pref_wm8994_adc_osr128_title">Hi-Fi 錄音</string>
+ <string name="pref_wm8994_adc_osr128_summary">類比至數碼的128倍過採樣轉換,提升錄音品質</string>
+ <string name="pref_wm8994_fll_tuning_title">調整音訊時脈</string>
+ <string name="pref_wm8994_fll_tuning_summary">使用調整了 WM8994 音訊時脈的原始碼,提升音效品質</string>
+
+ <string name="category_touchkey_title">觸控鍵</string>
+ <string name="backlight_timeout_title_head">背光逾時</string>
+ <string name="backlight_timeout_summary_head">調整觸控鍵背光自動關閉前的延遲時間</string>
+ <string name="blink_timeout_title_head">閃爍逾時</string>
+ <string name="blink_timeout_summary_head">調整觸控鍵閃爍通知自動關閉前的延遲時間</string>
+
+ <string name="category_radio_title">行動網路</string>
+ <string name="hspa_title_head">HSPA</string>
+ <string name="hspa_summary_head">啟用 HSDPA/HSUPA</string>
+</resources>
diff --git a/CrespoParts/res/values/arrays.xml b/CrespoParts/res/values/arrays.xml
new file mode 100644
index 0000000..874c983
--- /dev/null
+++ b/CrespoParts/res/values/arrays.xml
@@ -0,0 +1,54 @@
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string-array name="backlight_timeout_entries">
+ <item>2 seconds</item>
+ <item>Default (5 seconds)</item>
+ <item>10 seconds</item>
+ <item>15 seconds</item>
+ <item>20 seconds</item>
+ <item>30 seconds</item>
+ <item>Never</item>
+ </string-array>
+
+ <string-array name="backlight_timeout_entries_values" translatable="false">
+ <item>2</item>
+ <item>5</item>
+ <item>10</item>
+ <item>15</item>
+ <item>20</item>
+ <item>30</item>
+ <item>0</item>
+ </string-array>
+
+ <string-array name="blink_timeout_entries">
+ <item>1 minute</item>
+ <item>2 minutes</item>
+ <item>Default (5 minutes)</item>
+ <item>10 minutes</item>
+ <item>15 minutes</item>
+ <item>30 minutes</item>
+ <item>Never</item>
+ </string-array>
+
+ <string-array name="blink_timeout_entries_values" translatable="false">
+ <item>1</item>
+ <item>2</item>
+ <item>5</item>
+ <item>10</item>
+ <item>15</item>
+ <item>30</item>
+ <item>0</item>
+ </string-array>
+
+ <string-array name="hspa_entries">
+ <item>UMTS Only</item>
+ <item>HSDPA Only</item>
+ <item>HSDPA + HSUPA</item>
+ </string-array>
+
+ <string-array name="hspa_entries_values" translatable="false">
+ <item>21</item>
+ <item>22</item>
+ <item>23</item>
+ </string-array>
+
+</resources>
diff --git a/CrespoParts/res/values/strings.xml b/CrespoParts/res/values/strings.xml
new file mode 100644
index 0000000..661fb8d
--- /dev/null
+++ b/CrespoParts/res/values/strings.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="app_name">Nexus S Settings</string>
+
+ <!-- Page Headers -->
+ <string name="general_title">GENERAL</string>
+ <string name="display_title">DISPLAY</string>
+ <string name="sound_title">SOUND</string>
+
+ <string name="category_cpu_title">CPU</string>
+ <string name="cpu_deepidle_title_head">Deep Idle</string>
+ <string name="cpu_deepidle_summary_head">Enables deep idle.</string>
+ <string name="category_screen_title">WM8994 Settings ( voodoo )</string>
+ <string name="color_tuning_title_head">Color Multipliers Tuning</string>
+ <string name="color_tuning_summary_head">Calibrate multipliers screen color</string>
+ <string name="gamma_tuning_title_head">Color Gamma Tuning</string>
+ <string name="gamma_tuning_summary_head">Calibrate gamma color correction</string>
+ <string name="color_hack_presets_title_head">Color hack presets</string>
+ <string name="color_hack_presets_summary_head">Presets for gamma and multipliers tested by some users</string>
+ <string name="color_red_title">Red</string>
+ <string name="color_green_title">Green</string>
+ <string name="color_blue_title">Blue</string>
+ <string name="gamma_default_title">Default</string>
+ <string name="gamma_CM_title">CM Sett.</string>
+ <string name="gamma_bright_title">Bright Sett.</string>
+ <string name="color_default_title">Default</string>
+ <string name="color_CM_title">CM Sett.</string>
+ <string name="color_dark_title">Dark Sett.</string>
+
+ <string name="preset1_default_title">Default.</string>
+ <string name="preset2_default_title">Natural</string>
+ <string name="preset3_default_title">Dark Blue</string>
+ <string name="preset4_default_title">Warm</string>
+ <string name="preset5_default_title">Dark Cold</string>
+ <string name="preset6_default_title">Cross Proc.</string>
+ <string name="credits_presets">Credits: ale.landra91 cpaixao provolinoo</string>
+
+ <string name="category_touchkey_title">Touch Keys</string>
+ <string name="touchkey_notification_title_head">Backlight Notifications</string>
+ <string name="touchkey_notification_summary_head">The touch key backlights will turn on when there is a notification.</string>
+
+ <string name="category_radio_title">Radio</string>
+ <string name="hspa_title_head">HSPA</string>
+ <string name="hspa_summary_head">Enable HSDPA/HSUPA</string>
+
+ <string name="label_deepidle_stats">Idle Stats</string>
+ <string name="label_state">State</string>
+ <string name="label_time">Time (ms)</string>
+ <string name="label_average">Avg (ms)</string>
+ <string name="label_reset">Reset</string>
+ <string name="label_close">Close</string>
+ <string name="label_idle1">Idle</string>
+ <string name="label_idle2">Deep Idle (TOP=ON)</string>
+ <string name="label_idle3">Deep Idle (TOP=OFF)</string>
+
+</resources>
diff --git a/CrespoParts/res/xml/display_preferences.xml b/CrespoParts/res/xml/display_preferences.xml
new file mode 100755
index 0000000..45795d1
--- /dev/null
+++ b/CrespoParts/res/xml/display_preferences.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
+ android:title="@string/app_name">
+
+ <!-- Color tuning -->
+ <com.cyanogenmod.settings.device.ColorTuningPreference
+ android:key="color_tuning"
+ android:title="@string/color_tuning_title_head"
+ android:summary="@string/color_tuning_summary_head" />
+ <com.cyanogenmod.settings.device.GammaTuningPreference
+ android:key="gamma_tuning"
+ android:title="@string/gamma_tuning_title_head"
+ android:summary="@string/gamma_tuning_summary_head" />
+ <com.cyanogenmod.settings.device.ColorHackPresets
+ android:key="color_presets"
+ android:title="@string/color_hack_presets_title_head"
+ android:summary="@string/color_hack_presets_summary_head" />
+
+</PreferenceScreen>
diff --git a/CrespoParts/res/xml/general_preferences.xml b/CrespoParts/res/xml/general_preferences.xml
new file mode 100644
index 0000000..423f97b
--- /dev/null
+++ b/CrespoParts/res/xml/general_preferences.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <!-- General settings -->
+ <PreferenceCategory android:key="category_cpu"
+ android:title="@string/category_cpu_title">
+
+ <CheckBoxPreference android:key="deepidle"
+ android:title="@string/cpu_deepidle_title_head"
+ android:summary="@string/cpu_deepidle_summary_head" />
+
+ <PreferenceScreen android:key="deepidle_stats"
+ android:title="@string/label_deepidle_stats" />
+
+ </PreferenceCategory>
+
+ <!-- Touch key backlight timeout -->
+ <PreferenceCategory android:key="category_touchkey"
+ android:title="@string/category_touchkey_title">
+ <CheckBoxPreference android:key="touchkey_notification"
+ android:title="@string/touchkey_notification_title_head"
+ android:summary="@string/touchkey_notification_summary_head" />
+ </PreferenceCategory>
+
+</PreferenceScreen>
diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/ColorHackPresets.java b/CrespoParts/src/com/cyanogenmod/settings/device/ColorHackPresets.java
new file mode 100644
index 0000000..f110d4f
--- /dev/null
+++ b/CrespoParts/src/com/cyanogenmod/settings/device/ColorHackPresets.java
@@ -0,0 +1,212 @@
+/*
+ * Copyright (C) 2011 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 com.cyanogenmod.settings.device;
+
+import android.content.Context;
+import android.content.SharedPreferences;
+import android.content.SharedPreferences.Editor;
+import android.preference.DialogPreference;
+import android.preference.PreferenceManager;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.TextView;
+import android.widget.Button;
+import android.util.Log;
+
+/**
+ * Special preference type that allows configuration of both the ring volume and
+ * notification volume.
+ */
+public class ColorHackPresets extends DialogPreference implements OnClickListener {
+
+ private static final String TAG = "PRESETS...";
+
+ private static final String[] FILE_PATH_GAMMA = new String[] {
+ "/sys/class/misc/samoled_color/red_v1_offset",
+ "/sys/class/misc/samoled_color/green_v1_offset",
+ "/sys/class/misc/samoled_color/blue_v1_offset"
+ };
+
+ private static final String[] FILE_PATH_MULTI = new String[] {
+ "/sys/class/misc/samoled_color/red_multiplier",
+ "/sys/class/misc/samoled_color/green_multiplier",
+ "/sys/class/misc/samoled_color/blue_multiplier"
+ };
+
+ // Track instances to know when to restore original color
+ // (when the orientation changes, a new dialog is created before the old one
+ // is destroyed)
+ private static int sInstances = 0;
+
+ // Align MAX_VALUE with Voodoo Control settings
+ private static final int MAX_VALUE = Integer.MAX_VALUE - 2;
+
+ public ColorHackPresets(Context context, AttributeSet attrs) {
+ super(context, attrs);
+
+ setDialogLayoutResource(R.layout.preference_colorgamma_presets);
+ }
+
+ @Override
+ protected void onBindDialogView(View view) {
+ super.onBindDialogView(view);
+
+ sInstances++;
+
+ SetupButtonClickListeners(view);
+ }
+
+ private void SetupButtonClickListeners(View view) {
+ Button[] mPresets = new Button[6];
+
+ mPresets[0] = (Button)view.findViewById(R.id.btnPreset1);
+ mPresets[1] = (Button)view.findViewById(R.id.btnPreset2);
+ mPresets[2] = (Button)view.findViewById(R.id.btnPreset3);
+ mPresets[3] = (Button)view.findViewById(R.id.btnPreset4);
+ mPresets[4] = (Button)view.findViewById(R.id.btnPreset5);
+ mPresets[5] = (Button)view.findViewById(R.id.btnPreset6);
+ for (int i = 0; i < 6; i++) {
+ mPresets[i].setOnClickListener(this);
+ }
+ }
+
+ @Override
+ protected void onDialogClosed(boolean positiveResult) {
+ super.onDialogClosed(positiveResult);
+
+ sInstances--;
+
+ }
+
+ /**
+ * Restore screen color tuning from SharedPreferences. (Write to kernel.)
+ *
+ * @param context The context to read the SharedPreferences from
+ */
+ public static void restore(Context context) {
+ if (!isSupported()) {
+ return;
+ }
+
+ }
+
+ /**
+ * Check whether the running kernel supports color tuning or not.
+ *
+ * @return Whether color tuning is supported or not
+ */
+ public static boolean isSupported() {
+ boolean supported = true;
+ for (String filePath : FILE_PATH_GAMMA) {
+ if (!Utils.fileExists(filePath)) {
+ supported = false;
+ }
+ }
+
+ return supported;
+ }
+
+ public void onClick(View v) {
+ switch(v.getId()){
+ case R.id.btnPreset1:
+ Preset1();
+ break;
+ case R.id.btnPreset2:
+ Preset2();
+ break;
+ case R.id.btnPreset3:
+ Preset3();
+ break;
+ case R.id.btnPreset4:
+ Preset4();
+ break;
+ case R.id.btnPreset5:
+ Preset5();
+ break;
+ case R.id.btnPreset6:
+ Preset6();
+ break;
+ }
+ }
+
+ private void WriteMultiplier(Double fValue , int iPos) {
+ int iValue = (int) ((double) MAX_VALUE * fValue);
+ Utils.writeColor(FILE_PATH_MULTI[iPos], iValue);
+ Log.i(TAG,"KalimAz: Multiplier: " + iPos+ " Value " + iValue );
+ }
+
+ private void WriteGamma(int iValue , int iPos) {
+ Utils.writeValue(FILE_PATH_GAMMA[iPos], String.valueOf((long) iValue));
+ Log.i(TAG,"KalimAz: Gamma: " + iPos+ " Value " + iValue );
+ }
+
+ private void Preset1() {
+ WriteMultiplier(1.0, 0);
+ WriteMultiplier(1.0, 1);
+ WriteMultiplier(1.0, 2);
+ WriteGamma(0, 0);
+ WriteGamma(0, 1);
+ WriteGamma(0, 2);
+ }
+
+ private void Preset2() {
+ WriteMultiplier(0.8575, 0);
+ WriteMultiplier(0.8575, 1);
+ WriteMultiplier(0.8575, 2);
+ WriteGamma(-50, 0);
+ WriteGamma(-50, 1);
+ WriteGamma(-40, 2);
+ }
+
+ private void Preset3() {
+ WriteMultiplier(0.658602179, 0);
+ WriteMultiplier(0.7311828147, 1);
+ WriteMultiplier(1.0, 2);
+ WriteGamma(-41, 0);
+ WriteGamma(-46, 1);
+ WriteGamma(-31, 2);
+ }
+
+ private void Preset4() {
+ WriteMultiplier(0.7231, 0);
+ WriteMultiplier(0.7016, 1);
+ WriteMultiplier(0.6532, 2);
+ WriteGamma(-35, 0);
+ WriteGamma(-55, 1);
+ WriteGamma(-48, 2);
+ }
+
+ private void Preset5() {
+ WriteMultiplier(0.6666, 0);
+ WriteMultiplier(0.6666, 1);
+ WriteMultiplier(0.8333, 2);
+ WriteGamma(-44, 0);
+ WriteGamma(-44, 1);
+ WriteGamma(-22, 2);
+ }
+
+ private void Preset6() {
+ WriteMultiplier(1.0, 0);
+ WriteMultiplier(0.7688, 1);
+ WriteMultiplier(0.2473, 2);
+ WriteGamma(-57, 0);
+ WriteGamma(-39, 1);
+ WriteGamma(45, 2);
+ }
+
+}
diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/ColorTuningPreference.java b/CrespoParts/src/com/cyanogenmod/settings/device/ColorTuningPreference.java
new file mode 100644
index 0000000..0ca7ae2
--- /dev/null
+++ b/CrespoParts/src/com/cyanogenmod/settings/device/ColorTuningPreference.java
@@ -0,0 +1,264 @@
+/*
+ * Copyright (C) 2011 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 com.cyanogenmod.settings.device;
+
+import android.content.Context;
+import android.content.SharedPreferences;
+import android.content.SharedPreferences.Editor;
+import android.preference.DialogPreference;
+import android.preference.PreferenceManager;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.SeekBar;
+import android.widget.TextView;
+import android.util.Log;
+import android.widget.Button;
+
+/**
+ * Special preference type that allows configuration of both the ring volume and
+ * notification volume.
+ */
+public class ColorTuningPreference extends DialogPreference implements OnClickListener {
+
+ private static final String TAG = "COLOR...";
+
+ enum Colors {
+ RED, GREEN, BLUE
+ };
+
+ private static final int[] SEEKBAR_ID = new int[] {
+ R.id.color_red_seekbar, R.id.color_green_seekbar, R.id.color_blue_seekbar
+ };
+
+ private static final int[] VALUE_DISPLAY_ID = new int[] {
+ R.id.color_red_value, R.id.color_green_value, R.id.color_blue_value
+ };
+
+ private static final String[] FILE_PATH = new String[] {
+ "/sys/class/misc/samoled_color/red_multiplier",
+ "/sys/class/misc/samoled_color/green_multiplier",
+ "/sys/class/misc/samoled_color/blue_multiplier"
+ };
+
+ private ColorSeekBar mSeekBars[] = new ColorSeekBar[3];
+
+ // Align MAX_VALUE with Voodoo Control settings
+ private static final int MAX_VALUE = Integer.MAX_VALUE - 2;
+
+ // Track instances to know when to restore original color
+ // (when the orientation changes, a new dialog is created before the old one
+ // is destroyed)
+ private static int sInstances = 0;
+
+ public ColorTuningPreference(Context context, AttributeSet attrs) {
+ super(context, attrs);
+
+ setDialogLayoutResource(R.layout.preference_dialog_color_tuning);
+ }
+
+ @Override
+ protected void onBindDialogView(View view) {
+ super.onBindDialogView(view);
+
+ sInstances++;
+
+ for (int i = 0; i < SEEKBAR_ID.length; i++) {
+ SeekBar seekBar = (SeekBar) view.findViewById(SEEKBAR_ID[i]);
+ TextView valueDisplay = (TextView) view.findViewById(VALUE_DISPLAY_ID[i]);
+ mSeekBars[i] = new ColorSeekBar(seekBar, valueDisplay, FILE_PATH[i]);
+ }
+ SetupButtonClickListeners(view);
+ }
+
+ private void SetupButtonClickListeners(View view) {
+ Button mDefaultButton = (Button)view.findViewById(R.id.btnColorDefault);
+ Button mCMButton = (Button)view.findViewById(R.id.btnColorCM);
+ Button mDarkButton = (Button)view.findViewById(R.id.btnColorDark);
+ mDefaultButton.setOnClickListener(this);
+ mCMButton.setOnClickListener(this);
+ mDarkButton.setOnClickListener(this);
+ }
+
+ @Override
+ protected void onDialogClosed(boolean positiveResult) {
+ super.onDialogClosed(positiveResult);
+
+ sInstances--;
+
+ if (positiveResult) {
+ for (ColorSeekBar csb : mSeekBars) {
+ csb.save();
+ }
+ } else if (sInstances == 0) {
+ for (ColorSeekBar csb : mSeekBars) {
+ csb.reset();
+ }
+ }
+ }
+
+ /**
+ * Restore screen color tuning from SharedPreferences. (Write to kernel.)
+ *
+ * @param context The context to read the SharedPreferences from
+ */
+ public static void restore(Context context) {
+ int iValue, iValue2;
+ if (!isSupported()) {
+ return;
+ }
+
+ SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
+
+ for (String filePath : FILE_PATH) {
+ String sDefaultValue = Utils.readOneLine(filePath);
+ Log.d(TAG,"INIT: " + sDefaultValue);
+ try {
+ iValue2 = Integer.parseInt(sDefaultValue);
+ } catch (NumberFormatException e) {
+ iValue2 = MAX_VALUE;
+ }
+ try {
+ iValue = sharedPrefs.getInt(filePath, iValue2);
+ Log.d(TAG, "restore: iValue: " + iValue + " File: " + filePath);
+ } catch (NumberFormatException e) {
+ iValue = iValue2;
+ Log.e(TAG, "restore ERROR: iValue: " + iValue + " File: " + filePath);
+ }
+ Utils.writeColor(filePath, (int) iValue);
+ }
+ }
+
+ /**
+ * Check whether the running kernel supports color tuning or not.
+ *
+ * @return Whether color tuning is supported or not
+ */
+ public static boolean isSupported() {
+ boolean supported = true;
+ for (String filePath : FILE_PATH) {
+ if (!Utils.fileExists(filePath)) {
+ supported = false;
+ }
+ }
+
+ return supported;
+ }
+
+ class ColorSeekBar implements SeekBar.OnSeekBarChangeListener {
+
+ private String mFilePath;
+
+ private int mOriginal;
+
+ private SeekBar mSeekBar;
+
+ private TextView mValueDisplay;
+
+ public ColorSeekBar(SeekBar seekBar, TextView valueDisplay, String filePath) {
+ int iValue;
+
+ mSeekBar = seekBar;
+ mValueDisplay = valueDisplay;
+ mFilePath = filePath;
+
+ SharedPreferences sharedPreferences = getSharedPreferences();
+
+ // Read original value
+ if (Utils.fileExists(mFilePath)) {
+ String sDefaultValue = Utils.readOneLine(mFilePath);
+ iValue = (int) (Long.valueOf(sDefaultValue) / 2);
+ } else {
+ iValue = sharedPreferences.getInt(mFilePath, MAX_VALUE);
+ }
+ mOriginal = iValue;
+
+ mSeekBar.setMax(MAX_VALUE);
+ reset();
+ mSeekBar.setOnSeekBarChangeListener(this);
+ }
+
+ public void reset() {
+ mSeekBar.setProgress(mOriginal);
+ updateValue(mOriginal);
+ }
+
+ public void save() {
+ Editor editor = getEditor();
+ editor.putInt(mFilePath, mSeekBar.getProgress());
+ editor.commit();
+ }
+
+ @Override
+ public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
+ Utils.writeColor(mFilePath, progress);
+ updateValue(progress);
+ }
+
+ @Override
+ public void onStartTrackingTouch(SeekBar seekBar) {
+ // Do nothing
+ }
+
+ @Override
+ public void onStopTrackingTouch(SeekBar seekBar) {
+ // Do nothing
+ }
+
+ private void updateValue(int progress) {
+ mValueDisplay.setText(String.format("%.10f", (double) progress / MAX_VALUE));
+ }
+
+ public void SetNewValue(int iValue) {
+ mOriginal = iValue;
+ reset();
+ }
+
+ }
+
+ public void onClick(View v) {
+ switch(v.getId()){
+ case R.id.btnColorDefault:
+ SetDefaultSettings();
+ break;
+ case R.id.btnColorCM:
+ SetCMSettings();
+ break;
+ case R.id.btnColorDark:
+ SetDarkSettings();
+ break;
+ }
+ }
+
+ private void SetCMSettings() {
+ mSeekBars[0].SetNewValue(1766478464);
+ mSeekBars[1].SetNewValue(1766478464);
+ mSeekBars[2].SetNewValue(1766478464);
+ }
+
+ private void SetDarkSettings() {
+ mSeekBars[0].SetNewValue(877466432);
+ mSeekBars[1].SetNewValue(877466432);
+ mSeekBars[2].SetNewValue(877466432);
+ }
+
+ private void SetDefaultSettings() {
+ mSeekBars[0].SetNewValue(MAX_VALUE);
+ mSeekBars[1].SetNewValue(MAX_VALUE);
+ mSeekBars[2].SetNewValue(MAX_VALUE);
+ }
+}
diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java b/CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java
new file mode 100644
index 0000000..d84a78b
--- /dev/null
+++ b/CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java
@@ -0,0 +1,163 @@
+/*
+ * Copyright (C) 2011 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 com.cyanogenmod.settings.device;
+
+import android.app.ActionBar;
+import android.app.ActionBar.Tab;
+import android.app.ActionBar.TabListener;
+import android.app.Activity;
+import android.app.Fragment;
+import android.app.FragmentManager;
+import android.app.FragmentTransaction;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.ServiceConnection;
+import android.os.Bundle;
+import android.os.IBinder;
+import android.support.v13.app.FragmentPagerAdapter;
+import android.support.v4.app.FragmentActivity;
+import android.support.v4.view.ViewPager;
+
+import com.cyanogenmod.settings.device.R;
+
+import java.util.ArrayList;
+
+public class DeviceSettings extends Activity {
+
+ public static final String SHARED_PREFERENCES_BASENAME = "com.cyanogenmod.settings.device";
+ public static final String ACTION_UPDATE_PREFERENCES = "com.cyanogenmod.settings.device.UPDATE";
+ public static final String KEY_COLOR_TUNING = "color_tuning";
+ public static final String KEY_GAMMA_TUNING = "gamma_tuning";
+ public static final String KEY_COLOR_PRESET = "color_presets";
+ public static final String KEY_DEEPIDLE = "deepidle";
+ public static final String KEY_DEEPIDLE_STATS = "deepidle_stats";
+ public static final String KEY_NOTIFICATION = "touchkey_notification";
+ public static final String KEY_CATEGORY_RADIO = "category_radio";
+ public static final String KEY_HSPA = "hspa";
+
+ ViewPager mViewPager;
+ TabsAdapter mTabsAdapter;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ mViewPager = new ViewPager(this);
+ mViewPager.setId(R.id.viewPager);
+ setContentView(mViewPager);
+
+ final ActionBar bar = getActionBar();
+ bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
+ bar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE, ActionBar.DISPLAY_SHOW_TITLE);
+ bar.setTitle(R.string.app_name);
+
+ mTabsAdapter = new TabsAdapter(this, mViewPager);
+ mTabsAdapter.addTab(bar.newTab().setText(R.string.general_title),
+ GeneralFragmentActivity.class, null);
+ mTabsAdapter.addTab(bar.newTab().setText(R.string.display_title),
+ DisplayFragmentActivity.class, null);
+
+ if (savedInstanceState != null) {
+ bar.setSelectedNavigationItem(savedInstanceState.getInt("tab", 0));
+ }
+ }
+
+ @Override
+ protected void onSaveInstanceState(Bundle outState) {
+ super.onSaveInstanceState(outState);
+ outState.putInt("tab", getActionBar().getSelectedNavigationIndex());
+ }
+
+ public static class TabsAdapter extends FragmentPagerAdapter
+ implements ActionBar.TabListener, ViewPager.OnPageChangeListener {
+ private final Context mContext;
+ private final ActionBar mActionBar;
+ private final ViewPager mViewPager;
+ private final ArrayList<TabInfo> mTabs = new ArrayList<TabInfo>();
+
+ static final class TabInfo {
+ private final Class<?> clss;
+ private final Bundle args;
+
+ TabInfo(Class<?> _class, Bundle _args) {
+ clss = _class;
+ args = _args;
+ }
+ }
+
+ public TabsAdapter(Activity activity, ViewPager pager) {
+ super(activity.getFragmentManager());
+ mContext = activity;
+ mActionBar = activity.getActionBar();
+ mViewPager = pager;
+ mViewPager.setAdapter(this);
+ mViewPager.setOnPageChangeListener(this);
+ }
+
+ public void addTab(ActionBar.Tab tab, Class<?> clss, Bundle args) {
+ TabInfo info = new TabInfo(clss, args);
+ tab.setTag(info);
+ tab.setTabListener(this);
+ mTabs.add(info);
+ mActionBar.addTab(tab);
+ notifyDataSetChanged();
+ }
+
+ @Override
+ public int getCount() {
+ return mTabs.size();
+ }
+
+ @Override
+ public Fragment getItem(int position) {
+ TabInfo info = mTabs.get(position);
+ return Fragment.instantiate(mContext, info.clss.getName(), info.args);
+ }
+
+ @Override
+ public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
+ }
+
+ @Override
+ public void onPageSelected(int position) {
+ mActionBar.setSelectedNavigationItem(position);
+ }
+
+ @Override
+ public void onPageScrollStateChanged(int state) {
+ }
+
+ @Override
+ public void onTabSelected(Tab tab, FragmentTransaction ft) {
+ Object tag = tab.getTag();
+ for (int i=0; i<mTabs.size(); i++) {
+ if (mTabs.get(i) == tag) {
+ mViewPager.setCurrentItem(i);
+ }
+ }
+ }
+
+ @Override
+ public void onTabUnselected(Tab tab, FragmentTransaction ft) {
+ }
+
+ @Override
+ public void onTabReselected(Tab tab, FragmentTransaction ft) {
+ }
+ }
+}
diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/DisplayFragmentActivity.java b/CrespoParts/src/com/cyanogenmod/settings/device/DisplayFragmentActivity.java
new file mode 100755
index 0000000..d719b73
--- /dev/null
+++ b/CrespoParts/src/com/cyanogenmod/settings/device/DisplayFragmentActivity.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2011 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 com.cyanogenmod.settings.device;
+
+import android.content.Context;
+import android.content.SharedPreferences;
+import android.os.Bundle;
+import android.preference.CheckBoxPreference;
+import android.preference.Preference;
+import android.preference.PreferenceActivity;
+import android.preference.PreferenceFragment;
+import android.preference.PreferenceManager;
+import android.preference.PreferenceScreen;
+import android.util.Log;
+
+import com.cyanogenmod.settings.device.R;
+
+public class DisplayFragmentActivity extends PreferenceFragment {
+
+ private ColorTuningPreference mColorTuning;
+ private GammaTuningPreference mGammaTuning;
+ private ColorHackPresets mColorPreset;
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ addPreferencesFromResource(R.xml.display_preferences);
+
+ mColorTuning = (ColorTuningPreference) findPreference(DeviceSettings.KEY_COLOR_TUNING);
+ mColorTuning.setEnabled(ColorTuningPreference.isSupported());
+
+ mGammaTuning = (GammaTuningPreference) findPreference(DeviceSettings.KEY_GAMMA_TUNING);
+ mGammaTuning.setEnabled(GammaTuningPreference.isSupported());
+
+ mColorPreset = (ColorHackPresets) findPreference(DeviceSettings.KEY_COLOR_PRESET);
+ mColorPreset.setEnabled(ColorHackPresets.isSupported());
+ }
+
+}
diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/GammaTuningPreference.java b/CrespoParts/src/com/cyanogenmod/settings/device/GammaTuningPreference.java
new file mode 100644
index 0000000..73a66ad
--- /dev/null
+++ b/CrespoParts/src/com/cyanogenmod/settings/device/GammaTuningPreference.java
@@ -0,0 +1,272 @@
+/*
+ * Copyright (C) 2011 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 com.cyanogenmod.settings.device;
+
+import android.content.Context;
+import android.content.SharedPreferences;
+import android.content.SharedPreferences.Editor;
+import android.preference.DialogPreference;
+import android.preference.PreferenceManager;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.SeekBar;
+import android.widget.TextView;
+import android.widget.Button;
+import android.util.Log;
+
+/**
+ * Special preference type that allows configuration of both the ring volume and
+ * notification volume.
+ */
+public class GammaTuningPreference extends DialogPreference implements OnClickListener {
+
+ private static final String TAG = "GAMMA...";
+
+ enum Colors {
+ RED, GREEN, BLUE
+ };
+
+ private static final int[] SEEKBAR_ID = new int[] {
+ R.id.gamma_red_seekbar, R.id.gamma_green_seekbar, R.id.gamma_blue_seekbar
+ };
+
+ private static final int[] VALUE_DISPLAY_ID = new int[] {
+ R.id.gamma_red_value, R.id.gamma_green_value, R.id.gamma_blue_value
+ };
+
+ private static final String[] FILE_PATH = new String[] {
+ "/sys/class/misc/samoled_color/red_v1_offset",
+ "/sys/class/misc/samoled_color/green_v1_offset",
+ "/sys/class/misc/samoled_color/blue_v1_offset"
+ };
+
+ private GammaSeekBar mSeekBars[] = new GammaSeekBar[3];
+
+ private static final int MAX_VALUE = 200;
+
+ private static final int OFFSET_VALUE = 100;
+
+ // Track instances to know when to restore original color
+ // (when the orientation changes, a new dialog is created before the old one
+ // is destroyed)
+ private static int sInstances = 0;
+
+ public GammaTuningPreference(Context context, AttributeSet attrs) {
+ super(context, attrs);
+
+ setDialogLayoutResource(R.layout.preference_dialog_gamma_tuning);
+ }
+
+ @Override
+ protected void onBindDialogView(View view) {
+ super.onBindDialogView(view);
+
+ sInstances++;
+
+ for (int i = 0; i < SEEKBAR_ID.length; i++) {
+ SeekBar seekBar = (SeekBar) view.findViewById(SEEKBAR_ID[i]);
+ TextView valueDisplay = (TextView) view.findViewById(VALUE_DISPLAY_ID[i]);
+ mSeekBars[i] = new GammaSeekBar(seekBar, valueDisplay, FILE_PATH[i]);
+ }
+ SetupButtonClickListeners(view);
+ }
+
+ private void SetupButtonClickListeners(View view) {
+ Button mDefaultButton = (Button)view.findViewById(R.id.btnGammaDefault);
+ Button mCMButton = (Button)view.findViewById(R.id.btnGammaCM);
+ Button mBrightButton = (Button)view.findViewById(R.id.btnGammaBright);
+ mDefaultButton.setOnClickListener(this);
+ mCMButton.setOnClickListener(this);
+ mBrightButton.setOnClickListener(this);
+ }
+
+ @Override
+ protected void onDialogClosed(boolean positiveResult) {
+ super.onDialogClosed(positiveResult);
+
+ sInstances--;
+
+ if (positiveResult) {
+ for (GammaSeekBar csb : mSeekBars) {
+ csb.save();
+ }
+ } else if (sInstances == 0) {
+ for (GammaSeekBar csb : mSeekBars) {
+ csb.reset();
+ }
+ }
+ }
+
+ /**
+ * Restore screen color tuning from SharedPreferences. (Write to kernel.)
+ *
+ * @param context The context to read the SharedPreferences from
+ */
+ public static void restore(Context context) {
+ if (!isSupported()) {
+ return;
+ }
+
+ SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
+
+ Boolean bFirstTime = sharedPrefs.getBoolean("FirstTimeGamma", true);
+ for (String filePath : FILE_PATH) {
+ String sDefaultValue = Utils.readOneLine(filePath);
+ int iValue = sharedPrefs.getInt(filePath, Integer.valueOf(sDefaultValue));
+ if (bFirstTime)
+ Utils.writeValue(filePath, "0");
+ else
+ Utils.writeValue(filePath, String.valueOf((long) iValue));
+ }
+ if (bFirstTime)
+ {
+ SharedPreferences.Editor editor = sharedPrefs.edit();
+ editor.putBoolean("FirstTimeGamma", false);
+ editor.commit();
+ }
+ }
+
+ /**
+ * Check whether the running kernel supports color tuning or not.
+ *
+ * @return Whether color tuning is supported or not
+ */
+ public static boolean isSupported() {
+ boolean supported = true;
+ for (String filePath : FILE_PATH) {
+ if (!Utils.fileExists(filePath)) {
+ supported = false;
+ }
+ }
+
+ return supported;
+ }
+
+ class GammaSeekBar implements SeekBar.OnSeekBarChangeListener {
+
+ private String mFilePath;
+
+ private int mOriginal;
+
+ private SeekBar mSeekBar;
+
+ private TextView mValueDisplay;
+
+ public GammaSeekBar(SeekBar seekBar, TextView valueDisplay, String filePath) {
+ int iValue;
+
+ mSeekBar = seekBar;
+ mValueDisplay = valueDisplay;
+ mFilePath = filePath;
+
+ SharedPreferences sharedPreferences = getSharedPreferences();
+
+ // Read original value
+ if (Utils.fileExists(mFilePath)) {
+ String sDefaultValue = Utils.readOneLine(mFilePath);
+ iValue = Integer.valueOf(sDefaultValue);
+ } else {
+ iValue = MAX_VALUE - OFFSET_VALUE;
+ }
+ mOriginal = iValue;
+
+ mSeekBar.setMax(MAX_VALUE);
+ reset();
+ mSeekBar.setOnSeekBarChangeListener(this);
+ }
+
+ public void reset() {
+ int iValue;
+
+ iValue = mOriginal + OFFSET_VALUE;
+ mSeekBar.setProgress(iValue);
+ updateValue(mOriginal);
+ }
+
+ public void save() {
+ int iValue;
+
+ iValue = mSeekBar.getProgress() - OFFSET_VALUE;
+ Editor editor = getEditor();
+ editor.putInt(mFilePath, iValue);
+ editor.commit();
+ }
+
+ @Override
+ public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
+ int iValue;
+
+ iValue = progress - OFFSET_VALUE;
+ Utils.writeValue(mFilePath, String.valueOf((long) iValue));
+ updateValue(iValue);
+ }
+
+ @Override
+ public void onStartTrackingTouch(SeekBar seekBar) {
+ // Do nothing
+ }
+
+ @Override
+ public void onStopTrackingTouch(SeekBar seekBar) {
+ // Do nothing
+ }
+
+ private void updateValue(int progress) {
+ mValueDisplay.setText(String.format("%d", (int) progress));
+ }
+
+ public void SetNewValue(int iValue) {
+ mOriginal = iValue;
+ reset();
+ }
+
+ }
+
+ public void onClick(View v) {
+ switch(v.getId()){
+ case R.id.btnGammaDefault:
+ SetDefaultSettings();
+ break;
+ case R.id.btnGammaCM:
+ SetCMSettings();
+ break;
+ case R.id.btnGammaBright:
+ SetSBrightSettings();
+ break;
+ }
+ }
+
+ private void SetCMSettings() {
+ mSeekBars[0].SetNewValue(-63);
+ mSeekBars[1].SetNewValue(-59);
+ mSeekBars[2].SetNewValue(-61);
+ }
+
+ private void SetSBrightSettings() {
+ mSeekBars[0].SetNewValue(70);
+ mSeekBars[1].SetNewValue(68);
+ mSeekBars[2].SetNewValue(61);
+ }
+
+ private void SetDefaultSettings() {
+ mSeekBars[0].SetNewValue(0);
+ mSeekBars[1].SetNewValue(0);
+ mSeekBars[2].SetNewValue(0);
+ }
+
+}
diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/GeneralFragmentActivity.java b/CrespoParts/src/com/cyanogenmod/settings/device/GeneralFragmentActivity.java
new file mode 100644
index 0000000..eb183a2
--- /dev/null
+++ b/CrespoParts/src/com/cyanogenmod/settings/device/GeneralFragmentActivity.java
@@ -0,0 +1,159 @@
+/*
+ * Copyright (C) 2011 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 com.cyanogenmod.settings.device;
+
+import android.content.Context;
+import android.content.SharedPreferences;
+import android.os.Bundle;
+import android.preference.CheckBoxPreference;
+import android.preference.ListPreference;
+import android.preference.Preference;
+import android.preference.Preference.OnPreferenceClickListener;
+import android.preference.PreferenceActivity;
+import android.preference.PreferenceFragment;
+import android.preference.PreferenceManager;
+import android.preference.PreferenceScreen;
+import android.util.Log;
+import android.view.View;
+import android.app.AlertDialog;
+import android.content.DialogInterface;
+import android.content.DialogInterface.OnClickListener;
+import android.widget.TextView;
+
+import com.cyanogenmod.settings.device.R;
+
+public class GeneralFragmentActivity extends PreferenceFragment implements OnPreferenceClickListener {
+
+ private static final String CPU_DEEPIDLE_FILE = "/sys/class/misc/deepidle/enabled";
+ private static final String CPU_DEEPIDLE_STATS = "/sys/class/misc/deepidle/idle_stats_list";
+ private static final String CPU_DEEPIDLE_RESET = "/sys/class/misc/deepidle/reset_stats";
+ private static final String TOUCHKEY_NOTIFICATION_FILE = "/sys/class/misc/notification/enabled";
+ private static final String PREF_ENABLED = "1";
+ private static final String TAG = "CrespoParts_General";
+
+ private CheckBoxPreference mDeepIdle;
+ private CheckBoxPreference mNotification;
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ addPreferencesFromResource(R.xml.general_preferences);
+
+ PreferenceScreen prefSet = getPreferenceScreen();
+ mDeepIdle = (CheckBoxPreference) findPreference(DeviceSettings.KEY_DEEPIDLE);
+ mNotification = (CheckBoxPreference) findPreference(DeviceSettings.KEY_NOTIFICATION);
+
+ if (isSupported(CPU_DEEPIDLE_FILE)) {
+ mDeepIdle.setChecked(PREF_ENABLED.equals(Utils.readOneLine(CPU_DEEPIDLE_FILE)));
+ } else {
+ mDeepIdle.setEnabled(false);
+ }
+
+ if (isSupported(TOUCHKEY_NOTIFICATION_FILE)) {
+ mNotification.setChecked(PREF_ENABLED.equals(Utils.readOneLine(TOUCHKEY_NOTIFICATION_FILE)));
+ } else {
+ mNotification.setEnabled(false);
+ }
+
+ Preference p = findPreference(DeviceSettings.KEY_DEEPIDLE_STATS);
+ if(p != null) {
+ p.setOnPreferenceClickListener(this);
+ }
+
+ }
+
+ @Override
+ public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
+
+ String boxValue;
+ String key = preference.getKey();
+
+ Log.w(TAG, "key: " + key);
+ if (key.equals(DeviceSettings.KEY_DEEPIDLE)) {
+ final CheckBoxPreference chkPref = (CheckBoxPreference) preference;
+ boxValue = chkPref.isChecked() ? "1" : "0";
+ Utils.writeValue(CPU_DEEPIDLE_FILE, boxValue);
+ } else if (key.equals(DeviceSettings.KEY_NOTIFICATION)) {
+ final CheckBoxPreference chkPref = (CheckBoxPreference) preference;
+ boxValue = chkPref.isChecked() ? "1" : "0";
+ Utils.writeValue(TOUCHKEY_NOTIFICATION_FILE, boxValue);
+ }
+
+ return true;
+ }
+
+ public static boolean isSupported(String FILE) {
+ return Utils.fileExists(FILE);
+ }
+
+ public static void restore(Context context) {
+ SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
+ if (isSupported(CPU_DEEPIDLE_FILE)) {
+ String sDefaultValue = Utils.readOneLine(CPU_DEEPIDLE_FILE);
+ Utils.writeValue(CPU_DEEPIDLE_FILE, sharedPrefs.getBoolean(DeviceSettings.KEY_DEEPIDLE,
+ PREF_ENABLED.equals(sDefaultValue)));
+ }
+ if (isSupported(TOUCHKEY_NOTIFICATION_FILE)) {
+ String sDefaultValue = Utils.readOneLine(TOUCHKEY_NOTIFICATION_FILE);
+ Utils.writeValue(TOUCHKEY_NOTIFICATION_FILE, sharedPrefs.getBoolean(DeviceSettings.KEY_NOTIFICATION,
+ PREF_ENABLED.equals(sDefaultValue)));
+ }
+ }
+
+ private void showIdleStatsDialog() {
+ // display dialog
+ final View content = getActivity().getLayoutInflater().inflate(R.layout.idle_stats_dialog, null);
+
+ String sStatsLine = Utils.readOneLine(CPU_DEEPIDLE_STATS);
+ String[] sValues = sStatsLine.split(" ");
+ ((TextView)content.findViewById(R.id.time1)).setText(sValues[0]);
+ ((TextView)content.findViewById(R.id.time2)).setText(sValues[2]);
+ ((TextView)content.findViewById(R.id.time3)).setText(sValues[4]);
+ ((TextView)content.findViewById(R.id.avg1)).setText(sValues[1]);
+ ((TextView)content.findViewById(R.id.avg2)).setText(sValues[3]);
+ ((TextView)content.findViewById(R.id.avg3)).setText(sValues[5]);
+
+ AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
+ builder.setTitle(getString(R.string.label_deepidle_stats));
+ builder.setView(content);
+ builder.setPositiveButton(getString(R.string.label_reset), new OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ Utils.writeValue(CPU_DEEPIDLE_RESET, "1");
+ dialog.dismiss();
+ }
+ });
+ builder.setNegativeButton(getString(R.string.label_close), new OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ dialog.dismiss();
+ }
+ });
+ builder.show();
+ }
+
+ @Override
+ public boolean onPreferenceClick(Preference preference) {
+ boolean ret = false;
+ if(preference.getKey().equals(DeviceSettings.KEY_DEEPIDLE_STATS)) {
+ showIdleStatsDialog();
+ ret = true;
+ }
+ return ret;
+ }
+}
diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/Hspa.java b/CrespoParts/src/com/cyanogenmod/settings/device/Hspa.java
new file mode 100644
index 0000000..2e68da2
--- /dev/null
+++ b/CrespoParts/src/com/cyanogenmod/settings/device/Hspa.java
@@ -0,0 +1,57 @@
+package com.cyanogenmod.settings.device;
+
+import android.content.Context;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.os.SystemProperties;
+import android.preference.Preference;
+import android.preference.Preference.OnPreferenceChangeListener;
+import android.preference.PreferenceManager;
+
+public class Hspa implements OnPreferenceChangeListener {
+
+ private static final String APK_FILE = "/system/app/SamsungServiceMode.apk";
+ private static final String HSPA_PROP = "ro.crespoparts.rild.hspa";
+ private static final String HSPA_PROP_ENABLED = "1";
+
+ private Context mCtx;
+
+ public Hspa(Context context) {
+ mCtx = context;
+ }
+
+ public static boolean isSupported() {
+ String mHspa = SystemProperties.get(HSPA_PROP,"0");
+ if (mHspa.equals(HSPA_PROP_ENABLED)) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * Restore HSPA setting from SharedPreferences. (Write to kernel.)
+ * @param context The context to read the SharedPreferences from
+ */
+ public static void restore(Context context) {
+ if (!isSupported()) {
+ return;
+ }
+
+ SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
+ sendIntent(context, sharedPrefs.getString(DeviceSettings.KEY_HSPA, "23"));
+ }
+
+ @Override
+ public boolean onPreferenceChange(Preference preference, Object newValue) {
+ sendIntent(mCtx, (String) newValue);
+ return true;
+ }
+
+ private static void sendIntent(Context context, String value) {
+ Intent i = new Intent("com.cyanogenmod.SamsungServiceMode.EXECUTE");
+ i.putExtra("sub_type", 20); // HSPA Setting
+ i.putExtra("data", value);
+ context.sendBroadcast(i);
+ }
+}
diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/Startup.java b/CrespoParts/src/com/cyanogenmod/settings/device/Startup.java
new file mode 100644
index 0000000..0728953
--- /dev/null
+++ b/CrespoParts/src/com/cyanogenmod/settings/device/Startup.java
@@ -0,0 +1,18 @@
+package com.cyanogenmod.settings.device;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+
+public class Startup extends BroadcastReceiver {
+
+ @Override
+ public void onReceive(final Context context, final Intent bootintent) {
+ GeneralFragmentActivity.restore(context);
+ ColorTuningPreference.restore(context);
+ GammaTuningPreference.restore(context);
+ if (Hspa.isSupported()) {
+ Hspa.restore(context);
+ }
+ }
+}
diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/Utils.java b/CrespoParts/src/com/cyanogenmod/settings/device/Utils.java
new file mode 100644
index 0000000..6b9c0d3
--- /dev/null
+++ b/CrespoParts/src/com/cyanogenmod/settings/device/Utils.java
@@ -0,0 +1,149 @@
+/*
+ * Copyright (C) 2011 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 com.cyanogenmod.settings.device;
+
+import android.util.Log;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.SyncFailedException;
+
+public class Utils {
+ private static final String TAG = "CrespoParts_Utils";
+ private static final String TAG_READ = "CrespoParts_Utils_Read";
+ private static final String TAG_WRITE = "CrespoParts_Utils_Write";
+
+ /**
+ * Write a string value to the specified file.
+ *
+ * @param filename The filename
+ * @param value The value
+ */
+ public static void writeValue(String filename, String value) {
+ FileOutputStream fos = null;
+ try {
+ fos = new FileOutputStream(new File(filename), false);
+ fos.write(value.getBytes());
+ fos.flush();
+ // fos.getFD().sync();
+ } catch (FileNotFoundException ex) {
+ Log.w(TAG, "file " + filename + " not found: " + ex);
+ } catch (SyncFailedException ex) {
+ Log.w(TAG, "file " + filename + " sync failed: " + ex);
+ } catch (IOException ex) {
+ Log.w(TAG, "IOException trying to sync " + filename + ": " + ex);
+ } catch (RuntimeException ex) {
+ Log.w(TAG, "exception while syncing file: ", ex);
+ } finally {
+ if (fos != null) {
+ try {
+ Log.w(TAG_WRITE, "file " + filename + ": " + value);
+ fos.close();
+ } catch (IOException ex) {
+ Log.w(TAG, "IOException while closing synced file: ", ex);
+ } catch (RuntimeException ex) {
+ Log.w(TAG, "exception while closing file: ", ex);
+ }
+ }
+ }
+
+ }
+
+ /**
+ * Write a string value to the specified file.
+ *
+ * @param filename The filename
+ * @param value The value
+ */
+ public static void writeValue(String filename, Boolean value) {
+ FileOutputStream fos = null;
+ String sEnvia;
+ try {
+ fos = new FileOutputStream(new File(filename), false);
+ if (value)
+ sEnvia = "1";
+ else
+ sEnvia = "0";
+ fos.write(sEnvia.getBytes());
+ fos.flush();
+ // fos.getFD().sync();
+ } catch (FileNotFoundException ex) {
+ Log.w(TAG, "file " + filename + " not found: " + ex);
+ } catch (SyncFailedException ex) {
+ Log.w(TAG, "file " + filename + " sync failed: " + ex);
+ } catch (IOException ex) {
+ Log.w(TAG, "IOException trying to sync " + filename + ": " + ex);
+ } catch (RuntimeException ex) {
+ Log.w(TAG, "exception while syncing file: ", ex);
+ } finally {
+ if (fos != null) {
+ try {
+ Log.w(TAG_WRITE, "file " + filename + ": " + value);
+ fos.close();
+ } catch (IOException ex) {
+ Log.w(TAG, "IOException while closing synced file: ", ex);
+ } catch (RuntimeException ex) {
+ Log.w(TAG, "exception while closing file: ", ex);
+ }
+ }
+ }
+ }
+
+ /**
+ * Write the "color value" to the specified file. The value is scaled from
+ * an integer to an unsigned integer by multiplying by 2.
+ *
+ * @param filename The filename
+ * @param value The value of max value Integer.MAX
+ */
+ public static void writeColor(String filename, int value) {
+ writeValue(filename, String.valueOf((long) value * 2));
+ }
+
+ /**
+ * Check if the specified file exists.
+ *
+ * @param filename The filename
+ * @return Whether the file exists or not
+ */
+ public static boolean fileExists(String filename) {
+ return new File(filename).exists();
+ }
+
+ // Read value from sysfs interface
+ public static String readOneLine(String sFile) {
+ BufferedReader brBuffer;
+ String sLine = null;
+
+ try {
+ brBuffer = new BufferedReader(new FileReader(sFile), 512);
+ try {
+ sLine = brBuffer.readLine();
+ } finally {
+ Log.w(TAG_READ, "file " + sFile + ": " + sLine);
+ brBuffer.close();
+ }
+ } catch (Exception e) {
+ Log.e(TAG_READ, "IO Exception when reading /sys/ file", e);
+ }
+ return sLine;
+ }
+}
diff --git a/board-info.txt b/board-info.txt
index ed4b08c..65f0e46 100644
--- a/board-info.txt
+++ b/board-info.txt
@@ -1,3 +1,4 @@
require board=herring
require version-bootloader=I9020XXKL1|I9020XXLC2
require version-baseband=I9020XXKI1|I9020UCKJ1|M200KRKC1
+
diff --git a/cm.dependencies b/cm.dependencies
new file mode 100644
index 0000000..68a8df7
--- /dev/null
+++ b/cm.dependencies
@@ -0,0 +1,7 @@
+[
+ {
+ "repository": "android_kernel_samsung_crespo",
+ "target_path": "kernel/samsung/crespo",
+ "branch": "ics"
+ }
+]
diff --git a/cm.mk b/cm.mk
new file mode 100644
index 0000000..101091d
--- /dev/null
+++ b/cm.mk
@@ -0,0 +1,19 @@
+# Inherit some common CM stuff.
+$(call inherit-product, vendor/cm/config/gsm.mk)
+
+PRODUCT_RELEASE_NAME := NS
+# Inherit some common CM stuff.
+$(call inherit-product, vendor/cm/config/common_full_phone.mk)
+
+# Inherit device configuration
+$(call inherit-product, device/samsung/crespo/full_crespo.mk)
+
+# Enhanced NFC
+$(call inherit-product, vendor/cm/config/nfc_enhanced.mk)
+
+PRODUCT_BUILD_PROP_OVERRIDES += PRODUCT_NAME=soju BUILD_FINGERPRINT=google/soju/crespo:4.0.4/IMM76D/299849:user/release-keys PRIVATE_BUILD_DESC="soju-user 4.0.4 IMM76D 299849 release-keys" BUILD_NUMBER=299849
+PRODUCT_NAME := cm_crespo
+PRODUCT_DEVICE := crespo
+PRODUCT_BRAND := Google
+PRODUCT_MODEL := Nexus S
+PRODUCT_MANUFACTURER := Samsung
diff --git a/device.mk b/device.mk
index cd50597..24ee408 100644
--- a/device.mk
+++ b/device.mk
@@ -51,3 +51,4 @@ $(call inherit-product, device/samsung/crespo/device_base.mk)
# commonly available
$(call inherit-product-if-exists, vendor/samsung/crespo/device-vendor.mk)
+$(call inherit-product-if-exists, vendor/samsung/crespo/device-vendor-blobs.mk)
diff --git a/device_base.mk b/device_base.mk
index 968e09d..edd2c77 100644
--- a/device_base.mk
+++ b/device_base.mk
@@ -1,3 +1,4 @@
+# Portions Copyright (C) 2012 VMware, Inc. All Rights Reserved.
# Copyright (C) 2010 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -39,7 +40,7 @@
# These is the hardware-specific overlay, which points to the location
# of hardware-specific resource overrides, typically the frameworks and
# application settings that are stored in resourced.
-DEVICE_PACKAGE_OVERLAYS := device/samsung/crespo/overlay
+DEVICE_PACKAGE_OVERLAYS += device/samsung/crespo/overlay
# These are the hardware-specific configuration files
PRODUCT_COPY_FILES := \
@@ -139,7 +140,7 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \
lights.s5pc110 \
hwcomposer.s5pc110 \
- sensors.herring
+ sensors.herring
# Camera
PRODUCT_PACKAGES += \
@@ -169,6 +170,10 @@ PRODUCT_PACKAGES += \
PRODUCT_COPY_FILES += \
device/samsung/crespo/mxt224_ts_input.idc:system/usr/idc/mxt224_ts_input.idc
+# Device app
+PRODUCT_PACKAGES += \
+ CrespoParts
+
# for bugmailer
PRODUCT_PACKAGES += send_bug
PRODUCT_COPY_FILES += \
@@ -214,21 +219,6 @@ PRODUCT_TAGS += dalvik.gc.type-precise
# Screen size is "normal", density is "hdpi"
PRODUCT_AAPT_CONFIG := normal hdpi
-ifeq ($(TARGET_PREBUILT_WIFI_MODULE),)
-LOCAL_WIFI_MODULE := device/samsung/crespo/bcm4329.ko
-else
-LOCAL_WIFI_MODULE := $(TARGET_PREBUILT_WIFI_MODULE)
-endif
-
-ifeq ($(TARGET_PREBUILT_KERNEL),)
-LOCAL_KERNEL := device/samsung/crespo/kernel
-else
-LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL)
-endif
-
-PRODUCT_COPY_FILES += \
- $(LOCAL_KERNEL):kernel
-
$(call inherit-product-if-exists, vendor/nxp/pn544/nxp-pn544-fw-vendor.mk)
WIFI_BAND := 802_11_BG
diff --git a/egl.cfg b/egl.cfg
index edf6a25..6ae513e 100644
--- a/egl.cfg
+++ b/egl.cfg
@@ -1 +1,2 @@
0 0 POWERVR_SGX540_120
+
diff --git a/factory-images/generate-factory-images-package.sh b/factory-images/generate-factory-images-package.sh
index 031f2fa..3a93723 100755
--- a/factory-images/generate-factory-images-package.sh
+++ b/factory-images/generate-factory-images-package.sh
@@ -46,3 +46,4 @@ BOOTLOADER=i9020xxka3
RADIO=m200krkc1
source ../../../common/generate-factory-images-common.sh
+
diff --git a/graphics.c b/graphics.c
new file mode 100644
index 0000000..4127c40
--- /dev/null
+++ b/graphics.c
@@ -0,0 +1,314 @@
+/*
+ * Copyright (C) 2007 The Android Open Source 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.
+ */
+
+#include <stdlib.h>
+#include <unistd.h>
+
+#include <fcntl.h>
+#include <stdio.h>
+
+#include <sys/ioctl.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+
+#include <linux/fb.h>
+#include <linux/kd.h>
+
+#include <pixelflinger/pixelflinger.h>
+
+#include "font_10x18.h"
+#include "minui.h"
+
+typedef struct {
+ GGLSurface texture;
+ unsigned cwidth;
+ unsigned cheight;
+ unsigned ascent;
+} GRFont;
+
+static GRFont *gr_font = 0;
+static GGLContext *gr_context = 0;
+static GGLSurface gr_font_texture;
+static GGLSurface gr_framebuffer[2];
+static GGLSurface gr_mem_surface;
+static unsigned gr_active_fb = 0;
+
+static int gr_fb_fd = -1;
+static int gr_vt_fd = -1;
+
+static struct fb_var_screeninfo vi;
+
+static int get_framebuffer(GGLSurface *fb)
+{
+ int fd;
+ struct fb_fix_screeninfo fi;
+ void *bits;
+
+ fd = open("/dev/graphics/fb0", O_RDWR);
+ if (fd < 0) {
+ perror("cannot open fb0");
+ return -1;
+ }
+
+ if (ioctl(fd, FBIOGET_FSCREENINFO, &fi) < 0) {
+ perror("failed to get fb0 info");
+ close(fd);
+ return -1;
+ }
+
+ if (ioctl(fd, FBIOGET_VSCREENINFO, &vi) < 0) {
+ perror("failed to get fb0 info");
+ close(fd);
+ return -1;
+ }
+
+ bits = mmap(0, fi.smem_len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+ if (bits == MAP_FAILED) {
+ perror("failed to mmap framebuffer");
+ close(fd);
+ return -1;
+ }
+
+ fb->version = sizeof(*fb);
+ fb->width = vi.xres;
+ fb->height = vi.yres;
+ fb->stride = vi.xres;
+ fb->data = bits;
+ fb->format = GGL_PIXEL_FORMAT_RGB_565;
+ memset(fb->data, 0, vi.yres * vi.xres * 2);
+
+ fb++;
+
+ fb->version = sizeof(*fb);
+ fb->width = vi.xres;
+ fb->height = vi.yres;
+ fb->stride = vi.xres;
+ fb->data = (void*) (((unsigned) bits) + vi.yres * vi.xres * 2);
+ fb->format = GGL_PIXEL_FORMAT_RGB_565;
+ memset(fb->data, 0, vi.yres * vi.xres * 2);
+
+ return fd;
+}
+
+static void get_memory_surface(GGLSurface* ms) {
+ ms->version = sizeof(*ms);
+ ms->width = vi.xres;
+ ms->height = vi.yres;
+ ms->stride = vi.xres;
+ ms->data = malloc(vi.xres * vi.yres * 2);
+ ms->format = GGL_PIXEL_FORMAT_RGB_565;
+}
+
+static void set_active_framebuffer(unsigned n)
+{
+ if (n > 1) return;
+ vi.yres_virtual = vi.yres * 2;
+ vi.yoffset = n * vi.yres;
+ vi.bits_per_pixel = 16;
+ if (ioctl(gr_fb_fd, FBIOPUT_VSCREENINFO, &vi) < 0) {
+ perror("active fb swap failed");
+ }
+}
+
+void gr_flip(void)
+{
+ GGLContext *gl = gr_context;
+
+ /* swap front and back buffers */
+ gr_active_fb = (gr_active_fb + 1) & 1;
+
+ /* copy data from the in-memory surface to the buffer we're about
+ * to make active. */
+ memcpy(gr_framebuffer[gr_active_fb].data, gr_mem_surface.data,
+ vi.xres * vi.yres * 2);
+
+ /* inform the display driver */
+ set_active_framebuffer(gr_active_fb);
+}
+
+void gr_color(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
+{
+ GGLContext *gl = gr_context;
+ GGLint color[4];
+ color[0] = ((r << 8) | r) + 1;
+ color[1] = ((g << 8) | g) + 1;
+ color[2] = ((b << 8) | b) + 1;
+ color[3] = ((a << 8) | a) + 1;
+ gl->color4xv(gl, color);
+}
+
+int gr_measure(const char *s)
+{
+ return gr_font->cwidth * strlen(s);
+}
+
+int gr_text(int x, int y, const char *s)
+{
+ GGLContext *gl = gr_context;
+ GRFont *font = gr_font;
+ unsigned off;
+
+ y -= font->ascent;
+
+ gl->bindTexture(gl, &font->texture);
+ gl->texEnvi(gl, GGL_TEXTURE_ENV, GGL_TEXTURE_ENV_MODE, GGL_REPLACE);
+ gl->texGeni(gl, GGL_S, GGL_TEXTURE_GEN_MODE, GGL_ONE_TO_ONE);
+ gl->texGeni(gl, GGL_T, GGL_TEXTURE_GEN_MODE, GGL_ONE_TO_ONE);
+ gl->enable(gl, GGL_TEXTURE_2D);
+
+ while((off = *s++)) {
+ off -= 32;
+ if (off < 96) {
+ gl->texCoord2i(gl, (off * font->cwidth) - x, 0 - y);
+ gl->recti(gl, x, y, x + font->cwidth, y + font->cheight);
+ }
+ x += font->cwidth;
+ }
+
+ return x;
+}
+
+void gr_fill(int x, int y, int w, int h)
+{
+ GGLContext *gl = gr_context;
+ gl->disable(gl, GGL_TEXTURE_2D);
+ gl->recti(gl, x, y, w, h);
+}
+
+void gr_blit(gr_surface source, int sx, int sy, int w, int h, int dx, int dy) {
+ if (gr_context == NULL) {
+ return;
+ }
+ GGLContext *gl = gr_context;
+
+ gl->bindTexture(gl, (GGLSurface*) source);
+ gl->texEnvi(gl, GGL_TEXTURE_ENV, GGL_TEXTURE_ENV_MODE, GGL_REPLACE);
+ gl->texGeni(gl, GGL_S, GGL_TEXTURE_GEN_MODE, GGL_ONE_TO_ONE);
+ gl->texGeni(gl, GGL_T, GGL_TEXTURE_GEN_MODE, GGL_ONE_TO_ONE);
+ gl->enable(gl, GGL_TEXTURE_2D);
+ gl->texCoord2i(gl, sx - dx, sy - dy);
+ gl->recti(gl, dx, dy, dx + w, dy + h);
+}
+
+unsigned int gr_get_width(gr_surface surface) {
+ if (surface == NULL) {
+ return 0;
+ }
+ return ((GGLSurface*) surface)->width;
+}
+
+unsigned int gr_get_height(gr_surface surface) {
+ if (surface == NULL) {
+ return 0;
+ }
+ return ((GGLSurface*) surface)->height;
+}
+
+static void gr_init_font(void)
+{
+ GGLSurface *ftex;
+ unsigned char *bits, *rle;
+ unsigned char *in, data;
+
+ gr_font = calloc(sizeof(*gr_font), 1);
+ ftex = &gr_font->texture;
+
+ bits = malloc(font.width * font.height);
+
+ ftex->version = sizeof(*ftex);
+ ftex->width = font.width;
+ ftex->height = font.height;
+ ftex->stride = font.width;
+ ftex->data = (void*) bits;
+ ftex->format = GGL_PIXEL_FORMAT_A_8;
+
+ in = font.rundata;
+ while((data = *in++)) {
+ memset(bits, (data & 0x80) ? 255 : 0, data & 0x7f);
+ bits += (data & 0x7f);
+ }
+
+ gr_font->cwidth = font.cwidth;
+ gr_font->cheight = font.cheight;
+ gr_font->ascent = font.cheight - 2;
+}
+
+int gr_init(void)
+{
+ gglInit(&gr_context);
+ GGLContext *gl = gr_context;
+
+ gr_init_font();
+ gr_vt_fd = open("/dev/tty0", O_RDWR | O_SYNC);
+ if (gr_vt_fd < 0) {
+ // This is non-fatal; post-Cupcake kernels don't have tty0.
+ perror("can't open /dev/tty0");
+ } else if (ioctl(gr_vt_fd, KDSETMODE, (void*) KD_GRAPHICS)) {
+ // However, if we do open tty0, we expect the ioctl to work.
+ perror("failed KDSETMODE to KD_GRAPHICS on tty0");
+ gr_exit();
+ return -1;
+ }
+
+ gr_fb_fd = get_framebuffer(gr_framebuffer);
+ if (gr_fb_fd < 0) {
+ gr_exit();
+ return -1;
+ }
+
+ get_memory_surface(&gr_mem_surface);
+
+ fprintf(stderr, "framebuffer: fd %d (%d x %d)\n",
+ gr_fb_fd, gr_framebuffer[0].width, gr_framebuffer[0].height);
+
+ /* start with 0 as front (displayed) and 1 as back (drawing) */
+ gr_active_fb = 0;
+ set_active_framebuffer(0);
+ gl->colorBuffer(gl, &gr_mem_surface);
+
+ gl->activeTexture(gl, 0);
+ gl->enable(gl, GGL_BLEND);
+ gl->blendFunc(gl, GGL_SRC_ALPHA, GGL_ONE_MINUS_SRC_ALPHA);
+
+ return 0;
+}
+
+void gr_exit(void)
+{
+ close(gr_fb_fd);
+ gr_fb_fd = -1;
+
+ free(gr_mem_surface.data);
+
+ ioctl(gr_vt_fd, KDSETMODE, (void*) KD_TEXT);
+ close(gr_vt_fd);
+ gr_vt_fd = -1;
+}
+
+int gr_fb_width(void)
+{
+ return gr_framebuffer[0].width;
+}
+
+int gr_fb_height(void)
+{
+ return gr_framebuffer[0].height;
+}
+
+gr_pixel *gr_fb_data(void)
+{
+ return (unsigned short *) gr_mem_surface.data;
+}
diff --git a/libcamera/Android.mk b/libcamera/Android.mk
index 58020f0..9abbf7e 100644
--- a/libcamera/Android.mk
+++ b/libcamera/Android.mk
@@ -12,7 +12,9 @@ LOCAL_C_INCLUDES += $(LOCAL_PATH)/../libs3cjpeg
LOCAL_C_INCLUDES += frameworks/native/include/media/hardware
LOCAL_SRC_FILES:= \
- SecCamera.cpp SecCameraHWInterface.cpp
+ SecCamera.cpp \
+ SecCameraHWInterface.cpp \
+ SecCameraUtils.cpp \
LOCAL_SHARED_LIBRARIES:= libutils libcutils libbinder liblog libcamera_client libhardware
LOCAL_SHARED_LIBRARIES+= libs3cjpeg
diff --git a/libcamera/SecCamera.cpp b/libcamera/SecCamera.cpp
index 2544d09..81bc3fb 100755
--- a/libcamera/SecCamera.cpp
+++ b/libcamera/SecCamera.cpp
@@ -2457,9 +2457,6 @@ int SecCamera::setObjectPosition(int x, int y)
{
ALOGV("%s(setObjectPosition(x=%d, y=%d))", __func__, x, y);
- if (m_preview_width ==640)
- x = x - 80;
-
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_OBJECT_POSITION_X, x) < 0) {
ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_OBJECT_POSITION_X", __func__);
return -1;
diff --git a/libcamera/SecCameraHWInterface.cpp b/libcamera/SecCameraHWInterface.cpp
index ab60bd2..63574e6 100755
--- a/libcamera/SecCameraHWInterface.cpp
+++ b/libcamera/SecCameraHWInterface.cpp
@@ -21,6 +21,8 @@
#include <utils/Log.h>
#include "SecCameraHWInterface.h"
+#include "SecCameraUtils.h"
+
#include <utils/threads.h>
#include <fcntl.h>
#include <sys/mman.h>
@@ -282,6 +284,10 @@ void CameraHardwareSec::initDefaultParameters(int cameraId)
p.set(CameraParameters::KEY_PREVIEW_FPS_RANGE, "15000,30000");
p.set(CameraParameters::KEY_FOCAL_LENGTH, "3.43");
+
+ // touch focus
+ p.set(CameraParameters::KEY_MAX_NUM_FOCUS_AREAS, "1");
+ p.set(CameraParameters::KEY_FOCUS_AREAS, "(0,0,0,0,0)");
} else {
p.set(CameraParameters::KEY_SUPPORTED_PREVIEW_FPS_RANGE, "(7500,30000)");
p.set(CameraParameters::KEY_PREVIEW_FPS_RANGE, "7500,30000");
@@ -1955,6 +1961,29 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
mParameters.set(CameraParameters::KEY_SCENE_MODE, new_scene_mode_str);
}
}
+
+ // touch to focus
+ const char *new_focus_area = params.get(CameraParameters::KEY_FOCUS_AREAS);
+ if (new_focus_area != NULL) {
+ LOGI("focus area: %s", new_focus_area);
+ SecCameraArea area(new_focus_area);
+
+ if (!area.isDummy()) {
+ int width, height, frame_size;
+ mSecCamera->getPreviewSize(&width, &height, &frame_size);
+
+ int x = area.getX(width);
+ int y = area.getY(height);
+
+ LOGI("area=%s, x=%i, y=%i", area.toString8().string(), x, y);
+ if (mSecCamera->setObjectPosition(x, y) < 0) {
+ LOGE("ERR(%s):Fail on mSecCamera->setObjectPosition(%s)", __func__, new_focus_area);
+ ret = UNKNOWN_ERROR;
+ }
+ }
+
+ int val = area.isDummy() ? 0 : 1;
+ }
} else {
if (!isSupportedParameter(new_focus_mode_str,
mParameters.get(CameraParameters::KEY_SUPPORTED_FOCUS_MODES))) {
diff --git a/libcamera/SecCameraUtils.cpp b/libcamera/SecCameraUtils.cpp
new file mode 100644
index 0000000..c8dc8ee
--- /dev/null
+++ b/libcamera/SecCameraUtils.cpp
@@ -0,0 +1,72 @@
+/*
+**
+** Copyright 2011, Havlena Petr <havlenapetr@gmail.com>
+** Copyright 2011, 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.
+*/
+
+#include "SecCameraUtils.h"
+#include <stdlib.h>
+
+namespace android {
+
+SecCameraArea::SecCameraArea(int left, int top, int right, int bottom, int weight) :
+ m_left(left),
+ m_top(top),
+ m_right(right),
+ m_bottom(bottom),
+ m_weight(weight)
+{
+}
+
+SecCameraArea::SecCameraArea(const char* str) {
+ char* end;
+
+ if (str != NULL && str[0] == '(') {
+ m_left = (int)strtol(str+1, &end, 10);
+ if (*end != ',') goto error;
+ m_top = (int)strtol(end+1, &end, 10);
+ if (*end != ',') goto error;
+ m_right = (int)strtol(end+1, &end, 10);
+ if (*end != ',') goto error;
+ m_bottom = (int)strtol(end+1, &end, 10);
+ if (*end != ',') goto error;
+ m_weight = (int)strtol(end+1, &end, 10);
+ if (*end != ')') goto error;
+ }
+
+ return;
+
+error:
+ m_left = m_top = m_right = m_bottom = m_weight = 0;
+}
+
+int SecCameraArea::getX(int width) {
+ return (((m_left + m_right) / 2) + 1000) * width / 2000;
+}
+
+int SecCameraArea::getY(int height) {
+ return (((m_top + m_bottom) / 2) + 1000) * height / 2000;
+}
+
+bool SecCameraArea::isDummy() {
+ return m_left == 0 && m_top == 0 && m_right == 0 && m_bottom == 0;
+}
+
+String8 SecCameraArea::toString8() {
+ return String8::format("(%d,%d,%d,%d,%d)",
+ m_left, m_top, m_right, m_bottom, m_weight);
+}
+
+} \ No newline at end of file
diff --git a/libcamera/SecCameraUtils.h b/libcamera/SecCameraUtils.h
new file mode 100644
index 0000000..ea7896f
--- /dev/null
+++ b/libcamera/SecCameraUtils.h
@@ -0,0 +1,44 @@
+/*
+**
+** Copyright 2011, Havlena Petr <havlenapetr@gmail.com>
+** Copyright 2011, 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.
+*/
+
+#ifndef ANDROID_HARDWARE_CAMERA_SEC_UTILS_H
+#define ANDROID_HARDWARE_CAMERA_SEC_UTILS_H
+
+#include <utils/String8.h>
+
+namespace android {
+
+struct SecCameraArea {
+ int m_left;
+ int m_top;
+ int m_right;
+ int m_bottom;
+ int m_weight;
+
+ SecCameraArea(int left = 0, int top = 0, int right = 0, int bottom = 0, int weight = 0);
+ SecCameraArea(const char* str);
+
+ int getX(int width);
+ int getY(int height);
+ bool isDummy();
+ String8 toString8();
+};
+
+}; // namespace android
+
+#endif // ANDROID_HARDWARE_CAMERA_SEC_UTILS_H \ No newline at end of file
diff --git a/liblight/lights.c b/liblight/lights.c
index bee698a..7f2d91d 100755
--- a/liblight/lights.c
+++ b/liblight/lights.c
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2008 The Android Open Source Project
+ * Copyright (C) 2011 <kang@insecure.ws>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,6 +15,7 @@
* limitations under the License.
*/
+// #define LOG_NDEBUG 0
#define LOG_TAG "lights"
#include <cutils/log.h>
#include <stdint.h>
@@ -29,13 +31,12 @@ static pthread_once_t g_init = PTHREAD_ONCE_INIT;
static pthread_mutex_t g_lock = PTHREAD_MUTEX_INITIALIZER;
char const *const LCD_FILE = "/sys/class/backlight/s5p_bl/brightness";
+char const *const LED_FILE = "/sys/class/misc/notification/led";
static int write_int(char const *path, int value)
{
int fd;
- static int already_warned;
-
- already_warned = 0;
+ static int already_warned = 0;
ALOGV("write_int: path %s, value %d", path, value);
fd = open(path, O_RDWR);
@@ -63,6 +64,25 @@ static int rgb_to_brightness(struct light_state_t const *state)
+ (150*((color>>8) & 0x00ff)) + (29*(color & 0x00ff))) >> 8;
}
+static int set_light_notifications(struct light_device_t* dev,
+ struct light_state_t const* state)
+{
+ int brightness = rgb_to_brightness(state);
+ int v = 0;
+ int ret = 0;
+
+ pthread_mutex_lock(&g_lock);
+ if (brightness+state->color == 0 || brightness > 100) {
+ if (state->color & 0x00ffffff)
+ v = 1;
+ } else
+ v = 0;
+ LOGI("color %u fm %u status %u is lit %u brightness", state->color, state->flashMode, v, (state->color & 0x00ffffff), brightness);
+ ret = write_int(LED_FILE, v);
+ pthread_mutex_unlock(&g_lock);
+ return ret;
+}
+
static int set_light_backlight(struct light_device_t *dev,
struct light_state_t const *state)
{
@@ -95,6 +115,8 @@ static int open_lights(const struct hw_module_t *module, char const *name,
if (0 == strcmp(LIGHT_ID_BACKLIGHT, name))
set_light = set_light_backlight;
+ else if (0 == strcmp(LIGHT_ID_NOTIFICATIONS, name))
+ set_light = set_light_notifications;
else
return -EINVAL;
diff --git a/libs3cjpeg/Android.mk b/libs3cjpeg/Android.mk
index af1f88e..086e7aa 100644
--- a/libs3cjpeg/Android.mk
+++ b/libs3cjpeg/Android.mk
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-ifeq ($(filter-out s5pc110,$(TARGET_BOARD_PLATFORM)),)
+ifneq ($(filter crespo crespo4g,$(TARGET_DEVICE)),)
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index d480b15..d619a60 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -208,7 +208,10 @@
<bool name="config_ui_enableFadingMarquee">false</bool>
+ <bool name="config_bluetooth_adapter_quick_switch">false</bool>
+
<!-- The attenuation in dB applied to the sound effects played
through AudioManager.playSoundEffect() when no volume is specified. -->
<integer name="config_soundEffectVolumeDb">-12</integer>
+
</resources>
diff --git a/overlay/frameworks/base/packages/SystemUI/res/values/config.xml b/overlay/frameworks/base/packages/SystemUI/res/values/config.xml
new file mode 100644
index 0000000..555da6b
--- /dev/null
+++ b/overlay/frameworks/base/packages/SystemUI/res/values/config.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2009, The Android Open Source 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+
+ <!-- Control whether status bar should distinguish HSPA data icon form UMTS
+ data icon on devices -->
+ <bool name="config_hspa_data_distinguishable">true</bool>
+
+</resources>
+
diff --git a/sec_mm/sec_omx/sec_codecs/video/mfc_c110/include/SsbSipMfcApi.h b/sec_mm/sec_omx/sec_codecs/video/mfc_c110/include/SsbSipMfcApi.h
index 3c10390..e15f96a 100644
--- a/sec_mm/sec_omx/sec_codecs/video/mfc_c110/include/SsbSipMfcApi.h
+++ b/sec_mm/sec_omx/sec_codecs/video/mfc_c110/include/SsbSipMfcApi.h
@@ -23,7 +23,7 @@
#define MAX_DECODER_INPUT_BUFFER_SIZE (1024 * 3072)
#define MAX_ENCODER_OUTPUT_BUFFER_SIZE (1024 * 3072)
-#define MMAP_BUFFER_SIZE_MMAP (70*1024*1024)
+#define MMAP_BUFFER_SIZE_MMAP (20*1024*1024)
#define S5PC110_MFC_DEV_NAME "/dev/s3c-mfc"
diff --git a/vendorsetup.sh b/vendorsetup.sh
deleted file mode 100755
index f5faebf..0000000
--- a/vendorsetup.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# Copyright (C) 2008 The Android Open Source 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.
-#
-
-# This file is executed by build/envsetup.sh, and can use anything
-# defined in envsetup.sh.
-#
-# In particular, you can add lunch options with the add_lunch_combo
-# function: add_lunch_combo generic-eng
-
-add_lunch_combo full_crespo-userdebug