mirror of https://github.com/M66B/FairEmail.git
Removed old network fallback
This commit is contained in:
parent
3b7e790052
commit
fe57218095
|
@ -216,18 +216,17 @@ public class ConnectionHelper {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
Network active = null;
|
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) {
|
||||||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.M)
|
|
||||||
active = cm.getActiveNetwork();
|
|
||||||
if (active == null) {
|
|
||||||
NetworkInfo ani = cm.getActiveNetworkInfo();
|
NetworkInfo ani = cm.getActiveNetworkInfo();
|
||||||
if (ani == null || !ani.isConnected()) {
|
if (ani == null || !ani.isConnected())
|
||||||
Log.i("isMetered: no/connected active network info=" + ani);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
return cm.isActiveNetworkMetered();
|
||||||
boolean metered = cm.isActiveNetworkMetered();
|
}
|
||||||
Log.i("isMetered: active network metered=" + metered);
|
|
||||||
return metered;
|
Network active = cm.getActiveNetwork();
|
||||||
|
if (active == null) {
|
||||||
|
Log.i("isMetered: no active network");
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// onLost [... state: SUSPENDED/SUSPENDED ... available: true]
|
// onLost [... state: SUSPENDED/SUSPENDED ... available: true]
|
||||||
|
|
Loading…
Reference in New Issue