Skip to content

[Telecom-2] Extract incoming-call coordination in video sdk - #1808

Open
rahul-lohra wants to merge 3 commits into
bugfix/rahullohra/telecom-registration-lifecyclefrom
refactor/rahullohra/incoming-call-orchestration
Open

[Telecom-2] Extract incoming-call coordination in video sdk#1808
rahul-lohra wants to merge 3 commits into
bugfix/rahullohra/telecom-registration-lifecyclefrom
refactor/rahullohra/incoming-call-orchestration

Conversation

@rahul-lohra

@rahul-lohra rahul-lohra commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Goal

Closes #AND-1491

Extract incoming-call coordination

Implementation

  • extract IncomingCallRequest and IncomingCallCoordinator
  • move the existing incoming-call behavior into PreAndroid17IncomingCallCoordinator
  • keep ServiceLauncher as the routing boundary

Public API changes

  • None.
  • IncomingCallRequest, IncomingCallCoordinator, and the coordinator implementation remain internal.

Stack

PR 2 of 5. Depends on #1807.

Testing

  • focused ServiceLauncher unit tests

Summary by CodeRabbit

  • Improvements
    • Improved incoming call notification handling and dismissal.
    • Incoming calls can be coordinated more consistently with Android telecom services on devices running older Android versions.
    • Enhanced support for incoming video call registration when device permissions and service conditions allow.
    • Improved fallback behavior when an incoming call service cannot be started.

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

PR checklist ✅

All required conditions are satisfied:

  • Title length is OK (or ignored by label).
  • At least one pr: label exists.
  • Sections ### Goal, ### Implementation, and ### Testing are filled, or the PR is bot-authored.
  • An issue is linked (Linear ticket or GitHub issue), or the PR is bot-authored.

🎉 Great job! This PR is ready for review.

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

SDK Size Comparison 📏

SDK Before After Difference Status
stream-video-android-core 12.36 MB 12.36 MB 0.00 MB 🟢
stream-video-android-ui-xml 5.68 MB 5.68 MB 0.00 MB 🟢
stream-video-android-ui-compose 6.23 MB 6.23 MB 0.00 MB 🟢

@rahul-lohra rahul-lohra changed the title refactor(core): extract incoming-call coordination [Telecom-2] Extract incoming-call coordination Sep 4, 2026
@rahul-lohra rahul-lohra self-assigned this Sep 4, 2026
@rahul-lohra
rahul-lohra force-pushed the refactor/rahullohra/incoming-call-orchestration branch from c34c074 to 9f185c2 Compare September 4, 2026 10:33
@rahul-lohra
rahul-lohra force-pushed the refactor/rahullohra/incoming-call-orchestration branch from 9f185c2 to f6fdcbf Compare September 4, 2026 11:05
@rahul-lohra
rahul-lohra force-pushed the refactor/rahullohra/incoming-call-orchestration branch from f6fdcbf to bf41261 Compare September 4, 2026 11:19
@rahul-lohra rahul-lohra added the pr:improvement Enhances an existing feature or code label Sep 4, 2026
@rahul-lohra rahul-lohra changed the title [Telecom-2] Extract incoming-call coordination [AND-1489][Telecom-2] Extract incoming-call coordination Sep 4, 2026
@rahul-lohra rahul-lohra changed the title [AND-1489][Telecom-2] Extract incoming-call coordination [AND-1491][Telecom-2] Extract incoming-call coordination Sep 4, 2026
@rahul-lohra rahul-lohra changed the title [AND-1491][Telecom-2] Extract incoming-call coordination [Telecom-2] Extract incoming-call coordination Sep 4, 2026
@rahul-lohra
rahul-lohra marked this pull request as ready for review September 4, 2026 11:59
@rahul-lohra
rahul-lohra requested a review from a team as a code owner September 4, 2026 11:59
@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: f1bd7bf0-9ce4-4b2c-97de-1c4f9024df7b

📥 Commits

