Respect system Data Saver preferences
In Android 7.0+ (API level 24), a system preference "Data Saver" controls the system-wide data saving. The ConnectivityManager
API provides apps with a way to retrieve the user’s Data Saver preferences and monitor preference changes. We should honor that preference (instead).
Also, rather than "Over Data" and "Over Wi-Fi", the distinction should be "Is Metered" or "Not Metered", which is the reasonable source of the problem. Notice that many Wi-Fi connections are metered, and many data plans are not.