Skip to content

Commit

Permalink
Fix crash for incoming call (#1128)
Browse files Browse the repository at this point in the history
  • Loading branch information
yostyle authored Nov 12, 2024
1 parent 86fb5d1 commit b6d8c7f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 14 deletions.
1 change: 1 addition & 0 deletions changelog.d/1126.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Correction du crash sur Android 14 quand on reçoit un appel sur Tchap.
2 changes: 1 addition & 1 deletion towncrier.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.towncrier]
version = "2.13.8"
version = "2.13.9"
directory = "changelog.d"
filename = "TCHAP_CHANGES.md"
name = "Changes in Tchap"
Expand Down
2 changes: 1 addition & 1 deletion vector-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 = 8
ext.versionPatch = 9

static def getGitTimestamp() {
def cmd = 'git show -s --format=%ct'
Expand Down
1 change: 0 additions & 1 deletion vector-config/src/tchap/res/values/config-features.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@
<item>agent.dinum.tchap.gouv.fr</item>
<item>agent.education.tchap.gouv.fr</item>
<item>agent.tchap.gouv.fr</item>
<item>agent.intradef.tchap.gouv.fr</item>
</string-array>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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()
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit b6d8c7f

Please sign in to comment.