summaryrefslogtreecommitdiffstats
path: root/DeviceSettings
diff options
context:
space:
mode:
authormark <mcampbellsmith@gmail.com>2013-07-08 22:07:34 +1000
committermark <mcampbellsmith@gmail.com>2013-07-08 22:30:05 +1000
commit5a76e0609f293765f20787911d23ca81144c28de (patch)
tree6e0ea03b10ea5a081da08085355b2bd1d8cbbae6 /DeviceSettings
parentd3aed0a775d81f9235e574f6faa11ff9ec0ec358 (diff)
downloaddevice_samsung_smdk4412-common-5a76e0609f293765f20787911d23ca81144c28de.zip
device_samsung_smdk4412-common-5a76e0609f293765f20787911d23ca81144c28de.tar.gz
device_samsung_smdk4412-common-5a76e0609f293765f20787911d23ca81144c28de.tar.bz2
smdk4412-common: fix user configurable settings when cancelling dialog
Change-Id: Ic01ee60fec08609d0ef129f7080888e49c010eac
Diffstat (limited to 'DeviceSettings')
-rw-r--r--DeviceSettings/src/com/cyanogenmod/settings/device/AudioOut.java6
1 files 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;