Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ConnectivityServiceImpl.java #14519

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

joshtrichards
Copy link
Member

Fixes #6851

NET_CAPABILITY_NOT_RESTRICTED is not sufficient to check if a network is metered.
Checking either NET_CAPABILITY_NOT_METERED or calling isActiveNetworkMetered() are likely more appropriate. While we do call isNetworkActiveNetworked(), it's never executed since getActiveNetwork() will rarely be null.

In addition, ConnectivityManagerCompat doesn't seem to be needed any longer since it's for API <16.

TODO (out of scope for this PR): Callbacks

  • Tests written, or not not needed

Copy link

test-Unit test failed, but no output was generated. Maybe a preliminary stage failed.

Copy link

blue-Light-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed.

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.

Prevent auto uploads on metered Wi-Fi
1 participant