mirror of https://github.com/M66B/FairEmail.git
parent
e9bceaf26b
commit
fd223d6d4c
|
@ -187,14 +187,8 @@ public class ConnectionHelper {
|
||||||
Network active = cm.getActiveNetwork();
|
Network active = cm.getActiveNetwork();
|
||||||
if (active == null) {
|
if (active == null) {
|
||||||
Log.i("isMetered: no active network");
|
Log.i("isMetered: no active network");
|
||||||
// Workaround bug in some Android versions
|
|
||||||
NetworkInfo ani = cm.getActiveNetworkInfo();
|
|
||||||
if (ani == null || !ani.isConnected()) {
|
|
||||||
Log.i("isMetered: no active network=" + (ani == null ? null : ani.isConnected()));
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return cm.isActiveNetworkMetered();
|
|
||||||
}
|
|
||||||
|
|
||||||
// onLost [... state: DISCONNECTED/DISCONNECTED ... available: true]
|
// onLost [... state: DISCONNECTED/DISCONNECTED ... available: true]
|
||||||
NetworkInfo ani = cm.getNetworkInfo(active);
|
NetworkInfo ani = cm.getNetworkInfo(active);
|
||||||
|
|
Loading…
Reference in New Issue