Repository navigation
chore: Merge branch dev to main - #353
Draft
github-actions[bot] wants to merge 4 commits into
Draft
github-actions[bot] wants to merge 4 commits into
github-actions[bot] wants to merge 4 commits into
Conversation
getActiveNetworkInfo() (deprecated since API 29) returns a UID-filtered NetworkInfo. When the GmsCore UID is blocked by a background-data / Data-Saver policy, ConnectivityService rewrites it to DetailedState.BLOCKED, so isConnected() is false even though the underlying network is CONNECTED and VALIDATED. It does NOT return null. The "no network" branch then registered a new network callback on every callback, whose PendingIntent pointed back to TriggerReceiver. The request was immediately satisfied, producing several hundred callbacks/second and pinning system_server at ~300% CPU. Use getActiveNetwork()/NetworkCapabilities for the connectivity check, but note this alone is insufficient: the modern API can also return NULL in some configurations on this device. The actual safety property is treating callback arrival as proof of connectivity, deduplicating the retry registration and rate-limiting it, so no per-UID policy edge case can produce an unbounded loop. Observed directly with a read-only Xposed probe inside the GmsCore process and pinned down with a reversible `cmd netpolicy add/remove restrict-background-whitelist` experiment: the blocked status is produced by the per-UID Data-Saver / background-data policy while the underlying Wi-Fi stays CONNECTED and VALIDATED.
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.
This pull request will Merge branch
devtomain.Before merging this PR