Fix compilation from eclipse causing crash because of null string
This commit is contained in:
parent
cda71d1ae7
commit
2dc8137dbb
1 changed files with 13 additions and 10 deletions
|
@ -416,16 +416,18 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
|||
try {
|
||||
copyAssetsFromPackage();
|
||||
//traces alway start with traces enable to not missed first initialization
|
||||
;
|
||||
|
||||
boolean isDebugLogEnabled = !(mR.getBoolean(R.bool.disable_every_log)) && getPrefBoolean(R.string.pref_debug_key, mR.getBoolean(R.bool.pref_debug_default));
|
||||
LinphoneCoreFactory.instance().setDebugMode(isDebugLogEnabled, getString(R.string.app_name));
|
||||
|
||||
mLc = LinphoneCoreFactory.instance().createLinphoneCore(
|
||||
this, mLinphoneConfigFile, mLinphoneInitialConfigFile, null);
|
||||
mLc = LinphoneCoreFactory.instance().createLinphoneCore(this, mLinphoneConfigFile, mLinphoneInitialConfigFile, null);
|
||||
mLc.setContext(c);
|
||||
try {
|
||||
mLc.setUserAgent("LinphoneAndroid", c.getPackageManager().getPackageInfo(c.getPackageName(), 0).versionName);
|
||||
String versionName = c.getPackageManager().getPackageInfo(c.getPackageName(), 0).versionName;
|
||||
if (versionName == null) {
|
||||
versionName = String.valueOf(c.getPackageManager().getPackageInfo(c.getPackageName(), 0).versionCode);
|
||||
}
|
||||
mLc.setUserAgent("LinphoneAndroid", versionName);
|
||||
} catch (NameNotFoundException e) {
|
||||
Log.e(e, "cannot get version name");
|
||||
}
|
||||
|
@ -516,7 +518,9 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
|||
}
|
||||
|
||||
private void initFromConfTunnel(){
|
||||
if (!mLc.isTunnelAvailable()) return;
|
||||
if (!mLc.isTunnelAvailable())
|
||||
return;
|
||||
|
||||
NetworkInfo info = mConnectivityManager.getActiveNetworkInfo();
|
||||
mLc.tunnelCleanServers();
|
||||
String host = getString(R.string.tunnel_host);
|
||||
|
@ -536,7 +540,6 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
|||
if (!getPrefBoolean(getString(R.string.pref_disable_account_key) + key, false)) {
|
||||
initAccount(key, i == getPrefInt(R.string.pref_default_account_key, 0));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
LinphoneProxyConfig lDefaultProxyConfig = mLc.getDefaultProxyConfig();
|
||||
|
|
Loading…
Reference in a new issue