Skip to content

Harden Android clients and support Android 7 - #9

Closed
RXWatcher wants to merge 9 commits into
Silo-Server:mainfrom
RXWatcher:android-7-support-media3-floor
Closed

RXWatcher wants to merge 9 commits into
Silo-Server:mainfrom
RXWatcher:android-7-support-media3-floor

Conversation

@RXWatcher

@RXWatcher RXWatcher commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • harden Android mobile and TV client surfaces across navigation visibility, reader safety, downloads, manifests, profile quality, and playback selection
  • keep requests/admin/watch-together code present internally while hiding those user-facing menu entries
  • improve reader/download safety: EPUB sanitization, cache validation, external-open format handling, and no backup for token/profile state
  • normalize profile quality and centralize playback version/backend selection behavior
  • add Android 7/API 24-25 support contract for both mobile and TV
  • keep API 24/25 on Media3 and prevent MPV selection below the libmpv API 26 floor
  • add regression tests for MPV device gating and mobile/TV build policy
  • document the Android 7 runtime contract

Verification

  • ./gradlew testDebugUnitTest
  • ./gradlew :androidApp:assembleDebug :androidTvApp:assembleDebug
  • ./gradlew :androidApp:lintDebug :androidTvApp:lintDebug

@coderabbitai

coderabbitai Bot commented Jun 30, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@RXWatcher, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 37 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 93d1367b-0f72-4b57-b0c2-f1f4babd18ae

📥 Commits

Reviewing files that changed from the base of the PR and between 2622780 and 48dc5cd.

