From b9c34b2b317da0f6725ee05d78c6d071ecfa17c3 Mon Sep 17 00:00:00 2001 From: Eric House Date: Thu, 1 Apr 2021 13:26:25 -0700 Subject: [PATCH] don't include relay in rematch addressing --- .../src/main/java/org/eehouse/android/xw4/BoardDelegate.java | 4 ++++ .../main/java/org/eehouse/android/xw4/GamesListDelegate.java | 3 +++ 2 files changed, 7 insertions(+) diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BoardDelegate.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BoardDelegate.java index 0f76ea5a4..bf99aa438 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BoardDelegate.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BoardDelegate.java @@ -2956,6 +2956,10 @@ public class BoardDelegate extends DelegateBase if ( doIt ) { CommsConnTypeSet connTypes = summary.conTypes; + if ( BuildConfig.NO_NEW_RELAY ) { + connTypes.remove(CommsConnType.COMMS_CONN_RELAY); + relayID = null; + } String newName = summary.getRematchName( activity ); Intent intent = GamesListDelegate .makeRematchIntent( activity, rowid, groupID, gi, connTypes, diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GamesListDelegate.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GamesListDelegate.java index 1c0e5b059..1b7ec84a5 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GamesListDelegate.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GamesListDelegate.java @@ -3092,6 +3092,9 @@ public class GamesListDelegate extends ListDelegateBase .putExtra( REMATCH_NEWNAME_EXTRA, newName ); if ( null != addrTypes ) { + if ( BuildConfig.NO_NEW_RELAY ) { + Assert.assertTrueNR( !addrTypes.contains(CommsConnType.COMMS_CONN_RELAY) ); + } intent.putExtra( REMATCH_ADDRS_EXTRA, addrTypes.toInt() ); if ( null != btAddr ) { Assert.assertTrue( addrTypes.contains( CommsConnType.COMMS_CONN_BT ) );