Harden Android-only release validation#49
Conversation
|
Warning Review limit reached
Next review available in: 45 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe pull request adds web-controlled player closure, updates MediaStore diagnostics lookup logic, adds player-related build support, suppresses selected player diagnostics, and strengthens CI job ordering and lint enforcement. ChangesPlayer control and platform updates
Estimated code review effort: 3 (Moderate) | ~25 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
app/src/main/kotlin/com/miruplay/tv/StartupProbeProvider.kt (1)
244-268: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valuePrefer
getColumnIndexOrThrowover hardcoded indices.Although the projection explicitly defines the column order, it is safer and more idiomatic to resolve cursor column indices dynamically rather than relying on hardcoded indices like
0and1.
app/src/main/kotlin/com/miruplay/tv/StartupProbeProvider.kt#L244-L268: Retrieve indices for_IDandRELATIVE_PATHusinggetColumnIndexOrThrowand use them in place ofgetLong(0)andgetString(1).data/src/main/kotlin/com/miruplay/tv/data/logging/EarlyStartupDiagnostics.kt#L179-L199: Retrieve indices for_IDandRELATIVE_PATHusinggetColumnIndexOrThrowand use them in place ofgetLong(0)andgetString(1).🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@app/src/main/kotlin/com/miruplay/tv/StartupProbeProvider.kt` around lines 244 - 268, Replace hardcoded cursor column positions with getColumnIndexOrThrow in findPublicDownloadUri within app/src/main/kotlin/com/miruplay/tv/StartupProbeProvider.kt:244-268, resolving _ID and RELATIVE_PATH before iteration and using those indices for getLong and getString. Apply the same change in the corresponding query logic in data/src/main/kotlin/com/miruplay/tv/data/logging/EarlyStartupDiagnostics.kt:179-199.player-core/src/main/kotlin/com/miruplay/tv/player/ExperimentalHdrSdrVideoGraphFactory.kt (1)
1-2: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winMove the Media3 opt-in to the affected declarations.
player-core/src/main/kotlin/com/miruplay/tv/player/ExperimentalHdrSdrVideoGraphFactory.kt: annotateExperimentalHdrSdrPreviewingVideoGraphFactorywith@OptIn(UnstableApi::class)and drop the file suppression.player-core/src/main/kotlin/com/miruplay/tv/player/ExperimentalHdrSurfaceMediaCodecVideoRenderer.kt: the class is already@UnstableApi, so the file suppression is redundant.player-core/src/main/kotlin/com/miruplay/tv/player/PlaybackDataSourceFactory.kt: annotatePlaybackDataSourceFactorywith@OptIn(UnstableApi::class)and drop the file suppression.This keeps the opt-in scope narrow and leaves future unsafe usages exposed to the compiler.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@player-core/src/main/kotlin/com/miruplay/tv/player/ExperimentalHdrSdrVideoGraphFactory.kt` around lines 1 - 2, Replace the file-level suppression in player-core/src/main/kotlin/com/miruplay/tv/player/ExperimentalHdrSdrVideoGraphFactory.kt:1-2 with `@OptIn`(UnstableApi::class) on ExperimentalHdrSdrPreviewingVideoGraphFactory. Remove the redundant suppression in player-core/src/main/kotlin/com/miruplay/tv/player/ExperimentalHdrSurfaceMediaCodecVideoRenderer.kt:1-2 because the class is already annotated with `@UnstableApi`. In player-core/src/main/kotlin/com/miruplay/tv/player/PlaybackDataSourceFactory.kt:1-2, annotate PlaybackDataSourceFactory with `@OptIn`(UnstableApi::class) and remove the file-level suppression.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@app/src/main/kotlin/com/miruplay/tv/StartupProbeProvider.kt`:
- Around line 244-268: Replace hardcoded cursor column positions with
getColumnIndexOrThrow in findPublicDownloadUri within
app/src/main/kotlin/com/miruplay/tv/StartupProbeProvider.kt:244-268, resolving
_ID and RELATIVE_PATH before iteration and using those indices for getLong and
getString. Apply the same change in the corresponding query logic in
data/src/main/kotlin/com/miruplay/tv/data/logging/EarlyStartupDiagnostics.kt:179-199.
In
`@player-core/src/main/kotlin/com/miruplay/tv/player/ExperimentalHdrSdrVideoGraphFactory.kt`:
- Around line 1-2: Replace the file-level suppression in
player-core/src/main/kotlin/com/miruplay/tv/player/ExperimentalHdrSdrVideoGraphFactory.kt:1-2
with `@OptIn`(UnstableApi::class) on
ExperimentalHdrSdrPreviewingVideoGraphFactory. Remove the redundant suppression
in
player-core/src/main/kotlin/com/miruplay/tv/player/ExperimentalHdrSurfaceMediaCodecVideoRenderer.kt:1-2
because the class is already annotated with `@UnstableApi`. In
player-core/src/main/kotlin/com/miruplay/tv/player/PlaybackDataSourceFactory.kt:1-2,
annotate PlaybackDataSourceFactory with `@OptIn`(UnstableApi::class) and remove
the file-level suppression.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 2984559f-592b-439f-957f-6471eef6b6e6
📒 Files selected for processing (18)
.github/workflows/ci.ymlapp/build.gradle.ktsapp/src/main/kotlin/com/miruplay/tv/MainActivity.ktapp/src/main/kotlin/com/miruplay/tv/StartupProbeProvider.ktdata/src/main/kotlin/com/miruplay/tv/data/logging/EarlyStartupDiagnostics.ktplayer-core/src/main/kotlin/com/miruplay/tv/player/ExoPlaybackController.ktplayer-core/src/main/kotlin/com/miruplay/tv/player/ExoVideoEffectMapping.ktplayer-core/src/main/kotlin/com/miruplay/tv/player/ExperimentalHdrSdrVideoGraphFactory.ktplayer-core/src/main/kotlin/com/miruplay/tv/player/ExperimentalHdrSurfaceMediaCodecVideoRenderer.ktplayer-core/src/main/kotlin/com/miruplay/tv/player/ExperimentalRenderersFactory.ktplayer-core/src/main/kotlin/com/miruplay/tv/player/PlaybackDataSourceFactory.ktplayer-core/src/main/kotlin/com/miruplay/tv/player/PlaybackMediaCodecSelector.ktplayer-core/src/main/kotlin/com/miruplay/tv/player/VideoSignalFormatResolver.ktui-tv/src/main/kotlin/com/miruplay/tv/ui/player/PlayerScreen.ktweb-control/src/main/kotlin/com/miruplay/tv/webcontrol/WebControlNavigator.ktweb-control/src/main/kotlin/com/miruplay/tv/webcontrol/WebControlService.ktweb-control/src/test/kotlin/com/miruplay/tv/webcontrol/WebControlNavigatorTest.ktweb-control/src/test/kotlin/com/miruplay/tv/webcontrol/WebControlPlaybackStopTest.kt
Summary
Validation
./gradlew test lint :app:assembleDebug(1084 tasks, successful)Device follow-up
Version
baseAppVersionNameat2.0.0; this is a patch-level reliability fix on the existing v2.0.x lineSummary by CodeRabbit