📒 Files selected for processing (71)
  • README.md
  • android-shared/src/androidMain/kotlin/com/continuum/app/common/downloads/DownloadOpenTarget.kt
  • android-shared/src/androidMain/kotlin/com/continuum/app/common/downloads/DownloadStorage.kt
  • android-shared/src/androidMain/kotlin/com/continuum/app/common/player/backend/MpvDeviceFloor.kt
  • android-shared/src/androidMain/kotlin/com/continuum/app/common/player/backend/VideoPlaybackBackendSelector.kt
  • android-shared/src/androidUnitTest/kotlin/com/continuum/app/common/downloads/DownloadOpenTargetTest.kt
  • android-shared/src/androidUnitTest/kotlin/com/continuum/app/common/downloads/DownloadStorageTest.kt
  • android-shared/src/androidUnitTest/kotlin/com/continuum/app/common/player/backend/MpvDeviceFloorTest.kt
  • android-shared/src/androidUnitTest/kotlin/com/continuum/app/common/player/backend/VideoPlaybackBackendSelectorTest.kt
  • androidApp/src/androidMain/AndroidManifest.xml
  • androidApp/src/androidMain/kotlin/com/continuum/app/android/ui/screens/MainScreen.kt
  • androidApp/src/androidMain/kotlin/com/continuum/app/android/ui/screens/detail/ItemDetailScreen.kt
  • androidApp/src/androidMain/kotlin/com/continuum/app/android/ui/screens/detail/ItemDetailViewModel.kt
  • androidApp/src/androidMain/kotlin/com/continuum/app/android/ui/screens/detail/MovieDetailContent.kt
  • androidApp/src/androidMain/kotlin/com/continuum/app/android/ui/screens/detail/SeriesDetailContent.kt
  • androidApp/src/androidMain/kotlin/com/continuum/app/android/ui/screens/people/PersonDetailViewModel.kt
  • androidApp/src/androidMain/kotlin/com/continuum/app/android/ui/screens/player/MobileVideoPlaybackStarter.kt
  • androidApp/src/androidMain/kotlin/com/continuum/app/android/ui/screens/player/PlayerViewModel.kt
  • androidApp/src/androidMain/kotlin/com/continuum/app/android/ui/screens/profiles/CreateProfileScreen.kt
  • androidApp/src/androidMain/kotlin/com/continuum/app/android/ui/screens/profiles/CreateProfileViewModel.kt
  • androidApp/src/androidMain/kotlin/com/continuum/app/android/ui/screens/profiles/EditProfileScreen.kt
  • androidApp/src/androidMain/kotlin/com/continuum/app/android/ui/screens/profiles/EditProfileViewModel.kt
  • androidApp/src/androidMain/kotlin/com/continuum/app/android/ui/screens/reader/ReaderFileCache.kt
  • androidApp/src/androidMain/kotlin/com/continuum/app/android/ui/screens/reader/reflow/EpubHtmlSanitizer.kt
  • androidApp/src/androidMain/kotlin/com/continuum/app/android/ui/screens/reader/reflow/EpubReflowSource.kt
  • androidApp/src/androidMain/kotlin/com/continuum/app/android/ui/screens/reader/reflow/ReflowWebView.kt
  • androidApp/src/androidMain/kotlin/com/continuum/app/android/ui/screens/reader/reflow/ReflowableReader.kt
  • androidApp/src/androidMain/kotlin/com/continuum/app/android/ui/screens/settings/AccountSection.kt
  • androidApp/src/androidMain/kotlin/com/continuum/app/android/ui/screens/settings/PlaybackSettings.kt
  • androidApp/src/androidMain/kotlin/com/continuum/app/android/ui/screens/settings/SettingsScreen.kt
  • androidApp/src/androidMain/kotlin/com/continuum/app/android/ui/screens/settings/SettingsViewModel.kt
  • androidApp/src/androidUnitTest/kotlin/com/continuum/app/android/AndroidManifestPolicyTest.kt
  • androidApp/src/androidUnitTest/kotlin/com/continuum/app/android/ui/navigation/ClientSurfaceVisibilitySourceTest.kt
  • androidApp/src/androidUnitTest/kotlin/com/continuum/app/android/ui/navigation/MobileDownloadVisibilityTest.kt
  • androidApp/src/androidUnitTest/kotlin/com/continuum/app/android/ui/screens/detail/MobileDetailActionsSourceTest.kt
  • androidApp/src/androidUnitTest/kotlin/com/continuum/app/android/ui/screens/player/PlayerViewModelSharedCoordinatorTest.kt
  • androidApp/src/androidUnitTest/kotlin/com/continuum/app/android/ui/screens/profiles/ProfileQualitySourceTest.kt
  • androidApp/src/androidUnitTest/kotlin/com/continuum/app/android/ui/screens/reader/ReaderEngineHostSourceTest.kt
  • androidApp/src/androidUnitTest/kotlin/com/continuum/app/android/ui/screens/reader/ReaderFileCacheTest.kt
  • androidApp/src/androidUnitTest/kotlin/com/continuum/app/android/ui/screens/reader/ReflowWebViewEpubResourceTest.kt
  • androidApp/src/androidUnitTest/kotlin/com/continuum/app/android/ui/screens/reader/reflow/EpubHtmlSanitizerTest.kt
  • androidApp/src/androidUnitTest/kotlin/com/continuum/app/android/ui/screens/settings/PlaybackQualitySettingsSourceTest.kt
  • androidTvApp/src/androidMain/AndroidManifest.xml
  • androidTvApp/src/androidMain/kotlin/com/continuum/app/tv/data/preferences/TvSettingsEnums.kt
  • androidTvApp/src/androidMain/kotlin/com/continuum/app/tv/ui/components/TvCascadeSelector.kt
  • androidTvApp/src/androidMain/kotlin/com/continuum/app/tv/ui/screens/auth/TvLoginScreen.kt
  • androidTvApp/src/androidMain/kotlin/com/continuum/app/tv/ui/screens/auth/TvServerSetupScreen.kt
  • androidTvApp/src/androidMain/kotlin/com/continuum/app/tv/ui/screens/auth/TvSetupScreen.kt
  • androidTvApp/src/androidMain/kotlin/com/continuum/app/tv/ui/screens/auth/TvSignupScreen.kt
  • androidTvApp/src/androidMain/kotlin/com/continuum/app/tv/ui/screens/detail/TvItemDetailScreen.kt
  • androidTvApp/src/androidMain/kotlin/com/continuum/app/tv/ui/screens/player/TvVideoPlaybackStarter.kt
  • androidTvApp/src/androidMain/kotlin/com/continuum/app/tv/ui/screens/profiles/TvCreateProfileViewModel.kt
  • androidTvApp/src/androidMain/kotlin/com/continuum/app/tv/ui/screens/profiles/TvEditProfileViewModel.kt
  • androidTvApp/src/androidMain/kotlin/com/continuum/app/tv/ui/screens/servers/TvServerListScreen.kt
  • androidTvApp/src/androidMain/kotlin/com/continuum/app/tv/ui/screens/settings/TvSettingsScreen.kt
  • androidTvApp/src/androidUnitTest/kotlin/com/continuum/app/tv/TvAndroidManifestPolicyTest.kt
  • androidTvApp/src/androidUnitTest/kotlin/com/continuum/app/tv/data/preferences/TvPlaybackQualitySourceTest.kt
  • androidTvApp/src/androidUnitTest/kotlin/com/continuum/app/tv/ui/navigation/TvClientSurfaceVisibilitySourceTest.kt
  • androidTvApp/src/androidUnitTest/kotlin/com/continuum/app/tv/ui/screens/auth/TvAuthFocusSourceTest.kt
  • androidTvApp/src/androidUnitTest/kotlin/com/continuum/app/tv/ui/screens/detail/TvDetailPlaybackSelectionSourceTest.kt
  • androidTvApp/src/androidUnitTest/kotlin/com/continuum/app/tv/ui/screens/profiles/TvProfileQualitySourceTest.kt
  • androidTvApp/src/androidUnitTest/kotlin/com/continuum/app/tv/ui/screens/servers/TvServerListFocusSourceTest.kt
  • androidTvApp/src/androidUnitTest/kotlin/com/continuum/app/tv/ui/shell/TvCascadeInteractionSourceTest.kt
  • docs/superpowers/plans/2026-06-30-android-7-support.md
  • docs/superpowers/specs/2026-06-30-android-7-support-design.md
  • shared/src/commonMain/kotlin/com/continuum/app/model/feature/ClientSurfacePolicy.kt
  • shared/src/commonMain/kotlin/com/continuum/app/model/profile/ProfileQualityPreference.kt
  • shared/src/commonMain/kotlin/com/continuum/app/playback/PlaybackVersionSelector.kt
  • shared/src/commonTest/kotlin/com/continuum/app/model/feature/ClientSurfacePolicyTest.kt
  • shared/src/commonTest/kotlin/com/continuum/app/model/profile/ProfileQualityPreferenceTest.kt
  • shared/src/commonTest/kotlin/com/continuum/app/playback/PlaybackVersionSelectorTest.kt
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@RXWatcher RXWatcher changed the title Support Android 7 with Media3 fallback Harden Android clients and support Android 7 Jun 30, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eaa002ebe2

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

