Some fix to avoid crash
This commit is contained in:
parent
946cb24eb3
commit
d7302206dc
4 changed files with 15 additions and 6 deletions
|
@ -42,7 +42,11 @@ public class BootReceiver extends BroadcastReceiver {
|
|||
if (autostart) {
|
||||
Intent lLinphoneServiceIntent = new Intent(Intent.ACTION_MAIN);
|
||||
lLinphoneServiceIntent.setClass(context, LinphoneService.class);
|
||||
context.startService(lLinphoneServiceIntent);
|
||||
try {
|
||||
context.startService(lLinphoneServiceIntent);
|
||||
} catch (RuntimeException e) {
|
||||
Log.e(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1401,8 +1401,11 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
|
|||
try {
|
||||
if (mLc.getCallsNb() > 0) {
|
||||
mLc.acceptCall(call);
|
||||
LinphoneManager.getInstance().routeAudioToReceiver();
|
||||
LinphoneActivity.instance().startIncallActivity(call);
|
||||
if (LinphoneManager.getInstance() != null) {
|
||||
LinphoneManager.getInstance().routeAudioToReceiver();
|
||||
if (LinphoneActivity.instance() != null)
|
||||
LinphoneActivity.instance().startIncallActivity(call);
|
||||
}
|
||||
}
|
||||
} catch (LinphoneCoreException e) {
|
||||
Log.e(e);
|
||||
|
|
|
@ -728,7 +728,7 @@ public final class LinphoneUtils {
|
|||
}
|
||||
|
||||
public static void displayErrorAlert(String msg, Context ctxt) {
|
||||
if (ctxt != null) {
|
||||
if (ctxt != null && msg != null) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(ctxt);
|
||||
builder.setMessage(msg)
|
||||
.setCancelable(false)
|
||||
|
|
|
@ -138,8 +138,10 @@ private static AssistantActivity instance;
|
|||
mPrefs = LinphonePreferences.instance();
|
||||
status.enableSideMenu(false);
|
||||
|
||||
accountCreator = LinphoneCoreFactory.instance().createAccountCreator(LinphoneManager.getLc(), LinphonePreferences.instance().getXmlrpcUrl());
|
||||
accountCreator.setListener(this);
|
||||
if (LinphoneManager.getLcIfManagerNotDestroyedOrNull() != null) {
|
||||
accountCreator = LinphoneCoreFactory.instance().createAccountCreator(LinphoneManager.getLc(), LinphonePreferences.instance().getXmlrpcUrl());
|
||||
accountCreator.setListener(this);
|
||||
}
|
||||
|
||||
countryListAdapter = new CountryListAdapter(getApplicationContext());
|
||||
mListener = new LinphoneCoreListenerBase() {
|
||||
|
|
Loading…
Reference in a new issue