summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjt1134 <jt1134@gmail.com>2012-11-11 01:20:22 -0600
committerjt1134 <jt1134@gmail.com>2012-11-11 01:20:22 -0600
commitf3fb7a1961ac65b71dabc76b3f78c48836d54e0d (patch)
tree5fc31ab11cd5c1a69e03dd359b5af4955dcc9677
parente92519a5105e599d6ce69950797ae8bd6866530e (diff)
downloaddevice_samsung_aries-common-f3fb7a1961ac65b71dabc76b3f78c48836d54e0d.zip
device_samsung_aries-common-f3fb7a1961ac65b71dabc76b3f78c48836d54e0d.tar.gz
device_samsung_aries-common-f3fb7a1961ac65b71dabc76b3f78c48836d54e0d.tar.bz2
AriesParts: use sane default values for microphone gain
Change-Id: Ic1c1a7ad5fc0b40c411827475b6fe8312efbfb10
-rw-r--r--AriesParts/src/com/cyanogenmod/settings/device/VolumeBoostPreference.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/AriesParts/src/com/cyanogenmod/settings/device/VolumeBoostPreference.java b/AriesParts/src/com/cyanogenmod/settings/device/VolumeBoostPreference.java
index efbf293..f168314 100644
--- a/AriesParts/src/com/cyanogenmod/settings/device/VolumeBoostPreference.java
+++ b/AriesParts/src/com/cyanogenmod/settings/device/VolumeBoostPreference.java
@@ -63,7 +63,7 @@ public class VolumeBoostPreference extends DialogPreference {
private static final int BOOST_DEFAULT_VALUE = 2;
private static final int BOOST_MAX_VALUE = 3;
- private static final int[] MIC_DEFAULT_VALUE = new int[] { 19, 31, 29, 18 };
+ private static final int MIC_DEFAULT_VALUE = 18;
private static final int MIC_MAX_VALUE = 31;
// Track instances to know when to restore original value
@@ -91,7 +91,7 @@ public class VolumeBoostPreference extends DialogPreference {
for (int i = 0; i < MIC_SEEKBAR_ID.length; i++) {
SeekBar seekBar = (SeekBar) view.findViewById(MIC_SEEKBAR_ID[i]);
TextView valueDisplay = (TextView) view.findViewById(MIC_VALUE_DISPLAY_ID[i]);
- mSeekBars[SEEKBAR_ID.length + i] = new MicSeekBar(seekBar, valueDisplay, MIC_FILE_PATH[i], i);
+ mSeekBars[SEEKBAR_ID.length + i] = new MicSeekBar(seekBar, valueDisplay, MIC_FILE_PATH[i]);
}
}
@@ -128,7 +128,7 @@ public class VolumeBoostPreference extends DialogPreference {
}
for (int i = 0; i < MIC_FILE_PATH.length; i++) {
- int value = sharedPrefs.getInt(MIC_FILE_PATH[i], MIC_DEFAULT_VALUE[i]);
+ int value = sharedPrefs.getInt(MIC_FILE_PATH[i], MIC_DEFAULT_VALUE);
Utils.writeValue(MIC_FILE_PATH[i], String.valueOf(value));
}
}
@@ -215,14 +215,14 @@ public class VolumeBoostPreference extends DialogPreference {
class MicSeekBar extends VolumeSeekBar {
- public MicSeekBar(SeekBar seekBar, TextView valueDisplay, String filePath, int defaultValue) {
+ public MicSeekBar(SeekBar seekBar, TextView valueDisplay, String filePath) {
mSeekBar = seekBar;
mValueDisplay = valueDisplay;
mFilePath = filePath;
// Read original value
SharedPreferences sharedPreferences = getSharedPreferences();
- mOriginal = sharedPreferences.getInt(mFilePath, MIC_DEFAULT_VALUE[defaultValue]);
+ mOriginal = sharedPreferences.getInt(mFilePath, MIC_DEFAULT_VALUE);
seekBar.setMax(MIC_MAX_VALUE);
reset();