mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-03 18:26:20 +00:00
Workaround Android connectivity bug
This commit is contained in:
parent
306d6539cc
commit
23c3ab2010
1 changed files with 5 additions and 0 deletions
|
@ -165,6 +165,11 @@ public class ConnectionHelper {
|
|||
return null;
|
||||
}
|
||||
|
||||
// onLost [... state: DISCONNECTED/DISCONNECTED ... available: true]
|
||||
NetworkInfo ani = cm.getNetworkInfo(active);
|
||||
if (ani == null || !ani.isConnected())
|
||||
return null;
|
||||
|
||||
NetworkCapabilities caps = cm.getNetworkCapabilities(active);
|
||||
if (caps == null) {
|
||||
Log.i("isMetered: active no caps");
|
||||
|
|
Loading…
Add table
Reference in a new issue