summaryrefslogtreecommitdiffstats
path: root/AriesParts
diff options
context:
space:
mode:
authorPawit Pornkitprasan <p.pawit@gmail.com>2012-01-15 09:31:00 +0700
committerPawit Pornkitprasan <p.pawit@gmail.com>2012-01-15 09:31:00 +0700
commitc2239a48c1a09bacb56b6713cdb055dd5c42208e (patch)
treee0d8508d22061e5cc06a03dfc65daf144a0eed73 /AriesParts
parent12eaf1811f8a9dd2a8b88db8e5f515371332b202 (diff)
downloaddevice_samsung_aries-common-c2239a48c1a09bacb56b6713cdb055dd5c42208e.zip
device_samsung_aries-common-c2239a48c1a09bacb56b6713cdb055dd5c42208e.tar.gz
device_samsung_aries-common-c2239a48c1a09bacb56b6713cdb055dd5c42208e.tar.bz2
AriesParts: Rename v0 gamma to just gamma
Diffstat (limited to 'AriesParts')
-rw-r--r--AriesParts/res/layout/preference_dialog_color_tuning.xml38
-rw-r--r--AriesParts/res/values/strings.xml6
-rw-r--r--AriesParts/src/com/cyanogenmod/settings/device/ColorTuningPreference.java50
3 files changed, 47 insertions, 47 deletions
diff --git a/AriesParts/res/layout/preference_dialog_color_tuning.xml b/AriesParts/res/layout/preference_dialog_color_tuning.xml
index f67cf5d..2c52b62 100644
--- a/AriesParts/res/layout/preference_dialog_color_tuning.xml
+++ b/AriesParts/res/layout/preference_dialog_color_tuning.xml
@@ -89,15 +89,15 @@
android:paddingLeft="20dip"
android:paddingRight="20dip" />
- <TextView android:id="@+id/color_red_v0_text"
+ <TextView android:id="@+id/color_red_gamma_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/color_tuning_preview"
- android:text="@string/color_red_v0_title"
+ android:text="@string/color_red_gamma_title"
android:paddingTop="30dip"
android:paddingLeft="20dip"
android:paddingRight="20dip" />
- <TextView android:id="@+id/color_red_v0_value"
+ <TextView android:id="@+id/color_red_gamma_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/color_tuning_preview"
@@ -105,58 +105,58 @@
android:paddingTop="30dip"
android:paddingLeft="20dip"
android:paddingRight="20dip" />
- <SeekBar android:id="@+id/color_red_v0_seekbar"
+ <SeekBar android:id="@+id/color_red_gamma_seekbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_below="@id/color_red_v0_text"
+ android:layout_below="@id/color_red_gamma_text"
android:paddingTop="2dip"
android:paddingLeft="20dip"
android:paddingRight="20dip" />
- <TextView android:id="@+id/color_green_v0_text"
+ <TextView android:id="@+id/color_green_gamma_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_below="@id/color_red_v0_seekbar"
- android:text="@string/color_green_v0_title"
+ android:layout_below="@id/color_red_gamma_seekbar"
+ android:text="@string/color_green_gamma_title"
android:paddingTop="10dip"
android:paddingLeft="20dip"
android:paddingRight="20dip" />
- <TextView android:id="@+id/color_green_v0_value"
+ <TextView android:id="@+id/color_green_gamma_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_below="@id/color_red_v0_seekbar"
+ android:layout_below="@id/color_red_gamma_seekbar"
android:layout_alignParentRight="true"
android:paddingTop="10dip"
android:paddingLeft="20dip"
android:paddingRight="20dip" />
- <SeekBar android:id="@+id/color_green_v0_seekbar"
+ <SeekBar android:id="@+id/color_green_gamma_seekbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_below="@id/color_green_v0_text"
+ android:layout_below="@id/color_green_gamma_text"
android:paddingTop="2dip"
android:paddingLeft="20dip"
android:paddingRight="20dip" />
- <TextView android:id="@+id/color_blue_v0_text"
+ <TextView android:id="@+id/color_blue_gamma_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_below="@id/color_green_v0_seekbar"
- android:text="@string/color_blue_v0_title"
+ android:layout_below="@id/color_green_gamma_seekbar"
+ android:text="@string/color_blue_gamma_title"
android:paddingTop="10dip"
android:paddingLeft="20dip"
android:paddingRight="20dip" />
- <TextView android:id="@+id/color_blue_v0_value"
+ <TextView android:id="@+id/color_blue_gamma_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_below="@id/color_green_v0_seekbar"
+ android:layout_below="@id/color_green_gamma_seekbar"
android:layout_alignParentRight="true"
android:paddingTop="10dip"
android:paddingLeft="20dip"
android:paddingRight="20dip" />
- <SeekBar android:id="@+id/color_blue_v0_seekbar"
+ <SeekBar android:id="@+id/color_blue_gamma_seekbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_below="@id/color_blue_v0_text"
+ android:layout_below="@id/color_blue_gamma_text"
android:paddingTop="2dip"
android:paddingLeft="20dip"
android:paddingRight="20dip" />
diff --git a/AriesParts/res/values/strings.xml b/AriesParts/res/values/strings.xml
index 74adc79..45ee818 100644
--- a/AriesParts/res/values/strings.xml
+++ b/AriesParts/res/values/strings.xml
@@ -8,9 +8,9 @@
<string name="color_red_title">Red</string>
<string name="color_green_title">Green</string>
<string name="color_blue_title">Blue</string>
- <string name="color_red_v0_title">Red (v0 Gamma)</string>
- <string name="color_green_v0_title">Green (v0 Gamma)</string>
- <string name="color_blue_v0_title">Blue (v0 Gamma)</string>
+ <string name="color_red_gamma_title">Red Gamma</string>
+ <string name="color_green_gamma_title">Green Gamma</string>
+ <string name="color_blue_gamma_title">Blue Gamma</string>
<string name="mdnie_title_head">mDNIe Mode</string>
<string name="mdnie_summary_head">Adjust mDNIe display post-processing</string>
diff --git a/AriesParts/src/com/cyanogenmod/settings/device/ColorTuningPreference.java b/AriesParts/src/com/cyanogenmod/settings/device/ColorTuningPreference.java
index 70af316..50bca04 100644
--- a/AriesParts/src/com/cyanogenmod/settings/device/ColorTuningPreference.java
+++ b/AriesParts/src/com/cyanogenmod/settings/device/ColorTuningPreference.java
@@ -34,16 +34,16 @@ public class ColorTuningPreference extends DialogPreference {
R.id.color_blue_value
};
- private static final int[] V0_SEEKBAR_ID = new int[] {
- R.id.color_red_v0_seekbar,
- R.id.color_green_v0_seekbar,
- R.id.color_blue_v0_seekbar,
+ private static final int[] GAMMA_SEEKBAR_ID = new int[] {
+ R.id.color_red_gamma_seekbar,
+ R.id.color_green_gamma_seekbar,
+ R.id.color_blue_gamma_seekbar,
};
- private static final int[] V0_VALUE_DISPLAY_ID = new int[] {
- R.id.color_red_v0_value,
- R.id.color_green_v0_value,
- R.id.color_blue_v0_value
+ private static final int[] GAMMA_VALUE_DISPLAY_ID = new int[] {
+ R.id.color_red_gamma_value,
+ R.id.color_green_gamma_value,
+ R.id.color_blue_gamma_value
};
private static final String[] FILE_PATH = new String[] {
@@ -52,18 +52,18 @@ public class ColorTuningPreference extends DialogPreference {
"/sys/devices/virtual/misc/color_tuning/blue_multiplier"
};
- private static final String[] V0_FILE_PATH = new String[] {
- "/sys/devices/virtual/misc/color_tuning/v0_red_gamma_hack",
- "/sys/devices/virtual/misc/color_tuning/v0_green_gamma_hack",
- "/sys/devices/virtual/misc/color_tuning/v0_blue_gamma_hack"
+ private static final String[] GAMMA_FILE_PATH = new String[] {
+ "/sys/devices/virtual/misc/color_tuning/red_v1_offset",
+ "/sys/devices/virtual/misc/color_tuning/green_v1_offset",
+ "/sys/devices/virtual/misc/color_tuning/blue_v1_offset"
};
private ColorSeekBar mSeekBars[] = new ColorSeekBar[6];
private static final int MAX_VALUE = Integer.MAX_VALUE;
- private static final int V0_MAX_VALUE = 20;
- private static final int V0_DEFAULT_VALUE = 0;
+ private static final int GAMMA_MAX_VALUE = 20;
+ private static final int GAMMA_DEFAULT_VALUE = 0;
// Track instances to know when to restore original color
// (when the orientation changes, a new dialog is created before the old one is destroyed)
@@ -87,10 +87,10 @@ public class ColorTuningPreference extends DialogPreference {
mSeekBars[i] = new ColorSeekBar(seekBar, valueDisplay, FILE_PATH[i]);
}
- for (int i = 0; i < V0_SEEKBAR_ID.length; i++) {
- SeekBar seekBar = (SeekBar) view.findViewById(V0_SEEKBAR_ID[i]);
- TextView valueDisplay = (TextView) view.findViewById(V0_VALUE_DISPLAY_ID[i]);
- mSeekBars[SEEKBAR_ID.length + i] = new V0ColorSeekBar(seekBar, valueDisplay, V0_FILE_PATH[i]);
+ for (int i = 0; i < GAMMA_SEEKBAR_ID.length; i++) {
+ SeekBar seekBar = (SeekBar) view.findViewById(GAMMA_SEEKBAR_ID[i]);
+ TextView valueDisplay = (TextView) view.findViewById(GAMMA_VALUE_DISPLAY_ID[i]);
+ mSeekBars[SEEKBAR_ID.length + i] = new GammaSeekBar(seekBar, valueDisplay, GAMMA_FILE_PATH[i]);
}
}
@@ -125,8 +125,8 @@ public class ColorTuningPreference extends DialogPreference {
int value = sharedPrefs.getInt(filePath, MAX_VALUE);
Utils.writeColor(filePath, value);
}
- for (String filePath : V0_FILE_PATH) {
- int value = sharedPrefs.getInt(filePath, V0_DEFAULT_VALUE);
+ for (String filePath : GAMMA_FILE_PATH) {
+ int value = sharedPrefs.getInt(filePath, GAMMA_DEFAULT_VALUE);
Utils.writeColor(filePath, value);
}
}
@@ -142,7 +142,7 @@ public class ColorTuningPreference extends DialogPreference {
supported = false;
}
}
- for (String filePath : V0_FILE_PATH) {
+ for (String filePath : GAMMA_FILE_PATH) {
if (!Utils.fileExists(filePath)) {
supported = false;
}
@@ -210,18 +210,18 @@ public class ColorTuningPreference extends DialogPreference {
}
- class V0ColorSeekBar extends ColorSeekBar {
+ class GammaSeekBar extends ColorSeekBar {
- public V0ColorSeekBar(SeekBar seekBar, TextView valueDisplay, String filePath) {
+ public GammaSeekBar(SeekBar seekBar, TextView valueDisplay, String filePath) {
mSeekBar = seekBar;
mValueDisplay = valueDisplay;
mFilePath = filePath;
// Read original value
SharedPreferences sharedPreferences = getSharedPreferences();
- mOriginal = sharedPreferences.getInt(mFilePath, V0_DEFAULT_VALUE);
+ mOriginal = sharedPreferences.getInt(mFilePath, GAMMA_DEFAULT_VALUE);
- seekBar.setMax(V0_MAX_VALUE);
+ seekBar.setMax(GAMMA_MAX_VALUE);
reset();
seekBar.setOnSeekBarChangeListener(this);
}