Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2184f99a authored by Ed Heyl's avatar Ed Heyl Committed by Android Git Automerger
Browse files

am ffea9170: am 5ec97f4e: am 4f017e75: Merge "When in vibrate mode, all...

am ffea9170: am 5ec97f4e: am 4f017e75: Merge "When in vibrate mode, all notifications will vibrate." into jb-mr1.1-dev

* commit 'ffea9170':
  When in vibrate mode, all notifications will vibrate.
parents 6e9801a7 ffea9170
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -1086,8 +1086,17 @@ public class NotificationManagerService extends INotificationManager.Stub
                }

                // vibrate
                // new in 4.2: if there was supposed to be a sound and we're in vibrate mode,
                // we always vibrate, even if no vibration was specified
                final boolean convertSoundToVibration =
                           notification.vibrate == null
                        && (useDefaultSound || notification.sound != null)
                        && (audioManager.getRingerMode() == AudioManager.RINGER_MODE_VIBRATE);

                final boolean useDefaultVibrate =
                    (notification.defaults & Notification.DEFAULT_VIBRATE) != 0;
                    (notification.defaults & Notification.DEFAULT_VIBRATE) != 0
                    || convertSoundToVibration;

                if ((useDefaultVibrate || notification.vibrate != null)
                        && !(audioManager.getRingerMode() == AudioManager.RINGER_MODE_SILENT)) {
                    mVibrateNotification = r;