From 65606607abd65c23bb0f70ef48a69f80e97d57d4 Mon Sep 17 00:00:00 2001 From: Eric House Date: Wed, 29 Jul 2015 19:48:56 -0700 Subject: [PATCH] use different uuid for dbg variant so it's not cross-sending BT messages with other variants, causing among other problems spurious "deleted on other device" warnings. --- xwords4/android/XWords4/jni/Android.mk | 1 + xwords4/android/XWords4/jni/xwjni.c | 10 ++++++++-- xwords4/android/scripts/common_targets.xml | 1 + xwords4/common/comms.h | 1 + 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/xwords4/android/XWords4/jni/Android.mk b/xwords4/android/XWords4/jni/Android.mk index f669f7fee..b641c3748 100644 --- a/xwords4/android/XWords4/jni/Android.mk +++ b/xwords4/android/XWords4/jni/Android.mk @@ -42,6 +42,7 @@ LOCAL_DEFINES += \ -DNATIVE_NLI \ -DCOMMS_VERSION=1 \ -DINITIAL_CLIENT_VERS=${INITIAL_CLIENT_VERS} \ + -DVARIANT=\"${VARIANT}\" \ -DRELAY_ROOM_DEFAULT=\"\" \ -D__LITTLE_ENDIAN \ diff --git a/xwords4/android/XWords4/jni/xwjni.c b/xwords4/android/XWords4/jni/xwjni.c index 3a5fc467e..c994b06fe 100644 --- a/xwords4/android/XWords4/jni/xwjni.c +++ b/xwords4/android/XWords4/jni/xwjni.c @@ -565,8 +565,14 @@ Java_org_eehouse_android_xw4_jni_XwJNI_comms_1getUUID { jstring jstr = NULL; #ifdef XWFEATURE_BLUETOOTH - const char* uuid = XW_BT_UUID; - XP_LOGF( "uuid: %s", uuid ); + const char* uuid; + if ( 0 == XP_STRCMP( VARIANT, "xw4" ) ) { + uuid = XW_BT_UUID; + } else if ( 0 == XP_STRCMP( VARIANT, "xw4dbg" ) ) { + uuid = XW_BT_UUID_DBG; + } else { + XP_ASSERT(0); + } jstr = (*env)->NewStringUTF( env, uuid ); #endif return jstr; diff --git a/xwords4/android/scripts/common_targets.xml b/xwords4/android/scripts/common_targets.xml index d0f14018f..12629352c 100644 --- a/xwords4/android/scripts/common_targets.xml +++ b/xwords4/android/scripts/common_targets.xml @@ -35,6 +35,7 @@ +