From 5a76e0609f293765f20787911d23ca81144c28de Mon Sep 17 00:00:00 2001 From: mark Date: Mon, 8 Jul 2013 22:07:34 +1000 Subject: smdk4412-common: fix user configurable settings when cancelling dialog Change-Id: Ic01ee60fec08609d0ef129f7080888e49c010eac --- DeviceSettings/src/com/cyanogenmod/settings/device/AudioOut.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DeviceSettings/src/com/cyanogenmod/settings/device/AudioOut.java b/DeviceSettings/src/com/cyanogenmod/settings/device/AudioOut.java index e3b5b9f..179a7dd 100644 --- a/DeviceSettings/src/com/cyanogenmod/settings/device/AudioOut.java +++ b/DeviceSettings/src/com/cyanogenmod/settings/device/AudioOut.java @@ -169,8 +169,8 @@ public class AudioOut extends DialogPreference implements SeekBar.OnSeekBarChang editor.putString(AUDIOOUT_SPEAKER_FILE, String.valueOf(volumeSpeaker)); editor.commit(); } else { - Utils.writeValue(AUDIOOUT_HEADPHONE_FILE, String.valueOf(mHeadphoneOgPercent)); - Utils.writeValue(AUDIOOUT_SPEAKER_FILE, String.valueOf(mSpeakerOgPercent)); + Utils.writeValue(AUDIOOUT_HEADPHONE_FILE, String.valueOf(mHeadphoneOgValue)); + Utils.writeValue(AUDIOOUT_SPEAKER_FILE, String.valueOf(mSpeakerOgValue)); } } @@ -243,7 +243,7 @@ public class AudioOut extends DialogPreference implements SeekBar.OnSeekBarChang double maxValue = MAX_VALUE; double minValue = MIN_VALUE; - double percent = (volume - minValue) * (100 / (maxValue - minValue)); + double percent = Math.round((volume - minValue) * (100 / (maxValue - minValue))); if (percent > 100) percent = 100; -- cgit v1.1