fix crash on receiving end: inviteID is optional

This commit is contained in:
Eric House 2015-01-24 11:26:48 -08:00
parent 95f761d664
commit 3a1e091852
2 changed files with 2 additions and 2 deletions

View file

@ -1096,7 +1096,7 @@ public class BTService extends XWService {
private DataOutputStream connect( BluetoothSocket socket, BTCmd cmd ) private DataOutputStream connect( BluetoothSocket socket, BTCmd cmd )
{ {
String name = socket.getRemoteDevice().getName(); String name = socket.getRemoteDevice().getName();
DbgUtils.logf( "connecting to %s to send %s", name, cmd.toString() ); DbgUtils.logf( "connecting to %s to send cmd %s", name, cmd.toString() );
// Docs say always call cancelDiscovery before trying to connect // Docs say always call cancelDiscovery before trying to connect
m_adapter.cancelDiscovery(); m_adapter.cancelDiscovery();

View file

@ -104,7 +104,7 @@ public class NetLaunchInfo {
break; break;
case COMMS_CONN_RELAY: case COMMS_CONN_RELAY:
room = json.getString( MultiService.ROOM ); room = json.getString( MultiService.ROOM );
m_inviteID = json.getString( MultiService.INVITEID ); m_inviteID = json.optString( MultiService.INVITEID );
break; break;
case COMMS_CONN_SMS: case COMMS_CONN_SMS:
phone = json.getString( PHONE_KEY ); phone = json.getString( PHONE_KEY );