Repository navigation
TwilightService: use low power location while network provider is enabled - #477
Draft
cameronaaron wants to merge 1 commit into
Draft
cameronaaron wants to merge 1 commit into
cameronaaron wants to merge 1 commit into
Conversation
…bled TwilightService registered the default location request, which is balanced quality, and the GrapheneOS fused provider policy uses GNSS for any request better than low power. Enabling a sunset to sunrise schedule kept a GNSS session started for as long as the schedule was on, only to compute sunrise and sunset times. Request low power quality while the network provider is enabled so the fused provider serves it from network location alone. Network location is disabled by default, and the network provider stays registered while disabled, so a low power request would then get no updates at all; keep balanced quality in that case and update the request when the network provider is enabled or disabled. Also drop the stale "low power, max 1h, min 10m" comment, which described neither the old nor the new request. Fixes: GrapheneOS/os-issue-tracker#8884
cameronaaron
marked this pull request as draft
October 27, 2026 05:54
Salad6239
reviewed
Nov 6, 2026
Salad6239
left a comment
There was a problem hiding this comment.
Can someone merge this please? It would fix my issue with battery drain while using sunset/surise feature.
Author
No it's not even ready |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes GrapheneOS/os-issue-tracker#8884
TwilightService registers the default location request, which is
BALANCED. With the GNSS usage policy restored in ae077bd, the fused provider enables GPS for any request better thanLOW_POWER, so a sunset to sunrise schedule keeps a GNSS session started the whole time it's enabled.This requests
LOW_POWERwhile the network provider is enabled so it's served by network location only. The network provider is still present when disabled, soLOW_POWERwould get no updates at all in that case; it keepsBALANCEDthen and re-registers onPROVIDERS_CHANGED_ACTIONfor the network provider.Also removes the "low power, max 1h, min 10m" comment, which didn't match the request.