Skip to content

[Telecom-2] Extract incoming-call coordination - #1808

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

[Telecom-2] Extract incoming-call coordination#1808
rahul-lohra wants to merge 1 commit 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 ❌

The following issues were detected:

  • Title should be 5–18 words for release notes. Current: 4 word(s). (Add pr:ignore-for-release to bypass.)

What we check

  1. Title is concise (5–18 words) unless labeled pr:ignore-for-release.
  2. At least one pr: label exists (e.g., pr:bug, pr:new-feature).
  3. Sections ### Goal, ### Implementation, and ### Testing contain content. Bot-authored PRs are exempt.
  4. PR description references an issue (Linear ticket like AND-123, a Linear URL, or a GitHub Closes #N). Bot-authored PRs are exempt.

@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.30 MB 12.30 MB 0.00 MB 🟢
stream-video-android-ui-xml 5.70 MB 5.70 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
@sonarqubecloud

sonarqubecloud Bot commented Sep 4, 2026

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

@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

Poem

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

🚥 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 for Telecom.
Description check ✅ Passed The description includes the goal, implementation details, public API impact, stack dependency, and testing approach. It omits the template checklist, UI section, and GIF, but these omissions are non-…
  • 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

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

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.

1 participant