diff options
| author | Roman Birg <romanbirg@gmail.com> | 2013-01-15 23:48:45 +0100 |
|---|---|---|
| committer | Michael Stucki <michael.stucki@typo3.org> | 2013-01-31 16:45:07 +0000 |
| commit | 7ef69d43d84fd6ce95e9274c9c1d19a06b5709e1 (patch) | |
| tree | 4071afba4efbf2f5f83fe6ab11aa43f63af3bd09 /services/java/com/android/server/NotificationManagerService.java | |
| parent | 679d1a9a60c7f473378c3befa27fe1c995b63a38 (diff) | |
| download | frameworks_base-7ef69d43d84fd6ce95e9274c9c1d19a06b5709e1.zip frameworks_base-7ef69d43d84fd6ce95e9274c9c1d19a06b5709e1.tar.gz frameworks_base-7ef69d43d84fd6ce95e9274c9c1d19a06b5709e1.tar.bz2 | |
Notification sound-to-vibration conversion toggle
Allows to change the new feature of AOSP 4.2, where all notification are
changed to vibrations on vibrate mode. Instead, allow the old behaviour
to silence sound notifications and to only play vibrations if desired.
Alle credits go to romanbb from AOKP, I just ported it.
Original AOKP-Commit:
https://github.com/AOKP/frameworks_base/commit/c1b2bb9b5d0c33e790973841bb2acaa5ea5d51fe
Change-Id: Id27dd2975d3383f6d7395a0ee995d7832e87ca66
Diffstat (limited to 'services/java/com/android/server/NotificationManagerService.java')
| -rwxr-xr-x | services/java/com/android/server/NotificationManagerService.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java index 757160e..c844a6e 100755 --- a/services/java/com/android/server/NotificationManagerService.java +++ b/services/java/com/android/server/NotificationManagerService.java @@ -1246,7 +1246,8 @@ public class NotificationManagerService extends INotificationManager.Stub final boolean convertSoundToVibration = !hasCustomVibrate && (useDefaultSound || notification.sound != null) - && (audioManager.getRingerMode() == AudioManager.RINGER_MODE_VIBRATE); + && (audioManager.getRingerMode() == AudioManager.RINGER_MODE_VIBRATE) + && (Settings.System.getInt(mContext.getContentResolver(), Settings.System.NOTIFICATION_CONVERT_SOUND_TO_VIBRATION, 1) != 0); // The DEFAULT_VIBRATE flag trumps any custom vibration. final boolean useDefaultVibrate = |
