Open dva-re opened 6 years ago
Hi @dva-re thanks, we will invertigate
Android 8.0 too
I've run into this bug on an LG V30 running Android 8.0, the notification of an incoming call cannot be dismissed (even if you accepted or rejected the call). I have to kill Riot to get rid of the notification in the main pulldown menu.
Not sure I will have time to handle this, but I will do my best
I can confirm this happens on the F-Droid version, does it happen on the Google version too?
Same issue on LineageOs, with Riot from fdroid without Google Play services !
@lascapi F-Droid's version of Riot is quite a bit behind what is in Google Play IIRC, it has not been updated since 2019-04-26. Sideloading a newer build wouldn't be the worst idea, this issue of unmaintained apps in F-Droid is quite common.
Found the same issue on my device (Latest F-Droid Version 0.9.4). This will happen in two cases:
I inspected some code and found the pull request doesn't work. But I do find more details about this bug.
The notification starts from here [Call service] (https://github.com/vector-im/riot-android/blob/c93e3a7f047a5919ae8a0c973af065222404e340/vector/src/main/java/im/vector/services/CallService.kt)
fun onIncomingCall(context: Context,
isVideo: Boolean,
roomName: String,
roomId: String,
matrixId: String,
callId: String) {
val intent = Intent(context, CallService::class.java)
.apply {
action = ACTION_INCOMING_CALL
putExtra(EXTRA_IS_VIDEO, isVideo)
putExtra(EXTRA_ROOM_NAME, roomName)
putExtra(EXTRA_ROOM_ID, roomId)
putExtra(EXTRA_MATRIX_ID, matrixId)
putExtra(EXTRA_CALL_ID, callId)
}
ContextCompat.startForegroundService(context, intent)
The problem is. If there was an incoming call but has already been cancelled, riot-android will still think it's an incoming call and this function will be called. But now other mechanisms used to stop this notification service will not work when the app is in background.
So the way to solve this is try to distinguish past incoming call request and real incoming call request.
I tried to make some changes in the code, and managed to fix this notification in EventStreamService.kt by checking whether there is such notification displayed but the activecall object in CallsManager.java is null (which means no active call but this notification call still displays).
However, such fix doesn't fix all the problem. If I do this, there will be no notification about unanswered call.
The expected behaviour would be:
If someone calls me and I start talking on the PC, and at this point, Android receives the event about the call with a little delay, the notification remains forever.
on develop build G-b2266 Android 7.1.2 room is encrypted.