mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-04-21 20:48:29 +00:00
fix nullpointer exceptions at startup
This commit is contained in:
parent
a169c9a3cf
commit
400aab277e
1 changed files with 3 additions and 2 deletions
|
|
@ -606,7 +606,8 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private synchronized void initLiblinphone() throws LinphoneCoreException {
|
private synchronized void initLiblinphone(LinphoneCore lc) throws LinphoneCoreException {
|
||||||
|
mLc = lc;
|
||||||
boolean isDebugLogEnabled = !(mR.getBoolean(R.bool.disable_every_log)) && mPrefs.isDebugEnabled();
|
boolean isDebugLogEnabled = !(mR.getBoolean(R.bool.disable_every_log)) && mPrefs.isDebugEnabled();
|
||||||
LinphoneCoreFactory.instance().setDebugMode(isDebugLogEnabled, getString(R.string.app_name));
|
LinphoneCoreFactory.instance().setDebugMode(isDebugLogEnabled, getString(R.string.app_name));
|
||||||
LinphoneCoreFactory.instance().enableLogCollection(isDebugLogEnabled);
|
LinphoneCoreFactory.instance().enableLogCollection(isDebugLogEnabled);
|
||||||
|
|
@ -880,7 +881,7 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
|
||||||
Log.i("New global state [",state,"]");
|
Log.i("New global state [",state,"]");
|
||||||
if (state == GlobalState.GlobalOn){
|
if (state == GlobalState.GlobalOn){
|
||||||
try {
|
try {
|
||||||
initLiblinphone();
|
initLiblinphone(lc);
|
||||||
} catch (LinphoneCoreException e) {
|
} catch (LinphoneCoreException e) {
|
||||||
Log.e(e);
|
Log.e(e);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue