fix crash inviting via SMS/Text

Was asserting when NFC type came through. Bad.
This commit is contained in:
Eric House 2020-01-10 11:44:14 -08:00
parent 9406297c03
commit e4bc2d99ed

View file

@ -217,9 +217,13 @@ public class NetLaunchInfo implements Serializable {
p2pMacAddress = data.getQueryParameter( P2P_MAC_KEY ); p2pMacAddress = data.getQueryParameter( P2P_MAC_KEY );
doAdd = !hasAddrs && null != p2pMacAddress; doAdd = !hasAddrs && null != p2pMacAddress;
break; break;
case COMMS_CONN_NFC:
doAdd = true;
break;
default: default:
doAdd = false; doAdd = false;
Assert.fail(); Log.d( TAG, "unexpected type: %s", typ );
Assert.assertFalse( BuildConfig.DEBUG );
} }
if ( doAdd ) { if ( doAdd ) {
m_addrs.add( typ ); m_addrs.add( typ );
@ -691,7 +695,7 @@ public class NetLaunchInfo implements Serializable {
private void calcValid() private void calcValid()
{ {
boolean valid = hasCommon() && null != m_addrs; boolean valid = hasCommon() && null != m_addrs;
// DbgUtils.logf( "calcValid(%s)", toString() ); // Log.d( TAG, "calcValid(%s); valid (so far): %b", this, valid );
if ( valid ) { if ( valid ) {
for ( Iterator<CommsConnType> iter = m_addrs.iterator(); for ( Iterator<CommsConnType> iter = m_addrs.iterator();
valid && iter.hasNext(); ) { valid && iter.hasNext(); ) {