diff --git a/GNexusParts/Android.mk b/GNexusParts/Android.mk
deleted file mode 100644
index e934402e..00000000
--- a/GNexusParts/Android.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-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 := GNexusParts
-LOCAL_CERTIFICATE := platform
-
-include $(BUILD_PACKAGE)
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/GNexusParts/AndroidManifest.xml b/GNexusParts/AndroidManifest.xml
deleted file mode 100644
index 5b43888d..00000000
--- a/GNexusParts/AndroidManifest.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/GNexusParts/res/drawable/blue_tuning_preview.xml b/GNexusParts/res/drawable/blue_tuning_preview.xml
deleted file mode 100755
index 98ea313e..00000000
--- a/GNexusParts/res/drawable/blue_tuning_preview.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/GNexusParts/res/drawable/color_tuning_preview.xml b/GNexusParts/res/drawable/color_tuning_preview.xml
deleted file mode 100644
index 2d83c10d..00000000
--- a/GNexusParts/res/drawable/color_tuning_preview.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/GNexusParts/res/drawable/green_tuning_preview.xml b/GNexusParts/res/drawable/green_tuning_preview.xml
deleted file mode 100755
index 4f094712..00000000
--- a/GNexusParts/res/drawable/green_tuning_preview.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/GNexusParts/res/drawable/ic_launcher_cmdevicesettings.png b/GNexusParts/res/drawable/ic_launcher_cmdevicesettings.png
deleted file mode 100755
index 66de9c39..00000000
Binary files a/GNexusParts/res/drawable/ic_launcher_cmdevicesettings.png and /dev/null differ
diff --git a/GNexusParts/res/drawable/red_tuning_preview.xml b/GNexusParts/res/drawable/red_tuning_preview.xml
deleted file mode 100755
index a55ea12d..00000000
--- a/GNexusParts/res/drawable/red_tuning_preview.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/GNexusParts/res/layout/preference_colorgamma_presets.xml b/GNexusParts/res/layout/preference_colorgamma_presets.xml
deleted file mode 100755
index bd502876..00000000
--- a/GNexusParts/res/layout/preference_colorgamma_presets.xml
+++ /dev/null
@@ -1,120 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/GNexusParts/res/layout/preference_dialog_color_tuning.xml b/GNexusParts/res/layout/preference_dialog_color_tuning.xml
deleted file mode 100644
index 068f88cc..00000000
--- a/GNexusParts/res/layout/preference_dialog_color_tuning.xml
+++ /dev/null
@@ -1,119 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/GNexusParts/res/layout/preference_dialog_gamma_tuning.xml b/GNexusParts/res/layout/preference_dialog_gamma_tuning.xml
deleted file mode 100644
index 8df2204f..00000000
--- a/GNexusParts/res/layout/preference_dialog_gamma_tuning.xml
+++ /dev/null
@@ -1,143 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/GNexusParts/res/layout/top.xml b/GNexusParts/res/layout/top.xml
deleted file mode 100755
index 744b568c..00000000
--- a/GNexusParts/res/layout/top.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
diff --git a/GNexusParts/res/values-de/strings.xml b/GNexusParts/res/values-de/strings.xml
deleted file mode 100644
index e5cfecc8..00000000
--- a/GNexusParts/res/values-de/strings.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
- Galaxy Nexus Einstellungen
-
-
- ALLGEMEIN
- BILDSCHIRM
-
- System
- WM8994 Einstellungen ( voodoo )
- Farbmultiplikator
- Farbmultiplikator einstellen
- Gammakorrektur
- Gammawert einstellen
- Farb-Voreinstellungen
- Voreinstellungen für Gammakorrektur und Farbmultiplikator
- Rot
- Grün
- Blau
- Standard
- CM
- Hell
- Standard
- CM
- Dunkel
- DSS Gammawert
-
- Standard
- Natürlich
- Dunkles Blau
- Warm
- Kalt
- X-Processing
- Dank an: ale.landra91 cpaixao provolinoo
-
- Mobilfunk
- HSPA
- HSDPA/HSUPA aktivieren
-
-
diff --git a/GNexusParts/res/values-ja/strings.xml b/GNexusParts/res/values-ja/strings.xml
deleted file mode 100644
index 6a650f3b..00000000
--- a/GNexusParts/res/values-ja/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
- Galaxy Nexus 設定
-
-
- 一般
- ディスプレイ
-
- SYSTEM
- WM8994設定 ( voodoo )
- カラーマルチプライヤチューニング
- 画面の色味を調整する
- カラーガンマ調整
- カラーガンマ値を調整する
- 赤
- 緑
- 青
-
- ラジオ
- HSPA
- HSDPA/HSUPAを有効にする
-
-
diff --git a/GNexusParts/res/values-nl/strings.xml b/GNexusParts/res/values-nl/strings.xml
deleted file mode 100644
index 414f3afc..00000000
--- a/GNexusParts/res/values-nl/strings.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
- Galaxy Nexus-instellingen
- ALGEMEEN
- WEERGAVE
- WM8994-instellingen (voodoo)
- Kleurenmultiplicatoren afstemmen
- Kalibreer multiplicatoren van schermkleur
- Kleurengamma afstemmen
- Kalibreer correctie van kleurengamma
- Rood
- Groen
- Blauw
- Schakel HSDPA/HSUPA in/uit
-
diff --git a/GNexusParts/res/values-pt/strings.xml b/GNexusParts/res/values-pt/strings.xml
deleted file mode 100755
index a189ad9c..00000000
--- a/GNexusParts/res/values-pt/strings.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
- Configurações Galaxy Nexus
- Geral
- Tela
- CPU
- Configurações VM8994 ( voodoo )
- Ajustar Multiplicadores de Cor
- Calibrar multiplicadores de cor de tela
- Ajustar Cor Gama
- Calibrar correção de cor gama
- Predefinir hack de cor
- Predefinições para gama e multiplicadores testado por alguns usuários
- Vermelho
- Verde
- Azul
- Padrão
- Conf. CM
- Conf. de Brilho
- Padrão
- Conf. CM
- Conf. Escuro
- Conf. DSS Gama
- Padrão.
- Natural
- Azul Escuro
- Quente
- Frio Escuro
- Cross Proc.
- Créditos: ale.landra91 cpaixao provolinoo
- Teclas sensíveis ao toque
- Notificações de luz de fundo
- A luz de fundo das teclas irão acender quando haver uma notificação.
- Radio
- HSPA
- Ativar HSDPA/HSUPA
-
\ No newline at end of file
diff --git a/GNexusParts/res/values-ru/strings.xml b/GNexusParts/res/values-ru/strings.xml
deleted file mode 100644
index 676e4303..00000000
--- a/GNexusParts/res/values-ru/strings.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
- Настройки Galaxy Nexus
-
-
- ОСНОВНЫЕ
- ДИСПЛЕЙ
-
- Настройки WM8994 ( voodoo )
- Настройка цвета мультипликатора
- Калибровка цвета мультипликатора
- Настройка цветовой гаммы
- Калибровка коррекции цветовой гаммы
- Предустановки настроек
- Установки для цветовой гаммы и мультипликатора проверенные некоторыми пользователями
- Красный
- Зелёный
- Синий
- По умолч.
- Настр. CM
- Ярко
- По умолч.
- Настр. CM
- Темно
- Настр. DSS гаммы
-
- По умолчанию
- Естественный
- Тёмно-синий
- Тёплый
- Хол. тёмный
- Перекр. обраб.
- Участники: ale.landra91 cpaixao provolinoo
-
- Сенсорные копки
- Подсветка уведомлений
- Подсветка сенсорных клавиш включена, когда есть уведомления
-
- Радио
- Включить HSDPA/HSUPA
-
-
diff --git a/GNexusParts/res/values/strings.xml b/GNexusParts/res/values/strings.xml
deleted file mode 100644
index 894206f6..00000000
--- a/GNexusParts/res/values/strings.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
- Galaxy Nexus Settings
-
-
- GENERAL
- DISPLAY
-
- System
- WM8994 Settings ( voodoo )
- Color Multipliers Tuning
- Calibrate multipliers screen color
- Color Gamma Tuning
- Calibrate gamma color correction
- Color hack presets
- Presets for gamma and multipliers tested by some users
- Red
- Green
- Blue
- Default
- CM Sett.
- Bright Sett.
- Default
- CM Sett.
- Dark Sett.
- DSS Gamma Set.
-
- Default.
- Natural
- Dark Blue
- Warm
- Dark Cold
- Cross Proc.
- Credits: ale.landra91 cpaixao malycomix
-
- Touch Keys
- Backlight Notifications
- The touch key backlights will turn on when there is a notification.
-
- Radio
- HSPA
- Enable HSDPA/HSUPA
-
- Fast charge USB
- Fast charge when connected to computer USB interface
-
-
diff --git a/GNexusParts/res/xml/display_preferences.xml b/GNexusParts/res/xml/display_preferences.xml
deleted file mode 100755
index 45795d1f..00000000
--- a/GNexusParts/res/xml/display_preferences.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/GNexusParts/res/xml/general_preferences.xml b/GNexusParts/res/xml/general_preferences.xml
deleted file mode 100644
index 2bf2c43d..00000000
--- a/GNexusParts/res/xml/general_preferences.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/GNexusParts/src/com/cyanogenmod/settings/device/ColorHackPresets.java b/GNexusParts/src/com/cyanogenmod/settings/device/ColorHackPresets.java
deleted file mode 100644
index 4d0d02c8..00000000
--- a/GNexusParts/src/com/cyanogenmod/settings/device/ColorHackPresets.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * 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(-12, 0);
- WriteGamma(12, 1);
- WriteGamma(-12, 2);
- }
-
- private void Preset3() {
- WriteMultiplier(0.458602179, 0);
- WriteMultiplier(0.6311828147, 1);
- WriteMultiplier(0.82258, 2);
- WriteGamma(-31, 0);
- WriteGamma(-18, 1);
- WriteGamma(-0, 2);
- }
-
- private void Preset4() {
- WriteMultiplier(0.7231, 0);
- WriteMultiplier(0.7016, 1);
- WriteMultiplier(0.6532, 2);
- WriteGamma(-31, 0);
- WriteGamma(-30, 1);
- WriteGamma(-14, 2);
- }
-
- private void Preset5() {
- WriteMultiplier(0.6666, 0);
- WriteMultiplier(0.6666, 1);
- WriteMultiplier(0.8333, 2);
- WriteGamma(-44, 0);
- WriteGamma(-44, 1);
- WriteGamma(-7, 2);
- }
-
- private void Preset6() {
- WriteMultiplier(1.0, 0);
- WriteMultiplier(0.7688, 1);
- WriteMultiplier(0.2473, 2);
- WriteGamma(-57, 0);
- WriteGamma(-75, 1);
- WriteGamma(45, 2);
- }
-
-}
diff --git a/GNexusParts/src/com/cyanogenmod/settings/device/ColorTuningPreference.java b/GNexusParts/src/com/cyanogenmod/settings/device/ColorTuningPreference.java
deleted file mode 100644
index 0ca7ae26..00000000
--- a/GNexusParts/src/com/cyanogenmod/settings/device/ColorTuningPreference.java
+++ /dev/null
@@ -1,264 +0,0 @@
-/*
- * 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/GNexusParts/src/com/cyanogenmod/settings/device/DeviceSettings.java b/GNexusParts/src/com/cyanogenmod/settings/device/DeviceSettings.java
deleted file mode 100644
index d5d7838f..00000000
--- a/GNexusParts/src/com/cyanogenmod/settings/device/DeviceSettings.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * 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_CATEGORY_RADIO = "category_radio";
- public static final String KEY_HSPA = "hspa";
- public static final String KEY_USB_FAST_CHARGE = "fast_charge_usb";
-
- 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.display_title),
- DisplayFragmentActivity.class, null);
- mTabsAdapter.addTab(bar.newTab().setText(R.string.general_title),
- GeneralFragmentActivity.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 mTabs = new ArrayList();
-
- 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