Skip to content

K2GO-580 fix(networkpolicy): no automatic catalog downloads on mobile data, data notice clears itself - #795

Merged
luisguzman-adfa merged 1 commit into
mainfrom
fix/K2GO-580-mobile-data-catalogs-and-notice
Nov 17, 2026
Merged

luisguzman-adfa merged 1 commit into
mainfrom
fix/K2GO-580-mobile-data-catalogs-and-notice

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

What changes

  • Automatic catalog refreshes (Kiwix and Kolibri; weekly and on screen open) run only on an unmetered network (Wi-Fi). The rule lives in CatalogRefreshScheduler; the per-caller network type is removed.
  • The weekly job uses ExistingPeriodicWorkPolicy.UPDATE (was KEEP), so an existing install gets the Wi-Fi constraint and keeps its schedule.
  • The 404 self-heal (forceRefresh, part of a user-started download) still runs on any connection.
  • The "switched to mobile data" notice is removed when the network leaves metered, at app start when not on mobile data, and when the user turns K2Go off.
  • UI changes: no string changes. The notice now disappears when it is no longer true.

Why

  • Background catalog pulls spent the user's mobile data. Raised by David Schachter on the wiki (Play APK origin, Round 4): "a cost for users on paid data". K2GO-522 and K2GO-523: no outside connection the user did not start.
  • The notice stayed after Wi-Fi returned or K2Go was turned off.

Steps to QA

  • Baseline (main): on mobile data, open Get more > Wikipedia & ZIM: a catalog refresh job runs. Go to mobile data, then back to Wi-Fi: the notice stays.
  • Change: on mobile data no catalog refresh runs (it runs once Wi-Fi returns). The notice disappears when Wi-Fi returns and when K2Go is turned off.

Verifications

  • Unit tests: 1278 pass. The standard, play and fdroid flavors compile.
  • Evidence (device before and after) goes in Jira K2GO-580.

Notes

  • Known limit: if Android kills the app while on mobile data and Wi-Fi returns before the next start, the notice stays until the app starts again.
  • No manual "refresh catalog" button: the catalog bundled in the APK covers mobile data.

… data, data notice clears itself

Automatic catalog refreshes ran on any connection and spent the user's mobile data; they now run
on Wi-Fi only (UPDATE so existing installs get it). The mobile data notice stayed after Wi-Fi
returned; it is now removed off mobile data, at start, and when K2Go turns off.
@luisguzman-adfa luisguzman-adfa added the ui change or edit to UI label Nov 17, 2026
@luisguzman-adfa
luisguzman-adfa merged commit 66c50c2 into main Nov 17, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ui change or edit to UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant