Loading services/java/com/android/server/NotificationManagerService.java +7 −2 Original line number Diff line number Diff line Loading @@ -1246,8 +1246,8 @@ public class NotificationManagerService extends INotificationManager.Stub final boolean convertSoundToVibration = !hasCustomVibrate && (useDefaultSound || notification.sound != null) && (audioManager.getRingerMode() == AudioManager.RINGER_MODE_VIBRATE) && (Settings.System.getInt(mContext.getContentResolver(), Settings.System.NOTIFICATION_CONVERT_SOUND_TO_VIBRATION, 1) != 0); && shouldConvertSoundToVibration() && (audioManager.getRingerMode() == AudioManager.RINGER_MODE_VIBRATE); // The DEFAULT_VIBRATE flag trumps any custom vibration. final boolean useDefaultVibrate = Loading Loading @@ -1299,6 +1299,11 @@ public class NotificationManagerService extends INotificationManager.Stub idOut[0] = id; } private boolean shouldConvertSoundToVibration() { return Settings.System.getInt(mContext.getContentResolver(), Settings.System.NOTIFICATION_CONVERT_SOUND_TO_VIBRATION, 1) != 0; } private boolean inQuietHours() { if (mQuietHoursEnabled && (mQuietHoursStart != mQuietHoursEnd)) { // Get the date in "quiet hours" format. Loading Loading
services/java/com/android/server/NotificationManagerService.java +7 −2 Original line number Diff line number Diff line Loading @@ -1246,8 +1246,8 @@ public class NotificationManagerService extends INotificationManager.Stub final boolean convertSoundToVibration = !hasCustomVibrate && (useDefaultSound || notification.sound != null) && (audioManager.getRingerMode() == AudioManager.RINGER_MODE_VIBRATE) && (Settings.System.getInt(mContext.getContentResolver(), Settings.System.NOTIFICATION_CONVERT_SOUND_TO_VIBRATION, 1) != 0); && shouldConvertSoundToVibration() && (audioManager.getRingerMode() == AudioManager.RINGER_MODE_VIBRATE); // The DEFAULT_VIBRATE flag trumps any custom vibration. final boolean useDefaultVibrate = Loading Loading @@ -1299,6 +1299,11 @@ public class NotificationManagerService extends INotificationManager.Stub idOut[0] = id; } private boolean shouldConvertSoundToVibration() { return Settings.System.getInt(mContext.getContentResolver(), Settings.System.NOTIFICATION_CONVERT_SOUND_TO_VIBRATION, 1) != 0; } private boolean inQuietHours() { if (mQuietHoursEnabled && (mQuietHoursStart != mQuietHoursEnd)) { // Get the date in "quiet hours" format. Loading