diff --git a/xwords4/android/app/build.gradle b/xwords4/android/app/build.gradle index 5f7621cc8..b3a2561b6 100644 --- a/xwords4/android/app/build.gradle +++ b/xwords4/android/app/build.gradle @@ -127,6 +127,19 @@ android { buildConfigField "boolean", "SMS_BANNED", "true" } + xw4SMS { + dimension "variant" + applicationId "org.eehouse.android.xw4" + manifestPlaceholders = [ APP_ID: applicationId ] + resValue "string", "app_name", "CrossWords" + resValue "string", "nbs_port", "3344" + buildConfigField "boolean", "WIDIR_ENABLED", "false" + buildConfigField "boolean", "RELAYINVITE_SUPPORTED", "false" + buildConfigField "String", "VARIANT_NAME", "\"FOSS\"" + buildConfigField "int", "VARIANT_CODE", "5" + buildConfigField "boolean", "SMS_BANNED", "false" + } + // WARNING: "all" breaks things. Seems to be a keyword. Need // to figure out how to express include-all-abis // all { @@ -205,6 +218,14 @@ android { jniLibs.srcDir "../libs-xw4dNoSMSDebug" } } + xw4SMS { + release { + jniLibs.srcDir "../libs-xw4SMSRelease" + } + debug { + jniLibs.srcDir "../libs-xw4SMSDebug" + } + } xw4fdroid { release { jniLibs.srcDir "../libs-xw4fdroidRelease" diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/Perms23.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/Perms23.java index eb71df637..9e08c5e50 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/Perms23.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/Perms23.java @@ -114,7 +114,7 @@ public class Perms23 { // non-banned at the same time (and don't have either) public void asyncQuery( Activity activity, PermCbck cbck ) { - Log.d( TAG, "asyncQuery(%s)", m_perms.toString() ); + Log.d( TAG, "asyncQuery(%s)", m_perms ); boolean haveAll = true; boolean shouldShow = false; Set needShow = new HashSet(); @@ -150,7 +150,7 @@ public class Perms23 { map.put( perm, !banned ); allGood = allGood & !banned; } - cbck.onPermissionResult( allGood, map ); + callOPR( cbck, allGood, map ); } } else if ( 0 < needShow.size() && null != m_onShow ) { // Log.d( TAG, "calling onShouldShowRationale()" ); @@ -357,7 +357,7 @@ public class Perms23 { PermCbck cbck = s_map.remove( code ); if ( null != cbck ) { - cbck.onPermissionResult( allGood, result ); + callOPR( cbck, allGood, result ); } } @@ -422,4 +422,12 @@ public class Perms23 { s_map.put( code, cbck ); return code; } + + private static void callOPR( PermCbck cbck, boolean allGood, + Map map ) + { + Log.d( TAG, "callOPR(): passing %s to %s", map, cbck ); + cbck.onPermissionResult( allGood, map ); + } + } diff --git a/xwords4/android/app/src/xw4SMS/AndroidManifest.xml b/xwords4/android/app/src/xw4SMS/AndroidManifest.xml new file mode 100644 index 000000000..31941dda4 --- /dev/null +++ b/xwords4/android/app/src/xw4SMS/AndroidManifest.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + diff --git a/xwords4/android/app/src/xw4SMS/google-services.json b/xwords4/android/app/src/xw4SMS/google-services.json new file mode 120000 index 000000000..dd43423c5 --- /dev/null +++ b/xwords4/android/app/src/xw4SMS/google-services.json @@ -0,0 +1 @@ +../xw4/google-services.json \ No newline at end of file diff --git a/xwords4/android/app/src/xw4SMS/java/org/eehouse/android/xw4/CrashTrack.java b/xwords4/android/app/src/xw4SMS/java/org/eehouse/android/xw4/CrashTrack.java new file mode 120000 index 000000000..97f80df6c --- /dev/null +++ b/xwords4/android/app/src/xw4SMS/java/org/eehouse/android/xw4/CrashTrack.java @@ -0,0 +1 @@ +../../../../../../xw4fdroid/java/org/eehouse/android/xw4/CrashTrack.java \ No newline at end of file diff --git a/xwords4/android/app/src/xw4SMS/java/org/eehouse/android/xw4/FBMService.java b/xwords4/android/app/src/xw4SMS/java/org/eehouse/android/xw4/FBMService.java new file mode 120000 index 000000000..c61b45e58 --- /dev/null +++ b/xwords4/android/app/src/xw4SMS/java/org/eehouse/android/xw4/FBMService.java @@ -0,0 +1 @@ +../../../../../../xw4/java/org/eehouse/android/xw4/FBMService.java \ No newline at end of file diff --git a/xwords4/android/jni/andutils.c b/xwords4/android/jni/andutils.c index 1df845e25..94867c05e 100644 --- a/xwords4/android/jni/andutils.c +++ b/xwords4/android/jni/andutils.c @@ -754,7 +754,7 @@ android_debugf( const char* format, ... ) } (void)__android_log_write( ANDROID_LOG_DEBUG, -# if defined VARIANT_xw4 || defined VARIANT_xw4fdroid +# if defined VARIANT_xw4 || defined VARIANT_xw4fdroid || defined VARIANT_xw4SMS "xw4" # elif defined VARIANT_xw4d || defined VARIANT_xw4dNoSMS "x4bg" diff --git a/xwords4/android/jni/xwjni.c b/xwords4/android/jni/xwjni.c index dbe25e505..6c5c3e19e 100644 --- a/xwords4/android/jni/xwjni.c +++ b/xwords4/android/jni/xwjni.c @@ -691,7 +691,7 @@ Java_org_eehouse_android_xw4_jni_XwJNI_comms_1getUUID jstring jstr = #ifdef XWFEATURE_BLUETOOTH (*env)->NewStringUTF( env, -# if defined VARIANT_xw4 || defined VARIANT_xw4fdroid +# if defined VARIANT_xw4 || defined VARIANT_xw4fdroid || defined VARIANT_xw4SMS XW_BT_UUID # elif defined VARIANT_xw4d || defined VARIANT_xw4dNoSMS XW_BT_UUID_DBG