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:
parent
e45e8b8229
commit
9af91c6e26
4 changed files with 9 additions and 9 deletions
|
@ -892,24 +892,24 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
|
||||||
|
|
||||||
public void updateNetworkReachability() {
|
public void updateNetworkReachability() {
|
||||||
ConnectivityManager cm = (ConnectivityManager) mServiceContext.getSystemService(Context.CONNECTIVITY_SERVICE);
|
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");
|
Log.i("No connectivity: setting network unreachable");
|
||||||
mLc.setNetworkReachable(false);
|
mLc.setNetworkReachable(false);
|
||||||
} else if (eventInfo.getState() == NetworkInfo.State.CONNECTED){
|
} else if (networkInfo.isConnected()){
|
||||||
manageTunnelServer(eventInfo);
|
manageTunnelServer(networkInfo);
|
||||||
|
|
||||||
boolean wifiOnly = LinphonePreferences.instance().isWifiOnlyEnabled();
|
boolean wifiOnly = LinphonePreferences.instance().isWifiOnlyEnabled();
|
||||||
if (wifiOnly){
|
if (wifiOnly){
|
||||||
if (eventInfo.getType()==ConnectivityManager.TYPE_WIFI)
|
if (networkInfo.getType()==ConnectivityManager.TYPE_WIFI)
|
||||||
mLc.setNetworkReachable(true);
|
mLc.setNetworkReachable(true);
|
||||||
else {
|
else {
|
||||||
Log.i("Wifi-only mode, setting network not reachable");
|
Log.i("Wifi-only mode, setting network not reachable");
|
||||||
mLc.setNetworkReachable(false);
|
mLc.setNetworkReachable(false);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
int curtype=eventInfo.getType();
|
int curtype=networkInfo.getType();
|
||||||
|
|
||||||
if (curtype!=mLastNetworkType){
|
if (curtype!=mLastNetworkType){
|
||||||
//if kind of network has changed, we need to notify network_reachable(false) to make sure all current connections are destroyed.
|
//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
|
Loading…
Reference in a new issue