I'm running Android Oreo 8.1 on a Pixel XL. When I go to Settings > Network & Internet > Data usage > Network restrictions, I notice that all of my saved wifi networks are listed. Under each one, it says "Automatic". When I select one of the networks in the list, I see "Automatic", "Metered", and "Not metered". What does "Automatic" mean in this context?
As far as I can tell from looking at the code, "Automatic" means the network is metered if it meets at least one of these heuristics:
- The WifiConfiguration has a metered hint, which I assume can be done if the network is added by an app.
- The network has an "Ant" (802.11u access network type) of PublicChargeable (code).
- The DHCP server sent the
ANDROID_METEREDoption (code 1, 2), which the Android hotspot itself sends. Additional commentary.
(I found the code links by searching the LineageOS source code on GitHub and opening the corresponding AOSP files, since the AOSP repository browser doesn't appear to support searching; maybe there's another way.)