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) {
|
if (autostart) {
|
||||||
Intent lLinphoneServiceIntent = new Intent(Intent.ACTION_MAIN);
|
Intent lLinphoneServiceIntent = new Intent(Intent.ACTION_MAIN);
|
||||||
lLinphoneServiceIntent.setClass(context, LinphoneService.class);
|
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 {
|
try {
|
||||||
if (mLc.getCallsNb() > 0) {
|
if (mLc.getCallsNb() > 0) {
|
||||||
mLc.acceptCall(call);
|
mLc.acceptCall(call);
|
||||||
LinphoneManager.getInstance().routeAudioToReceiver();
|
if (LinphoneManager.getInstance() != null) {
|
||||||
LinphoneActivity.instance().startIncallActivity(call);
|
LinphoneManager.getInstance().routeAudioToReceiver();
|
||||||
|
if (LinphoneActivity.instance() != null)
|
||||||
|
LinphoneActivity.instance().startIncallActivity(call);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (LinphoneCoreException e) {
|
} catch (LinphoneCoreException e) {
|
||||||
Log.e(e);
|
Log.e(e);
|
||||||
|
|
|
@ -728,7 +728,7 @@ public final class LinphoneUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void displayErrorAlert(String msg, Context ctxt) {
|
public static void displayErrorAlert(String msg, Context ctxt) {
|
||||||
if (ctxt != null) {
|
if (ctxt != null && msg != null) {
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(ctxt);
|
AlertDialog.Builder builder = new AlertDialog.Builder(ctxt);
|
||||||
builder.setMessage(msg)
|
builder.setMessage(msg)
|
||||||
.setCancelable(false)
|
.setCancelable(false)
|
||||||
|
|
|
@ -138,8 +138,10 @@ private static AssistantActivity instance;
|
||||||
mPrefs = LinphonePreferences.instance();
|
mPrefs = LinphonePreferences.instance();
|
||||||
status.enableSideMenu(false);
|
status.enableSideMenu(false);
|
||||||
|
|
||||||
accountCreator = LinphoneCoreFactory.instance().createAccountCreator(LinphoneManager.getLc(), LinphonePreferences.instance().getXmlrpcUrl());
|
if (LinphoneManager.getLcIfManagerNotDestroyedOrNull() != null) {
|
||||||
accountCreator.setListener(this);
|
accountCreator = LinphoneCoreFactory.instance().createAccountCreator(LinphoneManager.getLc(), LinphonePreferences.instance().getXmlrpcUrl());
|
||||||
|
accountCreator.setListener(this);
|
||||||
|
}
|
||||||
|
|
||||||
countryListAdapter = new CountryListAdapter(getApplicationContext());
|
countryListAdapter = new CountryListAdapter(getApplicationContext());
|
||||||
mListener = new LinphoneCoreListenerBase() {
|
mListener = new LinphoneCoreListenerBase() {
|
||||||
|
|
Loading…
Reference in a new issue