diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/voip/VoIPPreNotificationService.java b/TMessagesProj/src/main/java/org/telegram/messenger/voip/VoIPPreNotificationService.java index 5b9548ed10..0a91674200 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/voip/VoIPPreNotificationService.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/voip/VoIPPreNotificationService.java @@ -363,7 +363,11 @@ private static void startRinging(Context context, int account, long user_id) { } else if (vibrate == 3) { duration *= 2; } - vibrator.vibrate(new long[]{0, duration, 500}, 0); + AudioAttributes audioAttributes = new AudioAttributes.Builder() + .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION) + .setUsage(AudioAttributes.USAGE_NOTIFICATION_RINGTONE) + .build(); + vibrator.vibrate(new long[]{0, duration, 500}, 0, audioAttributes); } } } diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/voip/VoIPService.java b/TMessagesProj/src/main/java/org/telegram/messenger/voip/VoIPService.java index bfacc644b6..d7c25dfb79 100755 --- a/TMessagesProj/src/main/java/org/telegram/messenger/voip/VoIPService.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/voip/VoIPService.java @@ -3148,7 +3148,11 @@ private void startRingtoneAndVibration(long chatID) { } else if (vibrate == 3) { duration *= 2; } - vibrator.vibrate(new long[]{0, duration, 500}, 0); + AudioAttributes audioAttributes = new AudioAttributes.Builder() + .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION) + .setUsage(AudioAttributes.USAGE_NOTIFICATION_RINGTONE) + .build(); + vibrator.vibrate(new long[]{0, duration, 500}, 0, audioAttributes); } } }