Open
Conversation
Switched call notification to NotificationCompat.CallStyle. This adds answer/decline buttons to the notification so that users can answer incoming calls. Adds caller avatar to notification. Signed-off-by: Jens Zalzala <jens@shakingearthdigital.com>
Signed-off-by: Jens Zalzala <jens@shakingearthdigital.com>
Signed-off-by: Jens Zalzala <jens@shakingearthdigital.com>
Do not cancel the notifications in getRoomnstead, but do it with NotificationManagerCompat.from(this).cancel(notificationId) in processExtras (see commit dcde0be). It seems that things can go wrong that cancelExistingNotificationsForRoom was not reached which caused an indefinite ringing. The underlying cause why this is not reached is NOT fixed with this commit, but instead dismissing the notification in processExtras seems to be like a more reliable approach. Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
new method from 6a6d4d2 with darkMode support is not backported to avoid backport chains. Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
There was a problem hiding this comment.
Pull request overview
Backport of Talk Android changes to improve the incoming-call experience (notification actions, ringing behavior after answering, and lock-screen behavior), aligning stable branch behavior with PR #6015.
Changes:
- Add
NotificationCompat.CallStyleincoming-call notification with answer/decline actions and caller avatar support. - Cancel the ringing notification when an incoming call is answered, and adjust lock-screen/keyguard handling.
- Register a new
DeclineCallReceiverand update Gradle verification metadata.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| gradle/verification-metadata.xml | Updates dependency verification metadata entries (sha entries / also-trust). |
| app/src/main/java/com/nextcloud/talk/receivers/DeclineCallReceiver.kt | Adds receiver used by the notification “Decline” action to cancel the call notification. |
| app/src/main/java/com/nextcloud/talk/jobs/NotificationWorker.kt | Builds improved incoming call notifications (CallStyle), adds answer/decline PendingIntents, adjusts threading. |
| app/src/main/java/com/nextcloud/talk/activities/CallBaseActivity.java | Changes keyguard/lock-screen behavior when showing call UI. |
| app/src/main/java/com/nextcloud/talk/activities/CallActivity.kt | Cancels incoming-call notification after answering; adjusts initial camera enabling behavior. |
| app/src/main/AndroidManifest.xml | Registers DeclineCallReceiver. |
Comments suppressed due to low confidence (1)
app/src/main/java/com/nextcloud/talk/activities/CallBaseActivity.java:82
dismissKeyguard()no longer dismisses the keyguard (it only sets show-when-locked/turn-screen-on flags). This makes the method name misleading and also leavesenableKeyguard()clearingFLAG_DISMISS_KEYGUARDeven though it's no longer set anywhere in this flow. Consider renaming the method (or updating documentation) and keeping the enable/disable flag handling consistent.
void dismissKeyguard() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1) {
setShowWhenLocked(true);
setTurnScreenOn(true);
} else {
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);
}
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1040
to
+1043
| // don't enable the camera if call was answered via notification | ||
| if (!isIncomingCallFromNotification) { | ||
| onCameraClick() | ||
| } |
Comment on lines
+293
to
+299
| val declinePendingIntent = PendingIntent.getBroadcast( | ||
| applicationContext, | ||
| requestCode + DECLINE_CALL_REQUEST_OFFSET, | ||
| Intent(applicationContext, DeclineCallReceiver::class.java).apply { | ||
| putExtra(KEY_NOTIFICATION_TIMESTAMP, pushMessage.timestamp.toInt()) | ||
| }, | ||
| pendingIntentFlags |
Comment on lines
+557
to
+561
| val notificationId = extras.getInt(KEY_NOTIFICATION_TIMESTAMP, 0) | ||
| if (notificationId != 0) { | ||
| // cancel the notification to stop the call ringing | ||
| NotificationManagerCompat.from(this).cancel(notificationId) | ||
| } |
Contributor
|
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/6085.apk |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

manual backport of #6015
replacing #6079
🖼️ Screenshots
🚧 TODO
🏁 Checklist
/backport to stable-xx.x