Fix crash when toggling WifiOnly mode when no DATA connection available
This commit is contained in:
parent
ebb630ce9d
commit
4398a502e4
1 changed files with 1 additions and 1 deletions
|
@ -239,7 +239,7 @@ public class PreferencesFragment extends PreferencesListFragment implements EcCa
|
||||||
NetworkInfo eventInfo = cm.getActiveNetworkInfo();
|
NetworkInfo eventInfo = cm.getActiveNetworkInfo();
|
||||||
|
|
||||||
LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
|
LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
|
||||||
if (eventInfo.getTypeName().equals("mobile") && lc != null) {
|
if (eventInfo != null && eventInfo.getTypeName() != null && eventInfo.getTypeName().equals("mobile") && lc != null) {
|
||||||
lc.setNetworkReachable(!isSettingActivated);
|
lc.setNetworkReachable(!isSettingActivated);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue