add new Variant for github & sourceforge releases

and log permission check results
This commit is contained in:
Eric House 2019-03-09 12:17:12 -08:00
parent acbbb7fc88
commit d925981666
8 changed files with 63 additions and 5 deletions

View file

@ -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"

View file

@ -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<Perm> needShow = new HashSet<Perm>();
@ -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<Perm, Boolean> map )
{
Log.d( TAG, "callOPR(): passing %s to %s", map, cbck );
cbck.onPermissionResult( allGood, map );
}
}

View file

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.eehouse.android.xw4"
>
<!-- GooglePlay version no longer allowed to have these (after 9 March 2019) -->
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.SEND_SMS" />
<!-- for crittercism -->
<uses-permission android:name="android.permission.GET_TASKS"/>
<application android:icon="@drawable/icon48x48"
android:label="@string/app_name"
android:name=".XWApp"
android:theme="@style/AppTheme"
>
<activity android:name="WiDirInviteActivity"
android:label="@string/p2p_invite_title"
/>
<service android:name="WiDirService"/>
</application>
</manifest>

View file

@ -0,0 +1 @@
../xw4/google-services.json

View file

@ -0,0 +1 @@
../../../../../../xw4fdroid/java/org/eehouse/android/xw4/CrashTrack.java

View file

@ -0,0 +1 @@
../../../../../../xw4/java/org/eehouse/android/xw4/FBMService.java

View file

@ -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"

View file

@ -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