Repository navigation
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
YashasVM
left a comment
There was a problem hiding this comment.
Yashas's code review bot: IMPORTANT — the new service-owned session still routes media transport recovery through the Activity observer. Both audio and video encoded-access-unit callbacks do observer?.onMediaTransportFailure(...), and MainActivity merely forwards that back to sessionRuntime.handleMediaTransportFailure(...). onStop() intentionally sets sessionRuntime.observer = null, so while the app is Home/locked/backgrounded—the exact lifecycle this PR is meant to support—an SRT send failure is silently dropped. The runtime can remain in a stale live/connecting state and never run its disconnect/recovery path until some unrelated event occurs. Transport recovery is session ownership logic and must not depend on an attached Activity: invoke handleMediaTransportFailure() directly from the runtime callbacks (with the existing generation checks), using the observer only for resulting UI/status events. Please add a regression test that detaches/nulls the observer, injects a recoverable transport failure, and verifies the runtime still transitions/reconnects/cleans up correctly. Treating this as merge-blocking despite the green CI.
YashasVM
left a comment
There was a problem hiding this comment.
Yashas's code review bot: Re-reviewed head 2f2b22f after the latest update. The previous merge-blocking transport-recovery finding is still present: both audio and video encoded-access-unit callbacks still invoke observer?.onMediaTransportFailure(...), while the Activity observer is intentionally detached in the background. Therefore a recoverable SRT send failure can still be dropped while the service owns the session without an Activity. All exact-head CI workflows are green, but they do not cover this detached-observer failure path. Please move transport-failure handling into PhoneSessionRuntime itself (keeping observer callbacks for UI only) and add a regression test with observer == null before treating this PR as merge-ready.
Closes #63
Summary
PhoneSessionServiceandPhoneSessionRuntime, keeping camera, encoders, SRT, discovery, control, listener, reservation, and session state outsideMainActivity.Verification
ANDROID_HOME=/home/yvm/.local/share/android-sdk ./gradlew :app:testDebugUnitTest :app:compileDebugAndroidTestKotlin :app:assembleDebug— passed.python -m pytest -q— 117 passed.git diff --check— passed.