diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BTService.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BTService.java index 8f0579c1b..94fdfd4dc 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BTService.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BTService.java @@ -1373,7 +1373,7 @@ public class BTService extends XWService { String btAddr ) { BTCmd result; - if ( mHelper.handleInvitation( nli, btName, + if ( mHelper.handleInvitation( this, nli, btName, DictFetchOwner.OWNER_BT ) ) { result = BTCmd.INVITE_ACCPT; } else { diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/RelayService.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/RelayService.java index 517a14e7c..1fa4f6a98 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/RelayService.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/RelayService.java @@ -303,7 +303,8 @@ public class RelayService extends JobIntentService { Log.d( TAG, "receiveInvitation: got nli from %d: %s", srcDevID, nli.toString() ); - if ( !mHelper.handleInvitation( nli, null, DictFetchOwner.OWNER_RELAY ) ) { + if ( !mHelper.handleInvitation( this, nli, null, + DictFetchOwner.OWNER_RELAY ) ) { Log.d( TAG, "handleInvitation() failed" ); } } diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/SMSService.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/SMSService.java index 6d23eb189..8b27b708c 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/SMSService.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/SMSService.java @@ -495,7 +495,7 @@ public class SMSService extends XWService { private void makeForInvite( String phone, NetLaunchInfo nli ) { if ( nli != null ) { - mHelper.handleInvitation( nli, phone, DictFetchOwner.OWNER_SMS ); + mHelper.handleInvitation( this, nli, phone, DictFetchOwner.OWNER_SMS ); ackInvite( phone, nli.gameID() ); } } diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/WiDirService.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/WiDirService.java index 432d191b9..335322575 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/WiDirService.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/WiDirService.java @@ -767,7 +767,7 @@ public class WiDirService extends XWService { NetLaunchInfo nli = NetLaunchInfo.makeFrom( this, nliData ); String returnMac = intent.getStringExtra( KEY_SRC ); - if ( !mHelper.handleInvitation( nli, returnMac, DictFetchOwner.OWNER_P2P ) ) { + if ( !mHelper.handleInvitation( this, nli, returnMac, DictFetchOwner.OWNER_P2P ) ) { Log.d( TAG, "handleInvitation() failed" ); } } diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/XWServiceHelper.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/XWServiceHelper.java index 01950bf6d..805e36686 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/XWServiceHelper.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/XWServiceHelper.java @@ -117,8 +117,8 @@ abstract class XWServiceHelper { } } - protected boolean handleInvitation( NetLaunchInfo nli, String device, - DictFetchOwner dfo ) + protected boolean handleInvitation( Context context, NetLaunchInfo nli, + String device, DictFetchOwner dfo ) { boolean success = nli.isValid() && checkNotInFlight( nli ); if ( success ) { @@ -141,6 +141,8 @@ abstract class XWServiceHelper { GamePtr gamePtr = GameUtils .loadMakeGame( mService, gi, lock ); gamePtr.release(); + } else { + DbgUtils.toastNoLock( TAG, context, "handleInvitation()" ); } }