Workaround incorrect suspended state

pull/184/head
M66B 5 years ago
parent 471f07f18f
commit bc1b9e62c4

@ -208,7 +208,8 @@ public class ConnectionHelper {
// onLost [... state: DISCONNECTED/DISCONNECTED ... available: true] // onLost [... state: DISCONNECTED/DISCONNECTED ... available: true]
NetworkInfo ani = cm.getNetworkInfo(active); NetworkInfo ani = cm.getNetworkInfo(active);
if (ani == null || !ani.isConnected()) { if (ani == null || ani.getState() == NetworkInfo.State.DISCONNECTED) {
// State can incorrectly be SUSPENDED
Log.i("isMetered: no active info ani=" + ani); Log.i("isMetered: no active info ani=" + ani);
return null; return null;
} }

Loading…
Cancel
Save