summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/notification/OtherSoundSettings.java
diff options
context:
space:
mode:
authorMichael Bestas <mikeioannina@gmail.com>2014-12-18 00:19:27 +0200
committerAdnan Begovic <adnan@cyngn.com>2015-10-29 17:36:32 -0700
commit090c727e9fea698aee8a2712cc8ee488c5e2f2c2 (patch)
tree6800e1d2bd090c5bbd9e25ba95a744e89efe959b /src/com/android/settings/notification/OtherSoundSettings.java
parentd2d9f45236308fc9f722bf897030d1aacfbc8be8 (diff)
downloadpackages_apps_Settings-090c727e9fea698aee8a2712cc8ee488c5e2f2c2.zip
packages_apps_Settings-090c727e9fea698aee8a2712cc8ee488c5e2f2c2.tar.gz
packages_apps_Settings-090c727e9fea698aee8a2712cc8ee488c5e2f2c2.tar.bz2
Feature : Volume adjust sound preference 2/2
This patch allows the users to choose if they want the audible tone when adjusting the volume Change-Id: I6d43cba83bf4cf10f2d50502e7cee5408a73c520
Diffstat (limited to 'src/com/android/settings/notification/OtherSoundSettings.java')
-rw-r--r--src/com/android/settings/notification/OtherSoundSettings.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/com/android/settings/notification/OtherSoundSettings.java b/src/com/android/settings/notification/OtherSoundSettings.java
index a907a19..a41f6f2 100644
--- a/src/com/android/settings/notification/OtherSoundSettings.java
+++ b/src/com/android/settings/notification/OtherSoundSettings.java
@@ -63,6 +63,7 @@ public class OtherSoundSettings extends SettingsPreferenceFragment implements In
private static final String KEY_SCREEN_LOCKING_SOUNDS = "screen_locking_sounds";
private static final String KEY_CHARGING_SOUNDS = "charging_sounds";
private static final String KEY_DOCKING_SOUNDS = "docking_sounds";
+ private static final String KEY_VOLUME_ADJUST_SOUNDS = "volume_adjust_sounds";
private static final String KEY_TOUCH_SOUNDS = "touch_sounds";
private static final String KEY_VIBRATE_ON_TOUCH = "vibrate_on_touch";
private static final String KEY_DOCK_AUDIO_MEDIA = "dock_audio_media";
@@ -91,6 +92,15 @@ public class OtherSoundSettings extends SettingsPreferenceFragment implements In
}
};
+ private static final SettingPref PREF_VOLUME_ADJUST_SOUNDS = new SettingPref(
+ TYPE_SYSTEM, KEY_VOLUME_ADJUST_SOUNDS, System.VOLUME_ADJUST_SOUNDS_ENABLED,
+ DEFAULT_ON) {
+ @Override
+ public boolean isApplicable(Context context) {
+ return Utils.hasVolumeRocker(context);
+ }
+ };
+
private static final SettingPref PREF_TOUCH_SOUNDS = new SettingPref(
TYPE_SYSTEM, KEY_TOUCH_SOUNDS, System.SOUND_EFFECTS_ENABLED, DEFAULT_ON) {
@Override
@@ -172,6 +182,7 @@ public class OtherSoundSettings extends SettingsPreferenceFragment implements In
PREF_SCREEN_LOCKING_SOUNDS,
PREF_CHARGING_SOUNDS,
PREF_DOCKING_SOUNDS,
+ PREF_VOLUME_ADJUST_SOUNDS,
PREF_TOUCH_SOUNDS,
PREF_VIBRATE_ON_TOUCH,
PREF_DOCK_AUDIO_MEDIA,