fix outgoing call receiver crash

This commit is contained in:
Jehan Monnier 2011-02-09 14:42:32 +01:00
parent 9dd7a88ce0
commit 097cb1580d
4 changed files with 2 additions and 1 deletions

Binary file not shown.

Binary file not shown.

View file

@ -466,6 +466,7 @@ public class LinphoneService extends Service implements LinphoneCoreListener {
theLinphone=null; theLinphone=null;
mNotificationManager.cancel(NOTIFICATION_ID); mNotificationManager.cancel(NOTIFICATION_ID);
unregisterReceiver(mKeepAliveMgrReceiver); unregisterReceiver(mKeepAliveMgrReceiver);
unregisterReceiver(mOutgoingCallReceiver);
} }
public void newSubscriptionRequest(LinphoneCore lc, LinphoneFriend lf, public void newSubscriptionRequest(LinphoneCore lc, LinphoneFriend lf,
String url) { String url) {

View file

@ -34,7 +34,7 @@ public class OutgoingCallReceiver extends BroadcastReceiver {
public void onReceive(Context context, Intent intent) { public void onReceive(Context context, Intent intent) {
String to = intent.getStringExtra("android.intent.extra.PHONE_NUMBER"); String to = intent.getStringExtra("android.intent.extra.PHONE_NUMBER");
//do not catch ussd codes //do not catch ussd codes
if (to.contains("#")) if (to==null || to.contains("#"))
return; return;
if (!to.contains(TAG)) { if (!to.contains(TAG)) {
if (LinphoneService.isready() && LinphoneService.instance().getLinphoneCore().getDefaultProxyConfig()==null) { if (LinphoneService.isready() && LinphoneService.instance().getLinphoneCore().getDefaultProxyConfig()==null) {