val name = match.groupValues[1]
val quote = match.groupValues[2]
val value = match.groupValues[3]
if (isUnsafeEpubResourceUrl(value)) "" else " $name=$quote$value$quote"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Decode resource URLs before allowing EPUB links

For a downloaded EPUB that contains an entity-encoded scheme such as href="javascript:...", this check preserves the attribute because the raw string does not start with javascript:. The sanitized chapter is later assigned to innerHTML in the JS-enabled reflow WebView, where the browser decodes the entity and leaves an executable/clickable unsafe URL in the document. Decode HTML character references/control whitespace before the scheme check, or only allow known-relative resource forms.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 48dc5cd. The EPUB sanitizer now decodes numeric and selected named HTML character references, strips URL-policy control whitespace before scheme checks, and has regression coverage for encoded javascript, https, and protocol-relative resource URLs.


val target = preferredQuality?.trim()?.lowercase().orEmpty()
if (target.isBlank() || target == "auto" || target == "original") {
return versions.bestAvailable()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Pin the version when applying track overrides

When the detail UI leaves Version on Auto but the user selects an audio/subtitle track, callers can send audioTrackIndex/subtitleTrackIndex with preferredFileId == null; this new Auto path may then choose a different file than the one whose track list the UI displayed (for example, first server version is 1080p but Auto picks 4K). The stale track index can select the wrong stream or fail server validation. Pin the displayed file id whenever a track override is present, or resolve the displayed Auto version with the same selector.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 48dc5cd. Mobile and TV detail play actions now keep Auto unpinned for normal playback, but pin the displayed file id whenever an explicit audio/subtitle override is present so track indexes match the version whose track list was shown. Added source coverage for both surfaces.

@RXWatcher

Copy link
Copy Markdown
Contributor Author

Closing in favor of #10, which includes the Android 7 work plus the subsequent TV/mobile playback, HUD, profile, auth, reader/download, and UI parity hardening changes. New PR: #10

@RXWatcher RXWatcher closed this Jul 1, 2026
@RXWatcher
RXWatcher deleted the android-7-support-media3-floor branch July 13, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant