Skip to content

Add Confirmation Dialog for Manual Updates on Metered/Roaming Networks#105

Open
haok1402 wants to merge 1 commit into
GrapheneOS:17from
haok1402:fix-mismatched-network
Open

Add Confirmation Dialog for Manual Updates on Metered/Roaming Networks#105
haok1402 wants to merge 1 commit into
GrapheneOS:17from
haok1402:fix-mismatched-network

Conversation

@haok1402

@haok1402 haok1402 commented May 13, 2025

Copy link
Copy Markdown
Contributor

Description:

This PR improves the System Updater by notifying users when they attempt a manual update check while connected to a network that does not match the network properties required for automatic updates (e.g., metered or roaming). Previously, network restrictions were enforced only for background updates. Manual update checks bypassed these settings, which could result in unintended data charges.

With this change, the user will be prompted with an alert dialog if the current network does not match the configured properties. The update check will proceed only if the user explicitly confirms.

Changes:

  • Added confirmation dialog when the user manually checks for updates on a network that does not match the configured permitted network properties.
  • If confirmed, the update check proceeds by starting the service as user-initiated. If the user cancels, the check is aborted and the service is not started.
  • Background update behavior remains unchanged.

Testing:

Tested with Pixel 6a on the 16-qpr2 branch to ensure:

  • Update check works normally on permitted networks.
  • Alert dialog appears correctly when attempting a manual check on a metered network.
  • User confirmation correctly controls whether the update check proceeds.

Screenshot from the testing can be found below.

I am happy to revise and resubmit the code if any changes are desired.

Screenshot_20260601-233224 Screenshot_20260601-233256

@thestinger thestinger force-pushed the 15-qpr2 branch 14 times, most recently from cddb120 to 0e93954 Compare June 1, 2025 18:15
@haok1402 haok1402 changed the base branch from 15-qpr2 to 16 October 25, 2025 21:03
@haok1402 haok1402 marked this pull request as draft October 25, 2025 21:13
@haok1402 haok1402 force-pushed the fix-mismatched-network branch from 9200e08 to 7919723 Compare January 8, 2026 16:11
@haok1402 haok1402 changed the base branch from 16 to 16-qpr2 January 8, 2026 16:11
@haok1402 haok1402 force-pushed the fix-mismatched-network branch from 7919723 to 2f78d23 Compare January 8, 2026 16:14
@RankoR

RankoR commented May 7, 2026

Copy link
Copy Markdown

Hi @haok1402, is it still a draft or ready for review?

@de0u

de0u commented May 7, 2026

Copy link
Copy Markdown

@RankoR Thanks for inquiring! @haok1402 is exceptionally busy right now, but I believe he will be getting back to this project in the next few weeks (including sending a couple other PRs).

@RankoR

RankoR commented May 7, 2026

Copy link
Copy Markdown

Thanks @de0u! Feel free to ping me when this PR is ready for review :)

If the current network is metered or roaming, and settings
would preclude an automatic fetch, require the user to confirm
before starting a manual update.
@haok1402 haok1402 force-pushed the fix-mismatched-network branch from 2f78d23 to 4c4452a Compare May 21, 2026 03:48
@haok1402

Copy link
Copy Markdown
Contributor Author

@RankoR I've performed the rebase to the latest upstream 16-qpr2. Will run a fresh build and test these changes in the next couple days.

@haok1402 haok1402 marked this pull request as ready for review June 2, 2026 03:39
@haok1402

haok1402 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

@RankoR I've built on the 16-qpr2 branch and tested the changes with Pixel 6a again. It's ready for review now. Thx!

@RankoR RankoR self-requested a review June 14, 2026 19:22
@RankoR RankoR requested a review from inthewaves June 14, 2026 19:22
@inthewaves inthewaves self-assigned this Jun 17, 2026
@inthewaves

Copy link
Copy Markdown
Member

I don't think this should cause any issues on the 17 branch but we should retest it on 17 to make sure

@thestinger thestinger changed the base branch from 16-qpr2 to 17 June 26, 2026 00:44
@de0u

de0u commented Jun 26, 2026

Copy link
Copy Markdown

I will check with @haok1402 about scheduling testing. Thanks!

@haok1402

Copy link
Copy Markdown
Contributor Author

@inthewaves Yes! I'll take a look

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.

4 participants