Reviewing files that changed from the base of the PR and between 2a5ebc4 and bf41261.

📒 Files selected for processing (4)
  • stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/notifications/internal/service/IncomingCallRequest.kt
  • stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/notifications/internal/service/ServiceLauncher.kt
  • stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/notifications/internal/service/incomingcallcoordinator/IncomingCallCoordinator.kt
  • stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/notifications/internal/service/incomingcallcoordinator/PreAndroid17IncomingCallCoordinator.kt

Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review.


Walkthrough

Changes

The incoming call flow now uses IncomingCallRequest and IncomingCallCoordinator. ServiceLauncher delegates presentation and dismissal to PreAndroid17IncomingCallCoordinator, which handles foreground service startup, Telecom registration, notification updates, and removal fallback.

Incoming Call Coordination

Layer / File(s) Summary
Coordination contract
stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/notifications/internal/service/IncomingCallRequest.kt, stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/notifications/internal/service/incomingcallcoordinator/IncomingCallCoordinator.kt
Defines the incoming call request data and the coordinator interface for showing and dismissing calls.
Pre-Android 17 call flow
stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/notifications/internal/service/incomingcallcoordinator/PreAndroid17IncomingCallCoordinator.kt
Starts the incoming-call service, checks Telecom conditions, updates notifications, registers supported calls, and handles dismissal fallback.
ServiceLauncher delegation
stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/notifications/internal/service/ServiceLauncher.kt
Initializes the coordinator and delegates incoming call display and removal operations.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to bf412

Incoming-call coordination is moved behind an internal coordinator while preserving the existing presentation, Telecom, notification, and dismissal flows. No concrete merge-blocking risk remains.

Sequence Diagram(s)

sequenceDiagram
  participant ServiceLauncher
  participant IncomingCallCoordinator
  participant IncomingCallPresenter
  participant JetpackTelecomRepository

  ServiceLauncher->>IncomingCallCoordinator: showIncomingCall(request)
  IncomingCallCoordinator->>IncomingCallPresenter: start incoming-call service
  IncomingCallCoordinator->>JetpackTelecomRepository: register incoming video call
  ServiceLauncher->>IncomingCallCoordinator: dismissIncomingCall(callId, config)
  IncomingCallCoordinator->>IncomingCallPresenter: start removal service
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the main change: extracting incoming-call coordination in the video SDK.
Description check ✅ Passed The description includes the goal, implementation, public API impact, stack dependency, and testing approach. It does not include the template’s UI, contributor checklist, reviewer checklist, or GIF s…
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/rahullohra/incoming-call-orchestration

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit packs the call request tight
The coordinator guides its flight
Telecom rings when checks are clear
Notifications update near
Dismissal hops away at night

Comment @coderabbitai help to get the list of available commands.

@rahul-lohra
rahul-lohra force-pushed the refactor/rahullohra/incoming-call-orchestration branch from bf41261 to 86091cc Compare September 8, 2026 06:58
@rahul-lohra
rahul-lohra force-pushed the refactor/rahullohra/incoming-call-orchestration branch from 86091cc to 6f7c9d2 Compare September 9, 2026 13:13
@rahul-lohra rahul-lohra changed the title [Telecom-2] Extract incoming-call coordination [Telecom-2] Extract incoming-call coordination in video sdk Sep 9, 2026
@rahul-lohra
rahul-lohra force-pushed the refactor/rahullohra/incoming-call-orchestration branch from 45dc0a6 to 98b3391 Compare September 9, 2026 14:18

@aleksandar-apostolov aleksandar-apostolov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rahul-lohra
rahul-lohra force-pushed the refactor/rahullohra/incoming-call-orchestration branch from 98b3391 to 6a531b7 Compare September 10, 2026 15:02
@rahul-lohra
rahul-lohra force-pushed the refactor/rahullohra/incoming-call-orchestration branch from 6a531b7 to 5bc850b Compare September 11, 2026 11:09
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
74.5% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:improvement Enhances an existing feature or code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants