diff --git a/changelog.d/1126.bugfix b/changelog.d/1126.bugfix new file mode 100644 index 0000000000..5fa6a1b7bf --- /dev/null +++ b/changelog.d/1126.bugfix @@ -0,0 +1 @@ +Correction du crash sur Android 14 quand on reçoit un appel sur Tchap. \ No newline at end of file diff --git a/vector/src/main/java/im/vector/app/core/services/CallAndroidService.kt b/vector/src/main/java/im/vector/app/core/services/CallAndroidService.kt index a4e3872e0f..465e8093ec 100644 --- a/vector/src/main/java/im/vector/app/core/services/CallAndroidService.kt +++ b/vector/src/main/java/im/vector/app/core/services/CallAndroidService.kt @@ -181,11 +181,8 @@ class CallAndroidService : VectorAndroidService() { title = callInformation.opponentMatrixItem?.getBestName() ?: callInformation.opponentUserId, fromBg = fromBg ) - if (knownCalls.isEmpty()) { - startForegroundCompat(callId.hashCode(), notification) - } else { - notificationManager.notify(callId.hashCode(), notification) - } + // TCHAP fix crash when a call incoming on Androd 14 and higher + notificationManager.notify(callId.hashCode(), notification) knownCalls[callId] = callInformation } @@ -202,7 +199,8 @@ class CallAndroidService : VectorAndroidService() { } val notification = notificationUtils.buildCallEndedNotification(false) val notificationId = callId.hashCode() - startForegroundCompat(notificationId, notification) + // TCHAP fix crash when a call incoming on Androd 14 and higher + notificationManager.notify(notificationId, notification) if (knownCalls.isEmpty()) { Timber.tag(loggerTag.value).v("No more call, stop the service") stopForegroundCompat() @@ -260,11 +258,8 @@ class CallAndroidService : VectorAndroidService() { call = call, title = callInformation.opponentMatrixItem?.getBestName() ?: callInformation.opponentUserId ) - if (knownCalls.isEmpty()) { - startForegroundCompat(callId.hashCode(), notification) - } else { - notificationManager.notify(callId.hashCode(), notification) - } + // TCHAP fix crash when a call incoming on Androd 14 and higher + startForegroundCompat(callId.hashCode(), notification) knownCalls[callId] = callInformation }