Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

initial commit

  • Loading branch information...
commit b29cfde7d8780da71ccf61ed166219a7323947a2 0 parents
@codeworkx codeworkx authored
Showing with 6,256 additions and 0 deletions.
  1. +29 −0 Android.mk
  2. +18 −0 AndroidProducts.mk
  3. +34 −0 BoardConfig.mk
  4. +51 −0 CleanSpec.mk
  5. +15 −0 DeviceSettings/Android.mk
  6. +30 −0 DeviceSettings/AndroidManifest.xml
  7. BIN  DeviceSettings/res/drawable/ic_launcher_cmdevicesettings.png
  8. +5 −0 DeviceSettings/res/layout/top.xml
  9. +69 −0 DeviceSettings/res/values-de/arrays.xml
  10. +40 −0 DeviceSettings/res/values-de/strings.xml
  11. +58 −0 DeviceSettings/res/values-es/arrays.xml
  12. +39 −0 DeviceSettings/res/values-es/strings.xml
  13. +60 −0 DeviceSettings/res/values-fi/arrays.xml
  14. +40 −0 DeviceSettings/res/values-fi/strings.xml
  15. +51 −0 DeviceSettings/res/values-fr/arrays.xml
  16. +34 −0 DeviceSettings/res/values-fr/strings.xml
  17. +51 −0 DeviceSettings/res/values-hu/arrays.xml
  18. +40 −0 DeviceSettings/res/values-hu/strings.xml
  19. +50 −0 DeviceSettings/res/values-nl/arrays.xml
  20. +40 −0 DeviceSettings/res/values-nl/strings.xml
  21. +51 −0 DeviceSettings/res/values-pt-rBR/arrays.xml
  22. +35 −0 DeviceSettings/res/values-pt-rBR/strings.xml
  23. +135 −0 DeviceSettings/res/values/arrays.xml
  24. +42 −0 DeviceSettings/res/values/strings.xml
  25. +13 −0 DeviceSettings/res/xml/haptic_preferences.xml
  26. +64 −0 DeviceSettings/res/xml/mdnie_preferences.xml
  27. +12 −0 DeviceSettings/res/xml/radio_preferences.xml
  28. +39 −0 DeviceSettings/res/xml/sensors_preferences.xml
  29. +159 −0 DeviceSettings/src/com/cyanogenmod/settings/device/DeviceSettings.java
  30. +66 −0 DeviceSettings/src/com/cyanogenmod/settings/device/HapticFragmentActivity.java
  31. +67 −0 DeviceSettings/src/com/cyanogenmod/settings/device/Hspa.java
  32. +60 −0 DeviceSettings/src/com/cyanogenmod/settings/device/PanelGamma.java
  33. +66 −0 DeviceSettings/src/com/cyanogenmod/settings/device/RadioFragmentActivity.java
  34. +109 −0 DeviceSettings/src/com/cyanogenmod/settings/device/SensorsFragmentActivity.java
  35. +38 −0 DeviceSettings/src/com/cyanogenmod/settings/device/Startup.java
  36. +59 −0 DeviceSettings/src/com/cyanogenmod/settings/device/TouchkeyTimeout.java
  37. +59 −0 DeviceSettings/src/com/cyanogenmod/settings/device/TouchscreenSensitivity.java
  38. +143 −0 DeviceSettings/src/com/cyanogenmod/settings/device/Utils.java
  39. +59 −0 DeviceSettings/src/com/cyanogenmod/settings/device/VibratorIntensity.java
  40. +57 −0 DeviceSettings/src/com/cyanogenmod/settings/device/mDNIeFragmentActivity.java
  41. +59 −0 DeviceSettings/src/com/cyanogenmod/settings/device/mDNIeMode.java
  42. +59 −0 DeviceSettings/src/com/cyanogenmod/settings/device/mDNIeNegative.java
  43. +58 −0 DeviceSettings/src/com/cyanogenmod/settings/device/mDNIeOutdoor.java
  44. +59 −0 DeviceSettings/src/com/cyanogenmod/settings/device/mDNIeScenario.java
  45. +3 −0  board-info.txt
  46. +19 −0 cm.dependencies
  47. +36 −0 cm.mk
  48. +33 −0 full_i9100.mk
  49. +60 −0 i9100.mk
  50. +145 −0 overlay/frameworks/base/core/res/res/values/config.xml
  51. +13 −0 recovery.fstab
  52. +6 −0 system.prop
  53. +24 −0 usr/idc/melfas_ts.idc
  54. +24 −0 usr/idc/mxt224_ts_input.idc
  55. +28 −0 usr/idc/qwerty.idc
  56. +28 −0 usr/idc/qwerty2.idc
  57. +56 −0 usr/idc/sec_touchscreen.idc
  58. +672 −0 usr/keychars/Generic.kcm
  59. +544 −0 usr/keychars/Virtual.kcm
  60. +508 −0 usr/keychars/qwerty.kcm
  61. +505 −0 usr/keychars/qwerty2.kcm
  62. +23 −0 usr/keylayout/AVRCP.kl
  63. +421 −0 usr/keylayout/Generic.kl
  64. +46 −0 usr/keylayout/Vendor_045e_Product_028e.kl
  65. +37 −0 usr/keylayout/Vendor_046d_Product_c216.kl
  66. +53 −0 usr/keylayout/Vendor_046d_Product_c294.kl
  67. +62 −0 usr/keylayout/Vendor_046d_Product_c299.kl
  68. +133 −0 usr/keylayout/Vendor_046d_Product_c532.kl
  69. +76 −0 usr/keylayout/Vendor_054c_Product_0268.kl
  70. +119 −0 usr/keylayout/Vendor_05ac_Product_0239.kl
  71. +105 −0 usr/keylayout/Vendor_22b8_Product_093d.kl
  72. +11 −0 usr/keylayout/gpio-keys.kl
  73. +6 −0 usr/keylayout/max8997-muic.kl
  74. +3 −0  usr/keylayout/melfas-touchkey.kl
  75. +112 −0 usr/keylayout/qwerty.kl
  76. +10 −0 usr/keylayout/samsung-keypad.kl
  77. +11 −0 usr/keylayout/sec_key.kl
  78. +2 −0  usr/keylayout/sec_touchkey.kl
