You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(playback): default cellular quality to Auto up to 10 Mbps and cap Data Saver at 2 Mbps - #1036
Related issue: N/A
Validation tasks: changes #344 C1 (cellular quality defaults to Auto, up to 10 Mbps instead of 720p / 2 Mbps when no override is set)
Other clients: Apple Silo-Server/silo-apple#1254; Web/Server Silo-Server/silo-server#5135; Roku N/A (TV client without cellular quality settings)
On mobile data and metered networks, Silo defaulted Cellular Quality to 720p at 2 Mbps. Any 1080p file played over cellular forced a server transcode even when its bitrate fit comfortably on mobile data. Android also did not distinguish Android Data Saver from ordinary metered networks, so raising the cellular default without detecting Data Saver would have increased data usage for viewers who have Data Saver on.
Approach
Updated the vendored settings contract (manifest.json and conformance.json) to revision 30 and regenerated SettingKeys.kt, moving the cellular defaults to auto and 10000 kbps.
Added the Auto, up to 10 Mbps (auto / 10_000) preset to QualityPresets.ALL alongside Auto, no limit (auto / null), updated CellularQuality defaults, and pinned silo-translations2026.11.22-26edb4e for the updated settings.quality.cellularFooter copy.
Added dataSaver detection to PlaybackNetworkMonitor via ConnectivityManager.restrictBackgroundStatus == RESTRICT_BACKGROUND_STATUS_ENABLED and a RECEIVER_NOT_EXPORTED broadcast receiver for ACTION_RESTRICT_BACKGROUND_CHANGED.
Introduced a three-tier PlaybackNetworkTier (UNMETERED, METERED, LOW_DATA) across PlaybackQualityPair, NetworkQualityFollower, MobileVideoPlaybackStarter, PlayerViewModel, and TvPlayerViewModel (TV stays UNMETERED).
Under LOW_DATA, Silo applies a 2_000 kbps bitrate ceiling on top of the cellular pair (min(cap ?? 2000, 2000)) without altering resolution or raising a stricter saved override such as 480p / 1.5 Mbps. Mid-playback Data Saver and metered transitions debounce and replan.
Validation
:shared:testDebugUnitTest: passed (including SettingsConformanceTest, QualityChoicesTest, and QualityPresetsTest).
:android-shared:testDebugUnitTest: passed (including AndroidPlayerSettingsStoreTest, NetworkQualityFollowerTest, and SharedPresentationTextTest).
Ship this PR and the paired Apple PR before or alongside the silo-server settings contract revision 30 PR so mobile clients enforce the 2 Mbps Low Data Mode / Data Saver ceiling before the server raises the cellular default to 10 Mbps.
Each test added covers critical shared playback/settings logic.
The Evidence section shows how I checked the change.
AI Disclosure
Harness: Antigravity (T3 Code)
Tool(s): Antigravity, multi-model council plan review
Model(s): Gemini 4 Neon (design and implementation), gpt-6.2-sol (council plan review), claude-opus-5-5 (council plan review)
Involvement: AI-assisted
Adversarial review: Plan reviewed independently by gpt-6.2-sol and claude-opus-5-5 against the codebase before implementation. Adopted findings: cap-only 2 Mbps Data Saver ceiling without resolution clamping, listening to ACTION_RESTRICT_BACKGROUND_CHANGED on top of restrictBackgroundStatus, and coordinating client rollout before server rev 30. Completed a simplify review of the final diff.
Note
Default cellular playback quality to Auto capped at 10 Mbps and cap Data Saver at 2 Mbps
Changes the default cellular quality from 720p/2,000 Kbps to Auto with a 10,000 Kbps cap in QualityChoices.kt, and adds an Auto 10 Mbps preset to QualityPresets.ALL
Introduces a PlaybackNetworkTier enum (UNMETERED, METERED, LOW_DATA) in PlaybackQualityPair.kt that replaces the Boolean cellular flag across quality selection
PlaybackNetworkMonitor now reads Android's Data Saver status and refreshes the network snapshot when restricted-background status changes; snapshots carry a new dataSaver field
With Data Saver enabled on a cellular connection, playback quality uses the cellular pair capped at 2,000 Kbps via withLowDataCeiling; the follower replans when a connected network enters or leaves the low-data tier
Behavioral Change: existing users' saved cellular preference is unchanged, but the default for those without one rises from 720p/2 Mbps to Auto/10 Mbps; settings manifest revision bumps from 28 to 30 in SettingKeys.kt
Cellular playback defaults now use Auto quality up to 10 Mbps. Android detects Data Saver status, selects a network-specific quality pair, and replans playback when the network tier changes. Settings manifests, tests, and Android translation catalogs are updated.
The cellular default changes from 720p at 2,000 Kbps to Auto at 10,000 Kbps. The preset list adds Auto up to 10 Mbps, the manifest revision increases to 30, and tests and conformance data reflect the updated defaults.
Data Saver-aware playback quality
Layer / File(s)
Summary
Network tiers and playback replanning android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/*, androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/*, androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerViewModel.kt, android-shared/src/androidUnitTest/kotlin/org/siloserver/silo/common/player/NetworkQualityFollowerTest.kt
The network monitor reports Data Saver status. Quality selection distinguishes unmetered, metered, and low-data tiers, with a 2,000 Kbps ceiling for low-data quality unless a stricter saved cap applies. Player entry points use network tiers, and tests cover Data Saver changes and replanning.
Android translation catalogs
Layer / File(s)
Summary
Generated catalog revision and localized messages .silo-translations, android-shared/silo-locales.properties, android-shared/src/androidMain/res/values*/strings_catalog.xml
The translation revision is updated. Catalogs add localized direct-device, connection-key, missing-field, and superseded-playback messages. Cellular-quality footers describe the 2 Mbps cap when Data Saver or Low Data Mode is enabled.
sequenceDiagram
participant AndroidSystem
participant PlaybackNetworkMonitor
participant NetworkQualityFollower
participant PlayerSettingsStore
participant Player
AndroidSystem->>PlaybackNetworkMonitor: Broadcast restricted-background status change
PlaybackNetworkMonitor->>PlaybackNetworkMonitor: Refresh network and publish Data Saver snapshot
PlaybackNetworkMonitor->>NetworkQualityFollower: Provide updated network tier
NetworkQualityFollower->>PlayerSettingsStore: Read tier-specific quality pair
PlayerSettingsStore-->>NetworkQualityFollower: Return quality pair
NetworkQualityFollower->>Player: Replan playback with quality pair
Loading
Suggested reviewers:rhainland
Merge Risk: Low · up to 73343
Cellular playback now defaults to Auto up to 10 Mbps, with a 2 Mbps cap under Data Saver. The main flow looks sound. One narrow race in the Data Saver broadcast handler can briefly publish network information for the previous network when the network switches at the same moment. That can delay or misapply the cap. It is worth fixing before merge, but it is unlikely to occur and affects only a small group of users.
Security architecture risk: Minimal · up to 73343
The inspected changes preserve existing playback ownership controls and apply Data Saver as a temporary bitrate ceiling without overwriting saved preferences. No material security or failure-containment regression was established. Mid-playback adaptation remains best-effort rather than an immediate hard limit.
Retained concerns
No architecture-level concerns identified.
Security review details
Security Blast Radius
observed — The new mid-playback trigger operates through the existing eligible-session filter. Downloads, Watch Party playback and fixed in-player quality selections are excluded from network following. Before starting a move, the consumer rejects a changed session or quality pair.
Trust Boundaries and Controls
observed — The receiver is registered as not exported and accepts only the restricted-background-change action. Its callback does not take a quality value from the intent; it refreshes the snapshot and reads ConnectivityManager.restrictBackgroundStatus. The resulting tier selects existing quality preferences rather than granting identity or permission authority.
Resilience and Maintainability Implications
observed — Tier adaptation remains eventual and best-effort: it waits 30 seconds, re-reads the session and settings on bounded retries, skips an already-matching pair, and propagates cancellation. A failed nonfatal quality request preserves the existing playback route rather than making the failure fatal. These mechanics existed before the additional LOW_DATA trigger.
observed — Network moves reuse existing recovery and subtitle-transaction coordination. Replacement adoption checks the recovery generation, releases an unadopted session on refusal or cancellation, and updates the owned-session token before publishing UI state. Terminal handling checks that the affected session is still current. Queued user picks are released after normal move completion and discarded on cancellation.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the primary change: the cellular quality default moves to Auto up to 10 Mbps, and Data Saver is capped at 2 Mbps. The changeset supports both parts, including the QualityPresets and Ce…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
The description is specific to the changeset. It states the problem (Android cellular quality defaulted to 720p at 2 Mbps), and the approach names the changed components: the settings contract revisio…
Full details: Title check
Explanation
The title names the primary change: the cellular quality default moves to Auto up to 10 Mbps, and Data Saver is capped at 2 Mbps. The changeset supports both parts, including the QualityPresets and CellularQuality defaults, the manifest and conformance revision 30, the dataSaver detection in PlaybackNetworkMonitor, and the LOW_DATA tier in PlaybackQualityPair.
Full details: Description check
Explanation
The description is specific to the changeset. It states the problem (Android cellular quality defaulted to 720p at 2 Mbps), and the approach names the changed components: the settings contract revision 30, the Auto 10 Mbps preset, the PlaybackNetworkTier enum, Data Saver detection in PlaybackNetworkMonitor, and the 2,000 Kbps low-data ceiling. It also lists validation runs, a rollout risk, and follow-up docs. This matches the raw summary of the files changed, so the check passes.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
The reason will be displayed to describe this comment to others. Learn more.
Apply the Data Saver ceiling to fixed-quality sessions
If the viewer selects a fixed quality such as 1080p and then enables Data Saver on cellular, the new 2 Mbps ceiling is never applied. PlayerViewModel.networkFollowedQuality() delegates to settingsFollowedQuality(), which returns null for every non-Auto quality pick, so this collector exits before computing the LOW_DATA pair. The existing stream can therefore continue at 10 Mbps or an uncapped Wi-Fi bitrate despite the new settings footer promising a 2 Mbps cap. Handle Data Saver cap changes independently of whether the resolution follows settings, preserving the viewer's fixed resolution while tightening the bitrate.
The reason will be displayed to describe this comment to others. Learn more.
Leaving unchanged — this is intentional behavior, unchanged from main, and matches the paired Apple implementation (Silo-Server/silo-apple#1254).
A fixed Cellular Quality configured in Settings > Playback (e.g., 1080p / 6 Mbps) does follow network changes and gets the 2 Mbps Data Saver ceiling via PlaybackQualityPair.withLowDataCeiling() while keeping its resolution, because currentMobileQualityPreference() is null for settings-driven playback.
An explicit fixed rung chosen in the in-player quality picker intentionally opts out of NetworkQualityFollower (settingsFollowedQuality() in PlayerViewModel.kt, covered by NetworkQualityReplanTest and NetworkQualityFollowerTest), matching PlaybackNetworkQualityController.viewerPickedQuality on Apple. Picking Auto in the player re-enables network following (autoPicked = true) and applies the 2 Mbps Data Saver cap.
The reason will be displayed to describe this comment to others. Learn more.
Data Saver ceiling is skipped for fixed-quality playback
Enabling Data Saver can leave fixed-quality or watch party streams running above the 2 Mbps ceiling because playing() returns null. Apply the ceiling to active server sessions regardless of their resolution settings.
Prompt for LLM
File android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/PlaybackQualityPair.kt, lines 187-189:
Data Saver ceiling is skipped for fixed-quality playback
Data Saver changes do not reach sessions with a fixed in-player quality or a watch party because `playing()` returns null for those sessions, so a stream started at 10 Mbps can continue above 2 Mbps after Data Saver is enabled. Apply the low-data ceiling to active server sessions independently of whether their resolution follows network settings.
The reason will be displayed to describe this comment to others. Learn more.
Leaving unchanged — this is intentional behavior, unchanged from main, and matches the paired Apple implementation (Silo-Server/silo-apple#1254).
Saved fixed Cellular Quality settings (e.g., 1080p / 6 Mbps in Settings > Playback) do follow Data Saver and receive the 2 Mbps cap while preserving their resolution (currentMobileQualityPreference() is null).
Explicit in-player fixed quality picks and active Watch Party sessions intentionally opt out of NetworkQualityFollower via settingsFollowedQuality() (PlayerViewModel.kt, tested in NetworkQualityReplanTest): an in-player fixed rung overrides settings for that title until Auto is selected again, and Watch Party disables mid-playback network-follower reloads so synchronized playback is not disrupted. Starting a new session while Data Saver is already on still reads qualityPair(networkTier) in MobileVideoPlaybackStarter.kt.
The reason will be displayed to describe this comment to others. Learn more.
Thanks for clarifying. I’ll withdraw the suggestion: fixed in-player selections and active Watch Party sessions intentionally opt out of mid-playback network-following reloads, while saved Cellular Quality settings still receive the Data Saver cap.
The remaining tradeoff is that an already-playing opted-out session may continue above 2 Mbps when Data Saver is enabled. That exception should be kept in mind if the ceiling is described as applying to all active playback.
Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.
…ault tests
Read defaultNetwork and its capabilities inside a synchronized refreshCurrentNetwork() helper in PlaybackNetworkMonitor so the Data Saver broadcast receiver cannot race with ConnectivityManager callbacks and overwrite a newer default network.
Update stale 720p/2 Mbps cellular default assertions in PlayerViewModelLoadOwnershipIntegrationTest (and the doc comment in PlayerSettingsStore) to match Auto / 10 Mbps, and add a test for Data Saver starts at the 2 Mbps ceiling.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enhancementNew feature or requestimpact: playbackCan't play, stalls, or wrong medianeeds-reviewNeeds maintainer review to resolve uncertain classification, scope, or changed evidence.priority: P2Limited scope, workaround exists, or polishsize/XL500–999 added + deleted lines (all files); change volume, not priority.
1 participant
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Related issue: N/A
Validation tasks: changes #344 C1 (cellular quality defaults to Auto, up to 10 Mbps instead of 720p / 2 Mbps when no override is set)
Other clients: Apple Silo-Server/silo-apple#1254; Web/Server Silo-Server/silo-server#5135; Roku N/A (TV client without cellular quality settings)
On mobile data and metered networks, Silo defaulted Cellular Quality to
720pat2 Mbps. Any 1080p file played over cellular forced a server transcode even when its bitrate fit comfortably on mobile data. Android also did not distinguish Android Data Saver from ordinary metered networks, so raising the cellular default without detecting Data Saver would have increased data usage for viewers who have Data Saver on.Approach
manifest.jsonandconformance.json) to revision 30 and regeneratedSettingKeys.kt, moving the cellular defaults toautoand10000kbps.Auto, up to 10 Mbps(auto/10_000) preset toQualityPresets.ALLalongsideAuto, no limit(auto/null), updatedCellularQualitydefaults, and pinnedsilo-translations2026.11.22-26edb4efor the updatedsettings.quality.cellularFootercopy.dataSaverdetection toPlaybackNetworkMonitorviaConnectivityManager.restrictBackgroundStatus == RESTRICT_BACKGROUND_STATUS_ENABLEDand aRECEIVER_NOT_EXPORTEDbroadcast receiver forACTION_RESTRICT_BACKGROUND_CHANGED.PlaybackNetworkTier(UNMETERED,METERED,LOW_DATA) acrossPlaybackQualityPair,NetworkQualityFollower,MobileVideoPlaybackStarter,PlayerViewModel, andTvPlayerViewModel(TV staysUNMETERED).LOW_DATA, Silo applies a2_000kbps bitrate ceiling on top of the cellular pair (min(cap ?? 2000, 2000)) without altering resolution or raising a stricter saved override such as480p/1.5 Mbps. Mid-playback Data Saver and metered transitions debounce and replan.Validation
:shared:testDebugUnitTest: passed (includingSettingsConformanceTest,QualityChoicesTest, andQualityPresetsTest).:android-shared:testDebugUnitTest: passed (includingAndroidPlayerSettingsStoreTest,NetworkQualityFollowerTest, andSharedPresentationTextTest).:androidApp:assembleDebug: succeeded.:androidTvApp:assembleDebug: succeeded.Evidence
Evidence: https://evidence.siloserver.org/r/silo-android/cellular-quality-default-low-data/
Risks
Ship this PR and the paired Apple PR before or alongside the
silo-serversettings contract revision 30 PR so mobile clients enforce the 2 Mbps Low Data Mode / Data Saver ceiling before the server raises the cellular default to 10 Mbps.Follow-ups
Checklist
AI Disclosure
ACTION_RESTRICT_BACKGROUND_CHANGEDon top ofrestrictBackgroundStatus, and coordinating client rollout before server rev 30. Completed a simplify review of the final diff.Note
Default cellular playback quality to Auto capped at 10 Mbps and cap Data Saver at 2 Mbps
QualityPresets.ALLPlaybackNetworkTierenum (UNMETERED,METERED,LOW_DATA) in PlaybackQualityPair.kt that replaces the Boolean cellular flag across quality selectionPlaybackNetworkMonitornow reads Android's Data Saver status and refreshes the network snapshot when restricted-background status changes; snapshots carry a newdataSaverfieldwithLowDataCeiling; the follower replans when a connected network enters or leaves the low-data tierMacroscope summarized 87a77ce.