diff options
author | Pawit Pornkitprasan <p.pawit@gmail.com> | 2012-04-25 15:16:34 +0700 |
---|---|---|
committer | Pawit Pornkitprasan <p.pawit@gmail.com> | 2012-04-25 15:16:34 +0700 |
commit | 86947e0a1fb8d862e9f0ee1afbc94133c0d84f20 (patch) | |
tree | ef10c7bdac9e8915e82efcce827ede49de86baa1 /AriesParts | |
parent | d42f625b12e42b40a87235b5e2ed3c9c916d8c50 (diff) | |
download | device_samsung_aries-common-86947e0a1fb8d862e9f0ee1afbc94133c0d84f20.zip device_samsung_aries-common-86947e0a1fb8d862e9f0ee1afbc94133c0d84f20.tar.gz device_samsung_aries-common-86947e0a1fb8d862e9f0ee1afbc94133c0d84f20.tar.bz2 |
AriesParts: Fix gamma adjustment values being doubled before being written
Change-Id: I9602b49050bd501eee69460ae72d81e86f8cd885
Diffstat (limited to 'AriesParts')
-rw-r--r-- | AriesParts/src/com/cyanogenmod/settings/device/ColorTuningPreference.java | 9 | ||||
-rw-r--r-- | AriesParts/src/com/cyanogenmod/settings/device/Utils.java | 9 |
2 files changed, 17 insertions, 1 deletions
diff --git a/AriesParts/src/com/cyanogenmod/settings/device/ColorTuningPreference.java b/AriesParts/src/com/cyanogenmod/settings/device/ColorTuningPreference.java index 2bb4c91..ea1c5ad 100644 --- a/AriesParts/src/com/cyanogenmod/settings/device/ColorTuningPreference.java +++ b/AriesParts/src/com/cyanogenmod/settings/device/ColorTuningPreference.java @@ -62,7 +62,7 @@ public class ColorTuningPreference extends DialogPreference { private static final int MAX_VALUE = Integer.MAX_VALUE; - private static final int GAMMA_MAX_VALUE = 20; + private static final int GAMMA_MAX_VALUE = 40; private static final int GAMMA_DEFAULT_VALUE = 0; // Track instances to know when to restore original color @@ -227,6 +227,13 @@ public class ColorTuningPreference extends DialogPreference { } @Override + public void onProgressChanged(SeekBar seekBar, int progress, + boolean fromUser) { + Utils.writeGamma(mFilePath, progress); + updateValue(progress); + } + + @Override protected void updateValue(int progress) { mValueDisplay.setText("-" + progress); } diff --git a/AriesParts/src/com/cyanogenmod/settings/device/Utils.java b/AriesParts/src/com/cyanogenmod/settings/device/Utils.java index f112e09..3848b7a 100644 --- a/AriesParts/src/com/cyanogenmod/settings/device/Utils.java +++ b/AriesParts/src/com/cyanogenmod/settings/device/Utils.java @@ -36,6 +36,15 @@ public class Utils { } /** + * Write the "gamma value" to the specified file. + * @param filename The filename + * @param value The value + */ + public static void writeGamma(String filename, int value) { + writeValue(filename, String.valueOf(value)); + } + + /** * Check if the specified file exists. * @param filename The filename * @return Whether the file exists or not |