29 Android.mk
@@ -0,0 +1,29 @@
+#
+# Copyright (C) 2012 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.
+#
+
+# WARNING: Everything listed here will be built on ALL platforms,
+# including x86, the emulator, and the SDK. Modules must be uniquely
+# named (liblights.tuna), and must build everywhere, or limit themselves
+# to only building on ARM if they include assembly. Individual makefiles
+# are responsible for having their own logic, for fine-grained control.
+
+LOCAL_PATH := $(call my-dir)
+
+ifeq ($(TARGET_DEVICE),i9100)
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
+
+endif
18 AndroidProducts.mk
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2012 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.
+#
+
+PRODUCT_MAKEFILES := \
+ $(LOCAL_DIR)/full_i9100.mk
34 BoardConfig.mk
@@ -0,0 +1,34 @@
+#
+# Copyright (C) 2012 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.
+#
+
+# This variable is set first, so it can be overridden
+# by BoardConfigVendor.mk
+
+-include device/samsung/galaxys2-common/BoardCommonConfig.mk
+
+TARGET_BOARD_INFO_FILE := device/samsung/i9100/board-info.txt
+
+# Inline kernel building
+TARGET_KERNEL_SOURCE := kernel/samsung/smdk4210
+TARGET_KERNEL_CONFIG := cyanogenmod_i9100_defconfig
+
+TARGET_SPECIFIC_HEADER_PATH += device/samsung/i9100/overlay/include
+EXYNOS4210_ENHANCEMENTS := true
+# assert
+TARGET_OTA_ASSERT_DEVICE := galaxys2,i9100,GT-I9100,GT-I9100M,GT-I9100P,GT-I9100T
+
+# Use the non-open-source parts, if they're present
+-include vendor/samsung/i9100/BoardConfigVendor.mk
51 CleanSpec.mk
@@ -0,0 +1,51 @@
+# Copyright (C) 2012 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.
+#
+
+# If you don't need to do a full clean build but would like to touch
+# a file or delete some intermediate files, add a clean step to the end
+# of the list. These steps will only be run once, if they haven't been
+# run before.
+#
+# E.g.:
+# $(call add-clean-step, touch -c external/sqlite/sqlite3.h)
+# $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates)
+#
+# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with
+# files that are missing or have been moved.
+#
+# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory.
+# Use $(OUT_DIR) to refer to the "out" directory.
+#
+# If you need to re-do something that's already mentioned, just copy
+# the command and add it to the bottom of the list. E.g., if a change
+# that you made last week required touching a file and a change you
+# made today requires touching the same file, just copy the old
+# touch step and add it to the end of the list.
+#
+# ************************************************
+# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
+# ************************************************
+
+# For example:
+#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates)
+#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates)
+#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f)
+#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)
+
+# ************************************************
+# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
+# ************************************************
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/default.prop)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/Phone_intermediates)
15 DeviceSettings/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 := GalaxyS2Settings
+LOCAL_CERTIFICATE := platform
+
+include $(BUILD_PACKAGE)
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
30 DeviceSettings/AndroidManifest.xml
@@ -0,0 +1,30 @@
+<?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=".mDNIeFragmentActivity" />
+ <activity android:name=".RadioFragmentActivity" />
+
+ </application>
+</manifest>
BIN  DeviceSettings/res/drawable/ic_launcher_cmdevicesettings.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 DeviceSettings/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" />
+
69 DeviceSettings/res/values-de/arrays.xml
@@ -0,0 +1,69 @@
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <string-array name="mdnie_scenario_entries">
+ <item>Kamera (Standard)</item>
+ <item>Video</item>
+ <item>Video warm</item>
+ <item>Video kalt</item>
+ <item>UI</item>
+ <item>Navigation</item>
+ <item>Gallerie</item>
+ <item>VT</item>
+ </string-array>
+
+ <string-array name="mdnie_mode_entries">
+ <item>Standard</item>
+ <item>Dynamisch</item>
+ <item>Natürlich</item>
+ <item>Film</item>
+ </string-array>
+
+ <string-array name="mdnie_negative_entries">
+ <item>Normal</item>
+ <item>Invertiert</item>
+ </string-array>
+
+ <string-array name="mdnie_outdoor_entries">
+ <item>Deaktiviert</item>
+ <item>Aktiviert</item>
+ </string-array>
+
+ <string-array name="panel_gamma_entries">
+ <item>2.2 (Standard)</item>
+ <item>1.9</item>
+ </string-array>
+
+ <string-array name="touchscreen_sensitivity_entries">
+ <item>10</item>
+ <item>20</item>
+ <item>30</item>
+ <item>50 (Standard)</item>
+ <item>70</item>
+ <item>100</item>
+ </string-array>
+
+ <string-array name="vibrator_intensity_entries">
+ <item>0%</item>
+ <item>25%</item>
+ <item>50% (Standard)</item>
+ <item>75%</item>
+ <item>100%</item>
+ </string-array>
+
+ <string-array name="hspa_entries">
+ <item>Nur UMTS</item>
+ <item>Nur HSDPA</item>
+ <item>HSDPA + HSUPA</item>
+ </string-array>
+
+ <string-array name="touchkey_timeout_entries">
+ <item>Niemals</item>
+ <item>1 Sekunde</item>
+ <item>2 Sekunden</item>
+ <item>3 Sekunden (Standard)</item>
+ <item>4 Sekunden</item>
+ <item>5 Sekunden</item>
+ <item>6 Sekunden</item>
+ </string-array>
+
+</resources>
40 DeviceSettings/res/values-de/strings.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="app_name">Galaxy S II Einstellungen</string>
+
+ <string name="screen_colors_title">Farben</string>
+ <string name="category_mdnie_title">Bildschirm</string>
+ <string name="mdnie_scenario_title_head">Szenario</string>
+ <string name="mdnie_scenario_summary_head">Wähle das mDNIe Szenario</string>
+ <string name="mdnie_mode_title_head">Modus</string>
+ <string name="mdnie_mode_summary_head">Wähle den mDNIe Modus</string>
+ <string name="mdnie_negative_title_head">Negativ Modus</string>
+ <string name="mdnie_negative_summary_head">Aktiviert/Deaktiviert negierte Farben</string>
+ <string name="mdnie_outdoor_title_head">Outdoor Modus</string>
+ <string name="mdnie_outdoor_summary_head">Aktiviert/Deaktiviert den Outdoor Modus</string>
+ <string name="panel_gamma_title_head">Gamma Einstellung</string>
+ <string name="panel_gamma_summary_head">Setzt den Gamma Wert</string>
+
+ <string name="touchscreen_subcat_title">Touchscreen</string>
+ <string name="touchscreen_sensitivity_title_head">Sensitivität</string>
+ <string name="touchscreen_sensitivity_summary_head">Setzt die Touchpanel Sensitivität</string>
+
+ <string name="category_sensors_title">Sensoren</string>
+ <string name="gyro_subcat_title">Gyroskop</string>
+ <string name="use_gyro_calibration_title_head">Kalibierungsdaten</string>
+ <string name="use_gyro_calibration_summary_head">Benutze Kalibrierungswerte. Bitte nach Aktivierung eine Kalibrierung durchführen!</string>
+ <string name="calibrate_gyro_title_head">Kalibrieren</string>
+ <string name="calibrate_gyro_summary_head">Lege dein Telefon auf einen geraden Untergrund und starte die Kalibrierung.</string>
+ <string name="touchkey_subcat_title">Touch-Tasten</string>
+ <string name="touchkey_light_title_head">Aktiviere Tastenbeleuchtung</string>
+ <string name="touchkey_light_summary_head">Tasten leuchten auf während der Birdschirm aktiv ist</string>
+
+ <string name="category_haptic_title">Haptik</string>
+ <string name="vibrator_subcat_title">Vibrator</string>
+ <string name="vibrator_intensity_title_head">Vibrator Intensität</string>
+ <string name="vibrator_intensity_summary_head">Setze Vibrator Intensität</string>
+
+ <string name="category_radio_title">Mobilfunk</string>
+ <string name="hspa_title_head">HSPA</string>
+ <string name="hspa_summary_head">Aktiviert HSDPA/HSUPA</string>
+</resources>
58 DeviceSettings/res/values-es/arrays.xml
@@ -0,0 +1,58 @@
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <string-array name="hspa_entries">
+ <item>Solo UMTS</item>
+ <item>Solo HSDPA</item>
+ <item>HSDPA + HSUPA</item>
+ </string-array>
+
+ <string-array name="mdnie_scenario_entries">
+ <item>Cámara (Predeterminado)</item>
+ <item>Video</item>
+ <item>Video Cálido</item>
+ <item>Video Frío</item>
+ <item>UI</item>
+ <item>Navegación</item>
+ <item>Galería</item>
+ <item>VT</item>
+ </string-array>
+
+ <string-array name="mdnie_mode_entries">
+ <item>Estándar (Predeterminado)</item>
+ <item>Dinámico</item>
+ <item>Natural</item>
+ <item>Película</item>
+ </string-array>
+
+ <string-array name="mdnie_negative_entries">
+ <item>Normal</item>
+ <item>Invertido</item>
+ </string-array>
+
+ <string-array name="mdnie_outdoor_entries">
+ <item>Desactivado (Predeterminado)</item>
+ <item>Activado</item>
+ </string-array>
+
+ <string-array name="panel_gamma_entries">
+ <item>2.2 (Predeterminado)</item>
+ <item>1.9</item>
+ </string-array>
+
+ <string-array name="touchscreen_sensitivity_entries">
+ <item>10</item>
+ <item>20</item>
+ <item>30</item>
+ <item>50 (Predeterminado)</item>
+ <item>70</item>
+ <item>100</item>
+ </string-array>
+
+ <string-array name="vibrator_intensity_entries">
+ <item>0%</item>
+ <item>25%</item>
+ <item>50% (Predeterminado)</item>
+ <item>75%</item>
+ <item>100%</item>
+ </string-array>
+</resources>
39 DeviceSettings/res/values-es/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="app_name">Ajustes de Galaxy S II</string>
+
+ <string name="category_radio_title">Radio</string>
+ <string name="hspa_title_head">HSPA</string>
+ <string name="hspa_summary_head">Activar HSDPA/HSUPA</string>
+
+ <string name="category_mdnie_title">Pantalla</string>
+ <string name="screen_colors_title">Colores</string>
+ <string name="mdnie_scenario_title_head">Escenario</string>
+ <string name="mdnie_scenario_summary_head">Establecer el escenario mDNIe</string>
+ <string name="mdnie_mode_title_head">Modo</string>
+ <string name="mdnie_mode_summary_head">Establecer el modo mDNIe</string>
+ <string name="mdnie_negative_title_head">Modo Negativo</string>
+ <string name="mdnie_negative_summary_head">Activar/Desactivar los colores invertidos</string>
+ <string name="mdnie_outdoor_title_head">Modo Exterior</string>
+ <string name="mdnie_outdoor_summary_head">Activar/Desactivar el modo exterior</string>
+ <string name="panel_gamma_title_head">Gamma</string>
+ <string name="panel_gamma_summary_head">Establecer el valor gamma de la pantalla</string>
+ <string name="touchscreen_subcat_title">Pantalla Táctil</string>
+ <string name="touchscreen_sensitivity_title_head">Sensibilidad táctil</string>
+ <string name="touchscreen_sensitivity_summary_head">Establecer la sensibilidad táctil de la pantalla</string>
+
+ <string name="category_sensors_title">Sensores</string>
+ <string name="gyro_subcat_title">Giroscopio</string>
+ <string name="use_gyro_calibration_title_head">Usar datos de calibración</string>
+ <string name="use_gyro_calibration_summary_head">Usar los datos de calibración del giroscopio. ¡Calibrar despues de activar!</string>
+ <string name="calibrate_gyro_title_head">Calibrar</string>
+ <string name="calibrate_gyro_summary_head">Colocar el dispositivo en una superficie plana y pulsar para calibrar</string>
+ <string name="touchkey_subcat_title">Botones Táctiles</string>
+ <string name="touchkey_light_title_head">Activar iluminación</string>
+ <string name="touchkey_light_summary_head">Iluminar los botones táctiles al encender la pantalla</string>
+
+ <string name="category_haptic_title">Háptica</string>
+ <string name="vibrator_subcat_title">Vibración</string>
+ <string name="vibrator_intensity_title_head">Intensidad de vibración</string>
+ <string name="vibrator_intensity_summary_head">Establecer la intensidad de la vibración</string>
+</resources>
60 DeviceSettings/res/values-fi/arrays.xml
@@ -0,0 +1,60 @@
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <string-array name="mdnie_scenario_entries">
+ <item>Kamera (Oletus)</item>
+ <item>Video</item>
+ <item>Video(Lämmin)</item>
+ <item>Video(Kylmä)</item>
+ <item>Käyttöliittymä</item>
+ <item>Navigointi</item>
+ <item>Galleria</item>
+ <item>VT</item>
+ </string-array>
+
+ <string-array name="mdnie_mode_entries">
+ <item>Standardi (Oletus)</item>
+ <item>Dynaaminen</item>
+ <item>Luonnollinen</item>
+ <item>Elokuva</item>
+ </string-array>
+
+ <string-array name="mdnie_negative_entries">
+ <item>Normaali</item>
+ <item>Käänteinen</item>
+ </string-array>
+
+ <string-array name="mdnie_outdoor_entries">
+ <item>Pois päältä (Oletus)</item>
+ <item>Päällä</item>
+ </string-array>
+
+ <string-array name="panel_gamma_entries">
+ <item>2.2 (Oletus)</item>
+ <item>1.9</item>
+ </string-array>
+
+ <string-array name="touchscreen_sensitivity_entries">
+ <item>10</item>
+ <item>20</item>
+ <item>30</item>
+ <item>50 (Oletus)</item>
+ <item>70</item>
+ <item>100</item>
+ </string-array>
+
+ <string-array name="hspa_entries">
+ <item>Vain UMTS</item>
+ <item>Vain HSDPA</item>
+ <item>HSDPA + HSUPA</item>
+ </string-array>
+
+ <string-array name="vibrator_intensity_entries">
+ <item>0%</item>
+ <item>25%</item>
+ <item>50% (Oletus)</item>
+ <item>75%</item>
+ <item>100%</item>
+ </string-array>
+
+
+</resources>
40 DeviceSettings/res/values-fi/strings.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="app_name">Galaxy S II-asetukset</string>
+
+ <string name="screen_colors_title">Värit</string>
+ <string name="category_mdnie_title">Näyttö</string>
+ <string name="mdnie_scenario_title_head">Skenaario</string>
+ <string name="mdnie_scenario_summary_head">Vaihda mDNIe-skenaario</string>
+ <string name="mdnie_mode_title_head">Tila</string>
+ <string name="mdnie_mode_summary_head">Vaihda mDNIe-tila</string>
+ <string name="mdnie_negative_title_head">Negatiivi-tila</string>
+ <string name="mdnie_negative_summary_head">Käytä käänteisiä värejä</string>
+ <string name="mdnie_outdoor_title_head">Ulkoilma-tila</string>
+ <string name="mdnie_outdoor_summary_head">Ota ulkoilma-tila käyttöön</string>
+ <string name="panel_gamma_title_head">Näytön gamma</string>
+ <string name="panel_gamma_summary_head">Säädä näytön gamma-arvo</string>
+
+ <string name="touchscreen_subcat_title">Kosketusnäyttö</string>
+ <string name="touchscreen_sensitivity_title_head">Kosketuksen herkkyys</string>
+ <string name="touchscreen_sensitivity_summary_head">Säädä näytön herkkyyttä</string>
+
+ <string name="category_sensors_title">Sensorit</string>
+ <string name="gyro_subcat_title">Gyroskooppi</string>
+ <string name="use_gyro_calibration_title_head">Käytä kalibrointitietoja</string>
+ <string name="use_gyro_calibration_summary_head">Käytä gyroskoopin kalibrointiarvoja. Kalibroi merkattuasi tämän!</string>
+ <string name="calibrate_gyro_title_head">Kalibroi</string>
+ <string name="calibrate_gyro_summary_head">Aseta puhelin tasaiselle alustalle ja paina tätä kalibroidaksesi</string>
+ <string name="touchkey_subcat_title">Kosketusnäppäin</string>
+ <string name="touchkey_light_title_head">Ota näppäinvalot käyttöön</string>
+ <string name="touchkey_light_summary_head">Valot syttyvät kun näyttö on päällä</string>
+
+ <string name="category_haptic_title">Haptinen</string>
+ <string name="vibrator_subcat_title">Värinä</string>
+ <string name="vibrator_intensity_title_head">Värinän voimakkuus</string>
+ <string name="vibrator_intensity_summary_head">Säädä värinän voimakkuutta</string>
+
+ <string name="category_radio_title">Radio</string>
+ <string name="hspa_title_head">HSPA</string>
+ <string name="hspa_summary_head">Ota HSDPA/HSUPA käyttöön</string>
+</resources>
51 DeviceSettings/res/values-fr/arrays.xml
@@ -0,0 +1,51 @@
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <string-array name="mdnie_scenario_entries">
+ <item>Caméra (Par défaut)</item>
+ <item>Vidéo</item>
+ <item>Vidéo (chaud)</item>
+ <item>Video (froid)</item>
+ <item>UI</item>
+ <item>Navigation</item>
+ <item>Gallerie</item>
+ <item>VT</item>
+ </string-array>
+
+ <string-array name="mdnie_mode_entries">
+ <item>Standard (Par défaut)</item>
+ <item>Dynamique</item>
+ <item>Naturel</item>
+ <item>Vidéo</item>
+ </string-array>
+
+ <string-array name="mdnie_negative_entries">
+ <item>Normal</item>
+ <item>Inversé</item>
+ </string-array>
+
+ <string-array name="mdnie_outdoor_entries">
+ <item>Inactif (Par défaut)</item>
+ <item>Actif</item>
+ </string-array>
+
+ <string-array name="panel_gamma_entries">
+ <item>2.2 (Par défaut)</item>
+ <item>1.9</item>
+ </string-array>
+
+ <string-array name="touchscreen_sensitivity_entries">
+ <item>10</item>
+ <item>20</item>
+ <item>30</item>
+ <item>50 (Par défaut)</item>
+ <item>70</item>
+ <item>100</item>
+ </string-array>
+
+ <string-array name="hspa_entries">
+ <item>UMTS seulement</item>
+ <item>HSDPA seulement</item>
+ <item>HSDPA + HSUPA</item>
+ </string-array>
+
+</resources>
34 DeviceSettings/res/values-fr/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="app_name">Paramètres Galaxy S II</string>
+
+ <string name="category_mdnie_title">Ecran</string>
+ <string name="screen_colors_title">Couleurs</string>
+ <string name="mdnie_scenario_title_head">Scénario</string>
+ <string name="mdnie_scenario_summary_head">Définit le scénario mDNIe</string>
+ <string name="mdnie_mode_title_head">Mode</string>
+ <string name="mdnie_mode_summary_head">Définit le mode mDNIe</string>
+ <string name="mdnie_negative_title_head">Mode négatif</string>
+ <string name="mdnie_negative_summary_head">Active/désactive les couleurs inversées</string>
+ <string name="mdnie_outdoor_title_head">Mode extérieur</string>
+ <string name="mdnie_outdoor_summary_head">Active/désactive le mode extérieur</string>
+ <string name="panel_gamma_title_head">Gamma écran</string>
+ <string name="panel_gamma_summary_head">Définit la valeur de gamma de l\'écran</string>
+ <string name="touchscreen_subcat_title">Tactile</string>
+ <string name="touchscreen_sensitivity_title_head">Sensibilité</string>
+ <string name="touchscreen_sensitivity_summary_head">Définit la sensibilité du toucher</string>
+
+ <string name="category_sensors_title">Capteurs</string>
+ <string name="gyro_subcat_title">Gyroscope</string>
+ <string name="use_gyro_calibration_title_head">Utiliser données de calibration</string>
+ <string name="use_gyro_calibration_summary_head">Utiliser les données de calibration du gyroscope. Faites une calibration après avoir coché!</string>
+ <string name="calibrate_gyro_title_head">Calibrer</string>
+ <string name="calibrate_gyro_summary_head">Posez le téléphone à plat, puis appuyez sur ce bouton pour effecter la calibration.</string>
+ <string name="touchkey_subcat_title">Touches tactiles</string>
+ <string name="touchkey_light_title_head">Activer l\'éclairage</string>
+ <string name="touchkey_light_summary_head">Illumine les touches tactiles quand l\'écran est activé.</string>
+
+ <string name="category_radio_title">Radio</string>
+ <string name="hspa_title_head">HSPA</string>
+ <string name="hspa_summary_head">Activer HSDPA/HSUPA</string>
+</resources>
51 DeviceSettings/res/values-hu/arrays.xml
@@ -0,0 +1,51 @@
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <string-array name="mdnie_scenario_entries">
+ <item>Kamera (Alapbeállítás)</item>
+ <item>Videó</item>
+ <item>Videó (Meleg árnyalat)</item>
+ <item>Videó (Hideg árnyalat)</item>
+ <item>Felhasználói felület</item>
+ <item>Navigáció</item>
+ <item>Galéria</item>
+ <item>VT</item>
+ </string-array>
+
+ <string-array name="mdnie_mode_entries">
+ <item>Hagyományos (Alapbeállítás)</item>
+ <item>Dinamikus</item>
+ <item>Természetes</item>
+ <item>Film</item>
+ </string-array>
+
+ <string-array name="mdnie_negative_entries">
+ <item>Hagyományos</item>
+ <item>Fordított</item>
+ </string-array>
+
+ <string-array name="mdnie_outdoor_entries">
+ <item>Kikapcsolva (Alapbeállítás)</item>
+ <item>Bekapcsolva</item>
+ </string-array>
+
+ <string-array name="panel_gamma_entries">
+ <item>2.2 (Alapbeállítás)</item>
+ <item>1.9</item>
+ </string-array>
+
+ <string-array name="touchscreen_sensitivity_entries">
+ <item>10</item>
+ <item>20</item>
+ <item>30</item>
+ <item>50 (Alapbeállítás)</item>
+ <item>70</item>
+ <item>100</item>
+ </string-array>
+
+ <string-array name="hspa_entries">
+ <item>UMTS</item>
+ <item>HSDPA</item>
+ <item>HSDPA + HSUPA</item>
+ </string-array>
+
+</resources>
40 DeviceSettings/res/values-hu/strings.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="app_name">Galaxy S II Beállítások</string>
+
+ <string name="screen_colors_title">Színek</string>
+ <string name="category_mdnie_title">Kijelző</string>
+ <string name="mdnie_scenario_title_head">Megjelenítés</string>
+ <string name="mdnie_scenario_summary_head">mDNIe megjelenítési beállítások</string>
+ <string name="mdnie_mode_title_head">Üzemmód</string>
+ <string name="mdnie_mode_summary_head">mDNIe üzemmódok</string>
+ <string name="mdnie_negative_title_head">Negatív üzemmód</string>
+ <string name="mdnie_negative_summary_head">Fordított színek ki/be</string>
+ <string name="mdnie_outdoor_title_head">Szabadtéri üzemmód</string>
+ <string name="mdnie_outdoor_summary_head">Szabadtéri üzemmód ki/be</string>
+ <string name="panel_gamma_title_head">Kijelző gamma-értéke</string>
+ <string name="panel_gamma_summary_head">Kijelző gamma-érték beállítása</string>
+
+ <string name="touchscreen_subcat_title">Érintőképernyő</string>
+ <string name="touchscreen_sensitivity_title_head">Érzékenység</string>
+ <string name="touchscreen_sensitivity_summary_head">Érintőképernyő érzékenységének beállítása</string>
+
+ <string name="category_sensors_title">Szenzorok</string>
+ <string name="gyro_subcat_title">Giroszkóp</string>
+ <string name="use_gyro_calibration_title_head">Kalibrálási érték használata</string>
+ <string name="use_gyro_calibration_summary_head">Kalibrálási érték használata. Érdemes újra kalibrálni, ha ez a funkció használatban van!</string>
+ <string name="calibrate_gyro_title_head">Kalibrálás</string>
+ <string name="calibrate_gyro_summary_head">Kalibráláshoz a telefont vízszintes felületre kell helyezni, és megérinteni ezt a gombot</string>
+ <string name="touchkey_subcat_title">Érintőgombok</string>
+ <string name="touchkey_light_title_head">Érintőgombok háttérvilágítása</string>
+ <string name="touchkey_light_summary_head">Bekapcsolja az érintőgombok háttérvilágítását bekapcsolt képernyőnél</string>
+
+ <string name="category_haptic_title">Érintési visszajelzés</string>
+ <string name="vibrator_subcat_title">Rezgés</string>
+ <string name="vibrator_intensity_title_head">Rezgés erőssége</string>
+ <string name="vibrator_intensity_summary_head">Rezgés erősségének beállítása</string>
+
+ <string name="category_radio_title">GSM rádió</string>
+ <string name="hspa_title_head">HSPA</string>
+ <string name="hspa_summary_head">HSDPA/HSUPA engedélyezése</string>
+</resources>
50 DeviceSettings/res/values-nl/arrays.xml
@@ -0,0 +1,50 @@
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string-array name="mdnie_scenario_entries">
+ <item>Camera (standaard)</item>
+ <item>Video</item>
+ <item>Video (warm)</item>
+ <item>Video (koud)</item>
+ <item>Uiterlijk</item>
+ <item>Navigatie</item>
+ <item>Galerij</item>
+ <item>VT</item>
+ </string-array>
+ <string-array name="mdnie_mode_entries">
+ <item>Standaard</item>
+ <item>Dynamisch</item>
+ <item>Natuurlijk</item>
+ <item>Film</item>
+ </string-array>
+ <string-array name="mdnie_negative_entries">
+ <item>Normaal</item>
+ <item>Omgedraaid</item>
+ </string-array>
+ <string-array name="mdnie_outdoor_entries">
+ <item>Uit (standaard)</item>
+ <item>Aan</item>
+ </string-array>
+ <string-array name="panel_gamma_entries">
+ <item>2,2 (standaard)</item>
+ <item>1,9</item>
+ </string-array>
+ <string-array name="touchscreen_sensitivity_entries">
+ <item>10</item>
+ <item>20</item>
+ <item>30</item>
+ <item>50 (standaard)</item>
+ <item>70</item>
+ <item>100</item>
+ </string-array>
+ <string-array name="vibrator_intensity_entries">
+ <item>0%</item>
+ <item>25%</item>
+ <item>50% (standaard)</item>
+ <item>75%</item>
+ <item>100%</item>
+ </string-array>
+ <string-array name="hspa_entries">
+ <item>Alleen UMTS</item>
+ <item>Alleen HSDPA</item>
+ <item>HSDPA &amp; HSUPA</item>
+ </string-array>
+</resources>
40 DeviceSettings/res/values-nl/strings.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="app_name">Galaxy S II-instellingen</string>
+
+ <string name="screen_colors_title">Kleuren</string>
+ <string name="category_mdnie_title">Scherm</string>
+ <string name="mdnie_scenario_title_head">Scenario</string>
+ <string name="mdnie_scenario_summary_head">mDNIe-scenario instellen</string>
+ <string name="mdnie_mode_title_head">Modus</string>
+ <string name="mdnie_mode_summary_head">mDNIe-modus instellen</string>
+ <string name="mdnie_negative_title_head">Negatieve modus</string>
+ <string name="mdnie_negative_summary_head">Negatieve kleuren in-/uitschakelen</string>
+ <string name="mdnie_outdoor_title_head">Buitenmodus</string>
+ <string name="mdnie_outdoor_summary_head">Buitenmodus in-/uitschakelen</string>
+ <string name="panel_gamma_title_head">Schermgamma</string>
+ <string name="panel_gamma_summary_head">Schermgammawaarden instellen</string>
+
+ <string name="touchscreen_subcat_title">Aanraakscherm</string>
+ <string name="touchscreen_sensitivity_title_head">Aanraakgevoeligheid</string>
+ <string name="touchscreen_sensitivity_summary_head">Gevoeligheid aanraakscherm instellen</string>
+
+ <string name="category_sensors_title">Sensoren</string>
+ <string name="gyro_subcat_title">Gyroscoop</string>
+ <string name="use_gyro_calibration_title_head">Kalibratiegegevens gebruiken</string>
+ <string name="use_gyro_calibration_summary_head">Gebruik de kalibratiewaarden van de gyroscoop. Gelieve hierna een kalibratie te doen.</string>
+ <string name="calibrate_gyro_title_head">Kalibreren</string>
+ <string name="calibrate_gyro_summary_head">Plaats de telefoon op een vlakke ondergrond en tik hier om te kalibreren</string>
+ <string name="touchkey_subcat_title">Aanraakknop</string>
+ <string name="touchkey_light_title_head">Achtergrondlicht bij knoppen inschakelen</string>
+ <string name="touchkey_light_summary_head">Aanraakknoppen oplichten indien scherm aan is</string>
+
+ <string name="category_haptic_title">Haptisch</string>
+ <string name="vibrator_subcat_title">Trillen</string>
+ <string name="vibrator_intensity_title_head">Trilintensiteit</string>
+ <string name="vibrator_intensity_summary_head">Trilintensiteit instellen</string>
+
+ <string name="category_radio_title">Radio</string>
+ <string name="hspa_title_head">HSPA</string>
+ <string name="hspa_summary_head">HSDPA/HSUPA inschakelen</string>
+</resources>
51 DeviceSettings/res/values-pt-rBR/arrays.xml
@@ -0,0 +1,51 @@
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <string-array name="mdnie_scenario_entries">
+ <item>Câmera (Padrão)</item>
+ <item>Vídeo</item>
+ <item>Vídeo Quente</item>
+ <item>Vídeo Frio</item>
+ <item>IU</item>
+ <item>Navegação</item>
+ <item>Galeria</item>
+ <item>VT</item>
+ </string-array>
+
+ <string-array name="mdnie_mode_entries">
+ <item>Padrão</item>
+ <item>Dinâmico</item>
+ <item>Natural</item>
+ <item>Filme</item>
+ </string-array>
+
+ <string-array name="mdnie_negative_entries">
+ <item>Normal</item>
+ <item>Invertido</item>
+ </string-array>
+
+ <string-array name="mdnie_outdoor_entries">
+ <item>Desligado (Padrão)</item>
+ <item>Ligado</item>
+ </string-array>
+
+ <string-array name="panel_gamma_entries">
+ <item>2.2 (Padrão)</item>
+ <item>1.9</item>
+ </string-array>
+
+ <string-array name="touchscreen_sensitivity_entries">
+ <item>10</item>
+ <item>20</item>
+ <item>30</item>
+ <item>50 (Padrão)</item>
+ <item>70</item>
+ <item>100</item>
+ </string-array>
+
+ <string-array name="hspa_entries">
+ <item>Somente UMTS</item>
+ <item>Somente HSDPA</item>
+ <item>HSDPA + HSUPA</item>
+ </string-array>
+
+</resources>
35 DeviceSettings/res/values-pt-rBR/strings.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="app_name">Config. Galaxy S II</string>
+ <string name="screen_colors_title">Cores</string>
+ <string name="category_mdnie_title">Tela</string>
+ <string name="mdnie_scenario_title_head">Cenário</string>
+ <string name="mdnie_scenario_summary_head">Define o Cenário mDNIe</string>
+ <string name="mdnie_mode_title_head">Modo</string>
+ <string name="mdnie_mode_summary_head">Define o Modo mDNIe</string>
+ <string name="mdnie_negative_title_head">Modo Negativo</string>
+ <string name="mdnie_negative_summary_head">Ativar/Desativar cores invertidas</string>
+ <string name="mdnie_outdoor_title_head">Modo Ao Ar Livre</string>
+ <string name="mdnie_outdoor_summary_head">Ativar/Desativar modo ao ar livre</string>
+ <string name="panel_gamma_title_head">Gama da Tela</string>
+ <string name="panel_gamma_summary_head">Definir valor da gama da tela</string>
+ <string name="touchscreen_subcat_title">Tela sensível ao toque</string>
+ <string name="touchscreen_sensitivity_title_head">Sensitividade do toque</string>
+ <string name="touchscreen_sensitivity_summary_head">Define a sensitividade do toque na tela</string>
+ <string name="category_sensors_title">Sensores</string>
+ <string name="gyro_subcat_title">Giroscópio</string>
+ <string name="use_gyro_calibration_title_head">Usar dados de calibração</string>
+ <string name="use_gyro_calibration_summary_head">Usar os valores de calibração do giroscópio. Fazer uma calibragem depois de selecionar isto!</string>
+ <string name="calibrate_gyro_title_head">Calibrar</string>
+ <string name="calibrate_gyro_summary_head">Coloque seu telefone em uma superfície plana, e pressione isto para calibrar</string>
+ <string name="touchkey_subcat_title">Tecla sensível ao toque</string>
+ <string name="touchkey_light_title_head">Ativar luz de fundo das teclas</string>
+ <string name="touchkey_light_summary_head">Acender as teclas sensíveis ao toque quando a tela estiver ligada</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="category_haptic_title">Resposta Tátil</string>
+ <string name="vibrator_subcat_title">Vibração</string>
+ <string name="vibrator_intensity_title_head">Intensidade da Vibração</string>
+ <string name="vibrator_intensity_summary_head">Define a intensidade da vibração</string>
+</resources>
135 DeviceSettings/res/values/arrays.xml
@@ -0,0 +1,135 @@
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <string-array name="mdnie_scenario_entries">
+ <item>Camera (Default)</item>
+ <item>Video</item>
+ <item>Video Warm</item>
+ <item>Video Cold</item>
+ <item>UI</item>
+ <item>Navigation</item>
+ <item>Gallery</item>
+ <item>VT</item>
+ </string-array>
+
+ <string-array name="mdnie_scenario_entries_values" translatable="false">
+ <item>4</item>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>0</item>
+ <item>5</item>
+ <item>6</item>
+ <item>7</item>
+ </string-array>
+
+ <string-array name="mdnie_mode_entries">
+ <item>Standard (Default)</item>
+ <item>Dynamic</item>
+ <item>Natural</item>
+ <item>Movie</item>
+ </string-array>
+
+ <string-array name="mdnie_mode_entries_values" translatable="false">
+ <item>1</item>
+ <item>0</item>
+ <item>2</item>
+ <item>3</item>
+ </string-array>
+
+ <string-array name="mdnie_negative_entries">
+ <item>Normal</item>
+ <item>Inverted</item>
+ </string-array>
+
+ <string-array name="mdnie_negative_entries_values" translatable="false">
+ <item>0</item>
+ <item>1</item>
+ </string-array>
+
+ <string-array name="mdnie_outdoor_entries">
+ <item>Off (Default)</item>
+ <item>On</item>
+ </string-array>
+
+ <string-array name="mdnie_outdoor_entries_values" translatable="false">
+ <item>0</item>
+ <item>1</item>
+ </string-array>
+
+ <string-array name="panel_gamma_entries">
+ <item>2.2 (Default)</item>
+ <item>1.9</item>
+ </string-array>
+
+ <string-array name="panel_gamma_entries_values" translatable="false">
+ <item>0</item>
+ <item>1</item>
+ </string-array>
+
+ <string-array name="touchscreen_sensitivity_entries">
+ <item>10</item>
+ <item>20</item>
+ <item>30</item>
+ <item>50 (Default)</item>
+ <item>70</item>
+ <item>100</item>
+ </string-array>
+
+ <string-array name="touchscreen_sensitivity_entries_values" translatable="false">
+ <item>10</item>
+ <item>20</item>
+ <item>30</item>
+ <item>50</item>
+ <item>70</item>
+ <item>100</item>
+ </string-array>
+
+ <string-array name="vibrator_intensity_entries">
+ <item>0%</item>
+ <item>25%</item>
+ <item>50% (Default)</item>
+ <item>75%</item>
+ <item>100%</item>
+ </string-array>
+
+ <string-array name="vibrator_intensity_entries_values" translatable="false">
+ <item>0</item>
+ <item>25</item>
+ <item>50</item>
+ <item>75</item>
+ <item>100</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>
+
+ <string-array name="touchkey_timeout_entries">
+ <item>Never</item>
+ <item>1 second</item>
+ <item>2 seconds</item>
+ <item>3 seconds (default)</item>
+ <item>4 seconds</item>
+ <item>5 seconds</item>
+ <item>6 seconds</item>
+ </string-array>
+
+ <string-array name="touchkey_timeout_entries_values" translatable="false">
+ <item>0</item>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>4</item>
+ <item>5</item>
+ <item>6</item>
+ </string-array>
+
+</resources>
42 DeviceSettings/res/values/strings.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="app_name">Galaxy S II Settings</string>
+
+ <string name="screen_colors_title">Colors</string>
+ <string name="category_mdnie_title">Screen</string>
+ <string name="mdnie_scenario_title_head">Scenario</string>
+ <string name="mdnie_scenario_summary_head">Set the mDNIe Scenario</string>
+ <string name="mdnie_mode_title_head">Mode</string>
+ <string name="mdnie_mode_summary_head">Set the mDNIe Mode</string>
+ <string name="mdnie_negative_title_head">Negative Mode</string>
+ <string name="mdnie_negative_summary_head">Enable/Disable inverted colors</string>
+ <string name="mdnie_outdoor_title_head">Outdoor Mode</string>
+ <string name="mdnie_outdoor_summary_head">Enable/Disable outdoor mode</string>
+ <string name="panel_gamma_title_head">Screen Gamma</string>
+ <string name="panel_gamma_summary_head">Set screen gamma value</string>
+
+ <string name="touchscreen_subcat_title">Touchscreen</string>
+ <string name="touchscreen_sensitivity_title_head">Touch sensitivity</string>
+ <string name="touchscreen_sensitivity_summary_head">Set touch panel sensitivity</string>
+
+ <string name="category_sensors_title">Sensors</string>
+ <string name="gyro_subcat_title">Gyroscope</string>
+ <string name="use_gyro_calibration_title_head">Use calibration data</string>
+ <string name="use_gyro_calibration_summary_head">Use the gyroscope calibration values. Do a calibration after checking this!</string>
+ <string name="calibrate_gyro_title_head">Calibrate</string>
+ <string name="calibrate_gyro_summary_head">Put your phone on a flat surface, and press this to calibrate</string>
+ <string name="touchkey_subcat_title">Touch key</string>
+ <string name="touchkey_light_title_head">Enable keys backlight</string>
+ <string name="touchkey_light_summary_head">Light up touch keys when screen is on</string>
+ <string name="touchkey_timeout_title_head">Backlight timeout</string>
+ <string name="touchkey_timeout_summary_head">Delay after a keypress before backlight turns off</string>
+
+ <string name="category_haptic_title">Haptic</string>
+ <string name="vibrator_subcat_title">Vibrator</string>
+ <string name="vibrator_intensity_title_head">Vibrator Intensity</string>
+ <string name="vibrator_intensity_summary_head">Set vibrator intensity</string>
+
+ <string name="category_radio_title">Radio</string>
+ <string name="hspa_title_head">HSPA</string>
+ <string name="hspa_summary_head">Enable HSDPA/HSUPA</string>
+</resources>
13 DeviceSettings/res/xml/haptic_preferences.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
+ <PreferenceCategory
+ android:title="@string/vibrator_subcat_title">
+ <com.cyanogenmod.settings.device.VibratorIntensity
+ android:key="vibrator_intensity"
+ android:title="@string/vibrator_intensity_title_head"
+ android:summary="@string/vibrator_intensity_summary_head"
+ android:entries="@array/vibrator_intensity_entries"
+ android:entryValues="@array/vibrator_intensity_entries_values"
+ android:defaultValue="50" />
+ </PreferenceCategory>
+</PreferenceScreen>
64 DeviceSettings/res/xml/mdnie_preferences.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
+ android:title="@string/app_name">
+
+ <PreferenceCategory
+ android:title="@string/screen_colors_title">
+
+ <!-- mDNIe Scenario modes -->
+ <com.cyanogenmod.settings.device.mDNIeScenario
+ android:key="mdnie_scenario"
+ android:title="@string/mdnie_scenario_title_head"
+ android:summary="@string/mdnie_scenario_summary_head"
+ android:entries="@array/mdnie_scenario_entries"
+ android:entryValues="@array/mdnie_scenario_entries_values"
+ android:defaultValue="0" />
+
+ <!-- mDNIe Mode -->
+ <com.cyanogenmod.settings.device.mDNIeMode
+ android:key="mdnie_mode"
+ android:title="@string/mdnie_mode_title_head"
+ android:summary="@string/mdnie_mode_summary_head"
+ android:entries="@array/mdnie_mode_entries"
+ android:entryValues="@array/mdnie_mode_entries_values"
+ android:defaultValue="1" />
+
+ <!-- mDNIe Negative mode -->
+ <com.cyanogenmod.settings.device.mDNIeNegative
+ android:key="mdnie_negative"
+ android:title="@string/mdnie_negative_title_head"
+ android:summary="@string/mdnie_negative_summary_head"
+ android:entries="@array/mdnie_negative_entries"
+ android:entryValues="@array/mdnie_negative_entries_values"
+ android:defaultValue="0" />
+
+ <!-- mDNIe Outdoor mode -->
+ <com.cyanogenmod.settings.device.mDNIeOutdoor
+ android:key="mdnie_outdoor"
+ android:title="@string/mdnie_outdoor_title_head"
+ android:summary="@string/mdnie_outdoor_summary_head"
+ android:entries="@array/mdnie_outdoor_entries"
+ android:entryValues="@array/mdnie_outdoor_entries_values"
+ android:defaultValue="0" />
+
+ <!-- Panel gamma -->
+ <com.cyanogenmod.settings.device.PanelGamma
+ android:key="panel_gamma"
+ android:title="@string/panel_gamma_title_head"
+ android:summary="@string/panel_gamma_summary_head"
+ android:entries="@array/panel_gamma_entries"
+ android:entryValues="@array/panel_gamma_entries_values"
+ android:defaultValue="0" />
+
+ </PreferenceCategory>
+ <PreferenceCategory
+ android:title="@string/touchscreen_subcat_title">
+ <com.cyanogenmod.settings.device.TouchscreenSensitivity
+ android:key="touchscreen_sensitivity"
+ android:title="@string/touchscreen_sensitivity_title_head"
+ android:summary="@string/touchscreen_sensitivity_summary_head"
+ android:entries="@array/touchscreen_sensitivity_entries"
+ android:entryValues="@array/touchscreen_sensitivity_entries_values"
+ android:defaultValue="50" />
+ </PreferenceCategory>
+</PreferenceScreen>
12 DeviceSettings/res/xml/radio_preferences.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
+ <!-- Hspa modes -->
+ <com.cyanogenmod.settings.device.Hspa
+ android:key="hspa"
+ android:title="@string/hspa_title_head"
+ android:summary="@string/hspa_summary_head"
+ android:entries="@array/hspa_entries"
+ android:entryValues="@array/hspa_entries_values"
+ android:defaultValue="0" />
+
+</PreferenceScreen>
39 DeviceSettings/res/xml/sensors_preferences.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
+ <PreferenceCategory
+ android:title="@string/gyro_subcat_title">
+ <!-- Use sensor calibration -->
+ <CheckBoxPreference
+ android:key="use_gyro_calibration"
+ android:title="@string/use_gyro_calibration_title_head"
+ android:summary="@string/use_gyro_calibration_summary_head"
+ />
+
+ <!-- Do gyro calibration -->
+ <Preference
+ android:key="calibrate_gyro"
+ android:title="@string/calibrate_gyro_title_head"
+ android:summary="@string/calibrate_gyro_summary_head"
+ />
+ </PreferenceCategory>
+
+ <PreferenceCategory
+ android:title="@string/touchkey_subcat_title">
+ <!-- Touchkey backlight -->
+ <CheckBoxPreference
+ android:key="touchkey_light"
+ android:title="@string/touchkey_light_title_head"
+ android:summary="@string/touchkey_light_summary_head"
+ android:defaultValue="true"
+ />
+ <com.cyanogenmod.settings.device.TouchkeyTimeout
+ android:key="touchkey_timeout"
+ android:title="@string/touchkey_timeout_title_head"
+ android:summary="@string/touchkey_timeout_summary_head"
+ android:entries="@array/touchkey_timeout_entries"
+ android:entryValues="@array/touchkey_timeout_entries_values"
+ android:defaultValue="3"
+ />
+ </PreferenceCategory>
+</PreferenceScreen>
+
159 DeviceSettings/src/com/cyanogenmod/settings/device/DeviceSettings.java
@@ -0,0 +1,159 @@
+/*
+ * Copyright (C) 2012 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.Activity;
+import android.app.Fragment;
+import android.app.FragmentTransaction;
+import android.content.Context;
+import android.os.Bundle;
+import android.support.v4.app.FragmentActivity;
+import android.support.v13.app.FragmentPagerAdapter;
+import android.support.v4.view.ViewPager;
+
+import com.cyanogenmod.settings.device.R;
+
+import java.util.ArrayList;
+
+public class DeviceSettings extends FragmentActivity {
+
+ 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_MDNIE_SCENARIO = "mdnie_scenario";
+ public static final String KEY_MDNIE_MODE = "mdnie_mode";
+ public static final String KEY_MDNIE_NEGATIVE = "mdnie_negative";
+ public static final String KEY_MDNIE_OUTDOOR = "mdnie_outdoor";
+ public static final String KEY_PANEL_GAMMA = "panel_gamma";
+ public static final String KEY_HSPA = "hspa";
+ public static final String KEY_USE_GYRO_CALIBRATION = "use_gyro_calibration";
+ public static final String KEY_CALIBRATE_GYRO = "calibrate_gyro";
+ public static final String KEY_TOUCHSCREEN_SENSITIVITY = "touchscreen_sensitivity";
+ public static final String KEY_TOUCHKEY_LIGHT = "touchkey_light";
+ public static final String KEY_TOUCHKEY_TIMEOUT = "touchkey_timeout";
+ public static final String KEY_VIBRATOR_INTENSITY = "vibrator_intensity";
+
+ 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.category_radio_title),
+ RadioFragmentActivity.class, null);
+ mTabsAdapter.addTab(bar.newTab().setText(R.string.category_mdnie_title),
+ mDNIeFragmentActivity.class, null);
+ mTabsAdapter.addTab(bar.newTab().setText(R.string.category_sensors_title),
+ SensorsFragmentActivity.class, null);
+ mTabsAdapter.addTab(bar.newTab().setText(R.string.category_haptic_title),
+ HapticFragmentActivity.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);
+ }
+
+ public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
+ }
+
+ public void onPageSelected(int position) {
+ mActionBar.setSelectedNavigationItem(position);
+ }
+
+ public void onPageScrollStateChanged(int state) {
+ }
+
+ 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);
+ }
+ }
+ }
+
+ public void onTabUnselected(Tab tab, FragmentTransaction ft) {
+ }
+
+ public void onTabReselected(Tab tab, FragmentTransaction ft) {
+ }
+ }
+}
66 DeviceSettings/src/com/cyanogenmod/settings/device/HapticFragmentActivity.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2012 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.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 HapticFragmentActivity extends PreferenceFragment {
+
+ private static final String PREF_ENABLED = "1";
+ private static final String TAG = "GalaxyS2Parts_General";
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ addPreferencesFromResource(R.xml.haptic_preferences);
+
+ PreferenceScreen prefSet = getPreferenceScreen();
+
+ }
+
+ @Override
+ public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
+
+ String boxValue;
+ String key = preference.getKey();
+
+ Log.w(TAG, "key: " + key);
+
+ return true;
+ }
+
+ public static boolean isSupported(String FILE) {
+ return Utils.fileExists(FILE);
+ }
+
+ public static void restore(Context context) {
+ SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
+ }
+}
67 DeviceSettings/src/com/cyanogenmod/settings/device/Hspa.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2012 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.Intent;
+import android.content.SharedPreferences;
+import android.util.AttributeSet;
+import android.preference.ListPreference;
+import android.preference.Preference;
+import android.preference.Preference.OnPreferenceChangeListener;
+import android.preference.PreferenceManager;
+
+public class Hspa extends ListPreference implements OnPreferenceChangeListener {
+
+ private static final String FILE = "/system/app/SamsungServiceMode.apk";
+ private Context mCtx;
+
+ public Hspa(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ this.setOnPreferenceChangeListener(this);
+ mCtx = context;
+ }
+
+ public static boolean isSupported() {
+ return Utils.fileExists(FILE);
+ }
+
+ /**
+ * 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"));
+ }
+
+ 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);
+ }
+}
60 DeviceSettings/src/com/cyanogenmod/settings/device/PanelGamma.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2012 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.util.Log;
+import android.content.SharedPreferences;
+import android.util.AttributeSet;
+import android.preference.Preference;
+import android.preference.ListPreference;
+import android.preference.Preference.OnPreferenceChangeListener;
+import android.preference.PreferenceManager;
+
+public class PanelGamma extends ListPreference implements OnPreferenceChangeListener {
+
+ public PanelGamma(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ this.setOnPreferenceChangeListener(this);
+ }
+
+ private static final String FILE = "/sys/class/lcd/panel/gamma_mode";
+
+ public static boolean isSupported() {
+ return Utils.fileExists(FILE);
+ }
+
+ /**
+ * Restore panel gamma 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);
+ Utils.writeValue(FILE, sharedPrefs.getString(DeviceSettings.KEY_PANEL_GAMMA, "0"));
+ }
+
+ public boolean onPreferenceChange(Preference preference, Object newValue) {
+ Log.d("SGS2","Writing " + ((String)newValue) + " to " + FILE);
+ Utils.writeValue(FILE, (String) newValue);
+ return true;
+ }
+
+}
66 DeviceSettings/src/com/cyanogenmod/settings/device/RadioFragmentActivity.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2012 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.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 RadioFragmentActivity extends PreferenceFragment {
+
+ private static final String PREF_ENABLED = "1";
+ private static final String TAG = "GalaxyS2Parts_General";
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ addPreferencesFromResource(R.xml.radio_preferences);
+
+ PreferenceScreen prefSet = getPreferenceScreen();
+
+ }
+
+ @Override
+ public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
+
+ String boxValue;
+ String key = preference.getKey();
+
+ Log.w(TAG, "key: " + key);
+
+ return true;
+ }
+
+ public static boolean isSupported(String FILE) {
+ return Utils.fileExists(FILE);
+ }
+
+ public static void restore(Context context) {
+ SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
+ }
+}
109 DeviceSettings/src/com/cyanogenmod/settings/device/SensorsFragmentActivity.java
@@ -0,0 +1,109 @@
+/*
+ * Copyright (C) 2012 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.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 SensorsFragmentActivity extends PreferenceFragment {
+
+ private static final String PREF_ENABLED = "1";
+ private static final String TAG = "GalaxyS2Parts_General";
+
+ private static final String FILE_USE_GYRO_CALIB = "/sys/class/sec/gsensorcal/calibration";
+ private static final String FILE_TOUCHKEY_DISABLE = "/sys/class/sec/sec_touchkey/force_disable";
+ private static final String FILE_TOUCHKEY_BRIGHTNESS = "/sys/class/sec/sec_touchkey/brightness";
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ addPreferencesFromResource(R.xml.sensors_preferences);
+
+ PreferenceScreen prefSet = getPreferenceScreen();
+
+ if (((CheckBoxPreference)prefSet.findPreference(DeviceSettings.KEY_TOUCHKEY_LIGHT)).isChecked()) {
+ prefSet.findPreference(DeviceSettings.KEY_TOUCHKEY_TIMEOUT).setEnabled(true);
+ } else {
+ prefSet.findPreference(DeviceSettings.KEY_TOUCHKEY_TIMEOUT).setEnabled(false);
+ }
+
+ }
+
+ @Override
+ public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
+
+ String boxValue;
+ String key = preference.getKey();
+
+ Log.w(TAG, "key: " + key);
+
+ if (key.compareTo(DeviceSettings.KEY_USE_GYRO_CALIBRATION) == 0) {
+ boxValue = (((CheckBoxPreference)preference).isChecked() ? "1" : "0");
+ Utils.writeValue(FILE_USE_GYRO_CALIB, boxValue);
+ } else if (key.compareTo(DeviceSettings.KEY_CALIBRATE_GYRO) == 0) {
+ // when calibration data utilization is disablen and enabled back,
+ // calibration is done at the same time by driver
+ Utils.writeValue(FILE_USE_GYRO_CALIB, "0");
+ Utils.writeValue(FILE_USE_GYRO_CALIB, "1");
+ Utils.showDialog((Context)getActivity(), "Calibration done", "The gyroscope has been successfully calibrated!");
+ } else if (key.compareTo(DeviceSettings.KEY_TOUCHKEY_LIGHT) == 0) {
+ if (((CheckBoxPreference)preference).isChecked()) {
+ Utils.writeValue(FILE_TOUCHKEY_DISABLE, "0");
+ Utils.writeValue(FILE_TOUCHKEY_BRIGHTNESS, "1");
+ preferenceScreen.findPreference(DeviceSettings.KEY_TOUCHKEY_TIMEOUT).setEnabled(true);
+ } else {
+ Utils.writeValue(FILE_TOUCHKEY_DISABLE, "1");
+ Utils.writeValue(FILE_TOUCHKEY_BRIGHTNESS, "2");
+ preferenceScreen.findPreference(DeviceSettings.KEY_TOUCHKEY_TIMEOUT).setEnabled(false);
+ }
+ }
+
+ return true;
+ }
+
+ public static boolean isSupported(String FILE) {
+ return Utils.fileExists(FILE);
+ }
+
+ public static void restore(Context context) {
+ SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
+ boolean gyroCalib = sharedPrefs.getBoolean(DeviceSettings.KEY_USE_GYRO_CALIBRATION, true);
+
+ // When use gyro calibration value is set to 1, calibration is done at the same time, which
+ // means it is reset at each boot, providing wrong calibration most of the time at each reboot.
+ // So we only set it to "0" if user wants it, as it defaults to 1 at boot
+ if (!gyroCalib)
+ Utils.writeValue(FILE_USE_GYRO_CALIB, "0");
+
+ boolean light = sharedPrefs.getBoolean(DeviceSettings.KEY_TOUCHKEY_LIGHT, true);
+
+ Utils.writeValue(FILE_TOUCHKEY_BRIGHTNESS, light ? "1" : "0");
+ Utils.writeValue(FILE_TOUCHKEY_DISABLE, light ? "0" : "1");
+ }
+}
38 DeviceSettings/src/com/cyanogenmod/settings/device/Startup.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2012 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.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+
+public class Startup extends BroadcastReceiver {
+
+ @Override
+ public void onReceive(final Context context, final Intent bootintent) {
+ mDNIeScenario.restore(context);
+ mDNIeMode.restore(context);
+ mDNIeNegative.restore(context);
+ mDNIeOutdoor.restore(context);
+ RadioFragmentActivity.restore(context);
+ HapticFragmentActivity.restore(context);
+ VibratorIntensity.restore(context);
+ SensorsFragmentActivity.restore(context);
+ TouchkeyTimeout.restore(context);
+ }
+
+}
59 DeviceSettings/src/com/cyanogenmod/settings/device/TouchkeyTimeout.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2012 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 java.io.IOException;
+import android.content.Context;
+import android.util.AttributeSet;
+import android.content.SharedPreferences;
+import android.preference.Preference;
+import android.preference.ListPreference;
+import android.preference.Preference.OnPreferenceChangeListener;
+import android.preference.PreferenceManager;
+
+public class TouchkeyTimeout extends ListPreference implements OnPreferenceChangeListener {
+
+ public TouchkeyTimeout(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ this.setOnPreferenceChangeListener(this);
+ }
+
+ private static final String FILE_TOUCHKEY_TIMEOUT = "/sys/class/sec/sec_touchkey/led_timeout";
+
+ public static boolean isSupported() {
+ return Utils.fileExists(FILE_TOUCHKEY_TIMEOUT);
+ }
+
+ /**
+ * Restore touchscreen sensitivity 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);
+ Utils.writeValue(FILE_TOUCHKEY_TIMEOUT, sharedPrefs.getString(DeviceSettings.KEY_TOUCHKEY_TIMEOUT, "3"));
+ }
+
+ public boolean onPreferenceChange(Preference preference, Object newValue) {
+ Utils.writeValue(FILE_TOUCHKEY_TIMEOUT, (String) newValue);
+ return true;
+ }
+
+}
59 DeviceSettings/src/com/cyanogenmod/settings/device/TouchscreenSensitivity.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2012 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 java.io.IOException;
+import android.content.Context;
+import android.util.AttributeSet;
+import android.content.SharedPreferences;
+import android.preference.Preference;
+import android.preference.ListPreference;
+import android.preference.Preference.OnPreferenceChangeListener;
+import android.preference.PreferenceManager;
+
+public class TouchscreenSensitivity extends ListPreference implements OnPreferenceChangeListener {
+
+ public TouchscreenSensitivity(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ this.setOnPreferenceChangeListener(this);
+ }
+
+ private static final String FILE = "/sys/class/sec/sec_touchscreen/tsp_threshold";
+
+ public static boolean isSupported() {
+ return Utils.fileExists(FILE);
+ }
+
+ /**
+ * Restore touchscreen sensitivity 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);
+ Utils.writeValue(FILE, sharedPrefs.getString(DeviceSettings.KEY_TOUCHSCREEN_SENSITIVITY, "50"));
+ }
+
+ public boolean onPreferenceChange(Preference preference, Object newValue) {
+ Utils.writeValue(FILE, (String) newValue);
+ return true;
+ }
+
+}
143 DeviceSettings/src/com/cyanogenmod/settings/device/Utils.java
@@ -0,0 +1,143 @@
+/*
+ * Copyright (C) 2012 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.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.SyncFailedException;
+import android.app.AlertDialog;
+import android.content.DialogInterface;
+import android.content.Context;
+
+public class Utils {
+
+ private static final String TAG = "GalaxyS2Settings_Utils";
+ private static final String TAG_READ = "GalaxyS2Settings_Utils_Read";
+ private static final String TAG_WRITE = "GalaxyS2Settings_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();
+ }
+
+
+ public static void showDialog(Context ctx, String title, String message) {
+ final AlertDialog alertDialog = new AlertDialog.Builder(ctx).create();
+ alertDialog.setTitle(title);
+ alertDialog.setMessage(message);
+ alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {
+ alertDialog.dismiss();
+ }
+ });
+ alertDialog.show();
+ }
+}
59 DeviceSettings/src/com/cyanogenmod/settings/device/VibratorIntensity.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2012 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 java.io.IOException;
+import android.content.Context;
+import android.util.AttributeSet;
+import android.content.SharedPreferences;
+import android.preference.Preference;
+import android.preference.ListPreference;
+import android.preference.Preference.OnPreferenceChangeListener;
+import android.preference.PreferenceManager;
+
+public class VibratorIntensity extends ListPreference implements OnPreferenceChangeListener {
+
+ public VibratorIntensity(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ this.setOnPreferenceChangeListener(this);
+ }
+
+ private static final String FILE = "/sys/vibrator/pwm_val";
+
+ public static boolean isSupported() {
+ return Utils.fileExists(FILE);
+ }
+
+ /**
+ * Restore vibrator intensity setting from SharedPreferences. (Write to kernel.)
+ * @param context The context to read the SharedPreferences from
+ */
+ public static void