From 9a673e240229d52d802960ccc88dc681bd236ed2 Mon Sep 17 00:00:00 2001 From: yostyle Date: Fri, 8 Nov 2024 20:16:51 +0100 Subject: [PATCH 1/4] Fix crash for incoming call --- .../app/core/services/CallAndroidService.kt | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) 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..bb95a07a66 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 } From 4d4961e4bd88775d6bf1bdab59d7c1b10392da99 Mon Sep 17 00:00:00 2001 From: yostyle Date: Fri, 8 Nov 2024 20:28:33 +0100 Subject: [PATCH 2/4] Add changelog --- changelog.d/1126.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1126.bugfix 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 From 82d08843098060a3cccce0b3ad9eb8587d363e00 Mon Sep 17 00:00:00 2001 From: yostyle Date: Fri, 8 Nov 2024 22:49:05 +0100 Subject: [PATCH 3/4] Fix lint --- .../java/im/vector/app/core/services/CallAndroidService.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 bb95a07a66..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,7 +181,7 @@ class CallAndroidService : VectorAndroidService() { title = callInformation.opponentMatrixItem?.getBestName() ?: callInformation.opponentUserId, fromBg = fromBg ) - //TCHAP fix crash when a call incoming on Androd 14 and higher + // TCHAP fix crash when a call incoming on Androd 14 and higher notificationManager.notify(callId.hashCode(), notification) knownCalls[callId] = callInformation } @@ -199,7 +199,7 @@ class CallAndroidService : VectorAndroidService() { } val notification = notificationUtils.buildCallEndedNotification(false) val notificationId = callId.hashCode() - //TCHAP fix crash when a call incoming on Androd 14 and higher + // 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") @@ -258,7 +258,7 @@ class CallAndroidService : VectorAndroidService() { call = call, title = callInformation.opponentMatrixItem?.getBestName() ?: callInformation.opponentUserId ) - //TCHAP fix crash when a call incoming on Androd 14 and higher + // TCHAP fix crash when a call incoming on Androd 14 and higher startForegroundCompat(callId.hashCode(), notification) knownCalls[callId] = callInformation } From 41da7c0a2d9abeb10ee2fec27901263751bb8d99 Mon Sep 17 00:00:00 2001 From: yostyle Date: Sat, 9 Nov 2024 02:44:25 +0100 Subject: [PATCH 4/4] Update changes --- TCHAP_CHANGES.md | 7 +++++++ changelog.d/1126.bugfix | 1 - towncrier.toml | 2 +- vector-app/build.gradle | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/1126.bugfix diff --git a/TCHAP_CHANGES.md b/TCHAP_CHANGES.md index 1e6a5ad5d1..e0db38c9c3 100644 --- a/TCHAP_CHANGES.md +++ b/TCHAP_CHANGES.md @@ -1,3 +1,10 @@ +Changes in Tchap 2.13.9 (2024-11-09) +==================================== + +Bugfixes šŸ› +---------- + - Correction du crash sur Android 14 quand on reƧoit un appel sur Tchap. ([#1126](https://github.com/tchapgouv/tchap-android/issues/1126)) + Changes in Tchap 2.13.7 (2024-10-31) ==================================== diff --git a/changelog.d/1126.bugfix b/changelog.d/1126.bugfix deleted file mode 100644 index 5fa6a1b7bf..0000000000 --- a/changelog.d/1126.bugfix +++ /dev/null @@ -1 +0,0 @@ -Correction du crash sur Android 14 quand on reƧoit un appel sur Tchap. \ No newline at end of file diff --git a/towncrier.toml b/towncrier.toml index c5d7ddaf96..9cf591276d 100644 --- a/towncrier.toml +++ b/towncrier.toml @@ -1,5 +1,5 @@ [tool.towncrier] - version = "2.13.7" + version = "2.13.9" directory = "changelog.d" filename = "TCHAP_CHANGES.md" name = "Changes in Tchap" diff --git a/vector-app/build.gradle b/vector-app/build.gradle index 411df1274b..834f3d8869 100644 --- a/vector-app/build.gradle +++ b/vector-app/build.gradle @@ -37,7 +37,7 @@ ext.versionMinor = 13 // Note: even values are reserved for regular release, odd values for hotfix release. // When creating a hotfix, you should decrease the value, since the current value // is the value for the next regular release. -ext.versionPatch = 7 +ext.versionPatch = 9 static def getGitTimestamp() { def cmd = 'git show -s --format=%ct'