Null-check the stop intent before stopService in cleanup - #1794
Conversation
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. Walkthrough
ChangesService cleanup
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to Cleanup now skips stopping the call service when no stop intent exists while preserving normal service shutdown behavior. No actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Description checkExplanation The description includes the required Goal, Implementation, UI Changes, and Testing sections. It clearly explains the defect, the fix, and the testing status. The contributor checklist, reviewer checklist, and GIF are not included, but these omissions are non-critical for this small code-only change.
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
SDK Size Comparison 📏
|
|
@coderabbitai review |
|
…ull-check-to-develop
|
|
🚀 Available in v1.32.0 |



Goal
Port the stop-intent null check from #1792 to develop.
ServiceIntentBuilder.buildStopIntent(...)returns null when the call service is not running, andcleanup()passed that null intocontext.stopService(...), throwing aNullPointerExceptionon every logout without a running call service. The exception is swallowed bysafeCall, so it only shows up as noise in the logs, but thestopServicecall itself never worked in that state.The develop-v2 side of this defect is fixed in #1792, together with the logout main-thread freeze (that half is develop-v2-only code). Since nothing merges develop-v2 back into develop, this half needs its own PR here, as raised in the #1792 review.
Part of AND-1466.
Implementation
serviceIntent.let { context.stopService(serviceIntent) }becomesbuildStopIntent(...)?.let { serviceIntent -> context.stopService(serviceIntent) }. The block is byte-identical to the one in #1792, so the next develop into develop-v2 merge resolves it without a conflict.🎨 UI Changes
Not applicable.
Testing
StreamVideoClientTest(which includes the existingcleanuptest) and spotless pass on this branch.StreamVideoClientCleanupTest) and reach develop-v2 with that PR; they are not portable here because they cover the develop-v2-only disconnect bridge.Summary by CodeRabbit