From e4bc2d99eddb03e39f6cf4d5f9b981b890d99f03 Mon Sep 17 00:00:00 2001 From: Eric House Date: Fri, 10 Jan 2020 11:44:14 -0800 Subject: [PATCH] fix crash inviting via SMS/Text Was asserting when NFC type came through. Bad. --- .../main/java/org/eehouse/android/xw4/NetLaunchInfo.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/NetLaunchInfo.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/NetLaunchInfo.java index 183d9edce..aff0be752 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/NetLaunchInfo.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/NetLaunchInfo.java @@ -217,9 +217,13 @@ public class NetLaunchInfo implements Serializable { p2pMacAddress = data.getQueryParameter( P2P_MAC_KEY ); doAdd = !hasAddrs && null != p2pMacAddress; break; + case COMMS_CONN_NFC: + doAdd = true; + break; default: doAdd = false; - Assert.fail(); + Log.d( TAG, "unexpected type: %s", typ ); + Assert.assertFalse( BuildConfig.DEBUG ); } if ( doAdd ) { m_addrs.add( typ ); @@ -691,7 +695,7 @@ public class NetLaunchInfo implements Serializable { private void calcValid() { boolean valid = hasCommon() && null != m_addrs; - // DbgUtils.logf( "calcValid(%s)", toString() ); + // Log.d( TAG, "calcValid(%s); valid (so far): %b", this, valid ); if ( valid ) { for ( Iterator iter = m_addrs.iterator(); valid && iter.hasNext(); ) {