update submodules, attempt to workaround a problem on a phone where data is said to be available but this is not the case.

This commit is contained in:
Simon Morlat 2017-02-03 22:48:51 +01:00
parent e45e8b8229
commit 9af91c6e26
4 changed files with 9 additions and 9 deletions

View file

@ -892,24 +892,24 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
public void updateNetworkReachability() {
ConnectivityManager cm = (ConnectivityManager) mServiceContext.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo eventInfo = cm.getActiveNetworkInfo();
NetworkInfo networkInfo = cm.getActiveNetworkInfo();
if (eventInfo == null || eventInfo.getState() == NetworkInfo.State.DISCONNECTED || dozeModeEnabled) {
if (networkInfo == null || !networkInfo.isConnected() || dozeModeEnabled) {
Log.i("No connectivity: setting network unreachable");
mLc.setNetworkReachable(false);
} else if (eventInfo.getState() == NetworkInfo.State.CONNECTED){
manageTunnelServer(eventInfo);
} else if (networkInfo.isConnected()){
manageTunnelServer(networkInfo);
boolean wifiOnly = LinphonePreferences.instance().isWifiOnlyEnabled();
if (wifiOnly){
if (eventInfo.getType()==ConnectivityManager.TYPE_WIFI)
if (networkInfo.getType()==ConnectivityManager.TYPE_WIFI)
mLc.setNetworkReachable(true);
else {
Log.i("Wifi-only mode, setting network not reachable");
mLc.setNetworkReachable(false);
}
}else{
int curtype=eventInfo.getType();
int curtype=networkInfo.getType();
if (curtype!=mLastNetworkType){
//if kind of network has changed, we need to notify network_reachable(false) to make sure all current connections are destroyed.

@ -1 +1 @@
Subproject commit b2a91b1f58ecf0941b3c599a0926a2940fd236b6
Subproject commit b9121e2f8a6d7cad1d621e279d49adf1d3d1e8ed

@ -1 +1 @@
Subproject commit c099ab1ddff6f217f462c2a2fddb1dd32432baf8
Subproject commit bcb9b2389c2e7f55813c59306bf42f58b3a6b633

@ -1 +1 @@
Subproject commit 01e990259d88ce8893cc4284d25d7986c75e38a4
Subproject commit 285ee7aec730144ce04083199e1c4e7ccd9f02cf