summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2013-07-01 11:54:44 +0200
committerDanny Baumann <dannybaumann@web.de>2013-07-02 16:46:58 +0200
commit5d68d4bf506b539ea9027cad638eaba211155969 (patch)
treed3c60d00892edd4acb62615100ed02b66daad31b /src
parent260c191d802b685fda63205b5426aa1af35163bb (diff)
downloadpackages_apps_Settings-5d68d4bf506b539ea9027cad638eaba211155969.zip
packages_apps_Settings-5d68d4bf506b539ea9027cad638eaba211155969.tar.gz
packages_apps_Settings-5d68d4bf506b539ea9027cad638eaba211155969.tar.bz2
Add an option to allow a (subtle) notification vibration during calls.
Change-Id: I7dfbb64334e0e8e7f98d38bf503c053ff1880658 JIRA:CYAN-1550
Diffstat (limited to 'src')
-rw-r--r--src/com/android/settings/SoundSettings.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/com/android/settings/SoundSettings.java b/src/com/android/settings/SoundSettings.java
index d7a5c97..b73ed45 100644
--- a/src/com/android/settings/SoundSettings.java
+++ b/src/com/android/settings/SoundSettings.java
@@ -90,6 +90,7 @@ public class SoundSettings extends SettingsPreferenceFragment implements
private static final String KEY_VOLBTN_MUSIC_CTRL = "volbtn_music_controls";
private static final String KEY_HEADSET_CONNECT_PLAYER = "headset_connect_player";
private static final String KEY_CONVERT_SOUND_TO_VIBRATE = "notification_convert_sound_to_vibration";
+ private static final String KEY_VIBRATE_DURING_CALLS = "notification_vibrate_during_calls";
private static final String KEY_SAFE_HEADSET_VOLUME = "safe_headset_volume";
private static final String KEY_VOLUME_ADJUST_SOUNDS = "volume_adjust_sounds";
private static final String KEY_POWER_NOTIFICATIONS = "power_notifications";
@@ -126,6 +127,7 @@ public class SoundSettings extends SettingsPreferenceFragment implements
private CheckBoxPreference mVolBtnMusicCtrl;
private CheckBoxPreference mHeadsetConnectPlayer;
private CheckBoxPreference mConvertSoundToVibration;
+ private CheckBoxPreference mVibrateDuringCalls;
private Preference mRingtonePreference;
private Preference mNotificationPreference;
private PreferenceScreen mQuietHours;
@@ -273,6 +275,10 @@ public class SoundSettings extends SettingsPreferenceFragment implements
mConvertSoundToVibration.setChecked(Settings.System.getInt(resolver,
Settings.System.NOTIFICATION_CONVERT_SOUND_TO_VIBRATION, 1) != 0);
+ mVibrateDuringCalls = (CheckBoxPreference) findPreference(KEY_VIBRATE_DURING_CALLS);
+ mVibrateDuringCalls.setChecked(Settings.System.getInt(resolver,
+ Settings.System.NOTIFICATION_VIBRATE_DURING_ALERTS_DISABLED, 0) != 0);
+
mRingtonePreference = findPreference(KEY_RINGTONE);
mNotificationPreference = findPreference(KEY_NOTIFICATION_SOUND);
@@ -281,6 +287,7 @@ public class SoundSettings extends SettingsPreferenceFragment implements
removePreference(KEY_VIBRATE);
removePreference(KEY_HAPTIC_FEEDBACK);
removePreference(KEY_CONVERT_SOUND_TO_VIBRATE);
+ removePreference(KEY_VIBRATE_DURING_CALLS);
}
if (TelephonyManager.PHONE_TYPE_CDMA == activePhoneType) {
@@ -491,6 +498,11 @@ public class SoundSettings extends SettingsPreferenceFragment implements
Settings.System.putInt(getContentResolver(), Settings.System.NOTIFICATION_CONVERT_SOUND_TO_VIBRATION,
mConvertSoundToVibration.isChecked() ? 1 : 0);
+ } else if (preference == mVibrateDuringCalls) {
+ Settings.System.putInt(getContentResolver(),
+ Settings.System.NOTIFICATION_VIBRATE_DURING_ALERTS_DISABLED,
+ mVibrateDuringCalls.isChecked() ? 1 : 0);
+
} else if (preference == mMusicFx) {
// let the framework fire off the intent
return false;