mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 11:39:42 +01:00
Fix vibration and fix #745
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
5a1e050928
commit
408da749fe
@ -19,5 +19,5 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation "com.google.firebase:firebase-messaging:20.1.0"
|
implementation "com.google.firebase:firebase-messaging:20.1.2"
|
||||||
}
|
}
|
||||||
|
@ -214,7 +214,6 @@ class MagicFirebaseMessagingService : FirebaseMessagingService() {
|
|||||||
.setContentIntent(fullScreenPendingIntent)
|
.setContentIntent(fullScreenPendingIntent)
|
||||||
.setFullScreenIntent(fullScreenPendingIntent, true)
|
.setFullScreenIntent(fullScreenPendingIntent, true)
|
||||||
.setSound(soundUri)
|
.setSound(soundUri)
|
||||||
.setVibrate(NotificationUtils.getVibrationEffectForCalls())
|
|
||||||
.build()
|
.build()
|
||||||
notification.flags = notification.flags or Notification.FLAG_INSISTENT
|
notification.flags = notification.flags or Notification.FLAG_INSISTENT
|
||||||
isServiceInForeground = true
|
isServiceInForeground = true
|
||||||
|
@ -361,13 +361,13 @@ public class CallNotificationController extends BaseController {
|
|||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
if (vibrator.hasAmplitudeControl()) {
|
if (vibrator.hasAmplitudeControl()) {
|
||||||
vibrationEffect = VibrationEffect.createWaveform(vibratePattern, amplitudes, -1);
|
vibrationEffect = VibrationEffect.createWaveform(vibratePattern, amplitudes, -1);
|
||||||
vibrator.vibrate(vibrationEffect);
|
//vibrator.vibrate(vibrationEffect);
|
||||||
} else {
|
} else {
|
||||||
vibrationEffect = VibrationEffect.createWaveform(vibratePattern, -1);
|
vibrationEffect = VibrationEffect.createWaveform(vibratePattern, -1);
|
||||||
vibrator.vibrate(vibrationEffect);
|
//vibrator.vibrate(vibrationEffect);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
vibrator.vibrate(vibratePattern, -1);
|
//vibrator.vibrate(vibratePattern, -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -546,9 +546,9 @@ public class NotificationWorker extends Worker {
|
|||||||
|
|
||||||
if (vibrator != null) {
|
if (vibrator != null) {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
vibrator.vibrate(VibrationEffect.createOneShot(500, VibrationEffect.DEFAULT_AMPLITUDE));
|
//vibrator.vibrate(VibrationEffect.createOneShot(500, VibrationEffect.DEFAULT_AMPLITUDE));
|
||||||
} else {
|
} else {
|
||||||
vibrator.vibrate(500);
|
//vibrator.vibrate(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user