Commit 5b3c462c authored by Alexandre Lision's avatar Alexandre Lision Committed by Thibault Wittemberg
Browse files

notification: prevent npe



Change-Id: I71dcf5aaee86c752400a52c5145438157e4eef9e
Reviewed-by: default avatarThibault Wittemberg <thibault.wittemberg@savoirfairelinux.com>
parent bb2522ee
......@@ -1196,24 +1196,24 @@ public class LocalService extends Service implements SharedPreferences.OnSharedP
break;
}
case ACTION_CONV_READ: {
String conv_id = intent.getData().getLastPathSegment();
Conversation conversation = getConversation(conv_id);
String convId = intent.getData().getLastPathSegment();
Conversation conversation = getConversation(convId);
if (conversation != null) {
readConversation(conversation);
}
sendBroadcast(new Intent(ACTION_CONF_UPDATE).setData(Uri.withAppendedPath(ConversationActivity.CONTENT_URI, conv_id)));
sendBroadcast(new Intent(ACTION_CONF_UPDATE).setData(Uri.withAppendedPath(ConversationActivity.CONTENT_URI, convId)));
break;
}
case ACTION_CALL_ACCEPT: {
String call_id = intent.getData().getLastPathSegment();
String callId = intent.getData().getLastPathSegment();
try {
mService.accept(call_id);
mService.accept(callId);
} catch (RemoteException e) {
e.printStackTrace();
}
updateAudioState();
Conference conf = getConference(call_id);
if (!conf.mVisible)
Conference conf = getConference(callId);
if (conf != null && !conf.mVisible)
startActivity(conf.getViewIntent(LocalService.this).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
break;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment