From 51a00cd82943bdef0ec391b3efcee708542594eb Mon Sep 17 00:00:00 2001 From: Eric House Date: Wed, 10 Jun 2020 12:54:22 -0700 Subject: [PATCH] allow everybody the new phonies option --- xwords4/android/app/build.gradle | 4 +--- .../java/org/eehouse/android/xw4/XWPrefs.java | 1 + .../eehouse/android/xw4/jni/CommsAddrRec.java | 4 ++-- .../app/src/main/res/values/common_rsrc.xml | 1 + .../android/app/src/main/res/values/strings.xml | 2 ++ .../android/app/src/main/res/xml/xwprefs.xml | 14 +++++++------- .../app/src/xw4d/res/values/tmp_for_phony.xml | 17 ----------------- 7 files changed, 14 insertions(+), 29 deletions(-) delete mode 100644 xwords4/android/app/src/xw4d/res/values/tmp_for_phony.xml diff --git a/xwords4/android/app/build.gradle b/xwords4/android/app/build.gradle index b624e918e..2251e99e0 100644 --- a/xwords4/android/app/build.gradle +++ b/xwords4/android/app/build.gradle @@ -90,7 +90,7 @@ android { buildConfigField "boolean", "LOG_LIFECYLE", "false" buildConfigField "String", "KEY_FCMID", "\"FBMService_fcmid\"" buildConfigField "boolean", "ATTACH_SUPPORTED", "false" - buildConfigField "boolean", "OFFER_MQTT", "false" + buildConfigField "boolean", "OFFER_MQTT", "true" } xw4NoSMS { @@ -138,7 +138,6 @@ android { buildConfigField "String", "KEY_FCMID", "\"FBMService_fcmid1\"" buildConfigField "String", "NFC_AID", "\"${NFC_AID_XW4d}\"" resValue "string", "nfc_aid", "$NFC_AID_XW4d" - buildConfigField "boolean", "OFFER_MQTT", "true" externalNativeBuild.ndkBuild.cFlags += ['-DVARIANT_xw4d'] externalNativeBuild.ndkBuild.arguments += ['XW_BT_UUID=' + XWD_UUID] } @@ -156,7 +155,6 @@ android { buildConfigField "boolean", "REPORT_LOCKS", "true" buildConfigField "String", "NFC_AID", "\"${NFC_AID_XW4d}\"" resValue "string", "nfc_aid", "$NFC_AID_XW4d" - buildConfigField "boolean", "OFFER_MQTT", "true" externalNativeBuild.ndkBuild.cFlags += ['-DVARIANT_xw4dNoSMS'] externalNativeBuild.ndkBuild.arguments += ['XW_BT_UUID=' + XWD_UUID] } diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/XWPrefs.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/XWPrefs.java index e827f9bdf..28b314efa 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/XWPrefs.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/XWPrefs.java @@ -543,6 +543,7 @@ public class XWPrefs { setAddrTypes( context, result ); } + // Log.d( TAG, "getAddrTypes() => %s", result.toString( context, false) ); return result; } diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/jni/CommsAddrRec.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/jni/CommsAddrRec.java index 55488fb5f..4afd8b889 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/jni/CommsAddrRec.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/jni/CommsAddrRec.java @@ -118,11 +118,11 @@ public class CommsAddrRec { for ( CommsConnType value : values ) { int ord = value.ordinal(); if ( 0 != (bits & (1 << (ord - 1)))) { - add( value ); + addWithCheck( value ); } } } else if ( bits < values.length ) { // don't crash - add( values[bits] ); + addWithCheck( values[bits] ); } else { Log.e( TAG, ": bad bits value: 0x%x", inBits ); } diff --git a/xwords4/android/app/src/main/res/values/common_rsrc.xml b/xwords4/android/app/src/main/res/values/common_rsrc.xml index 70eeaf5c3..1182c4138 100644 --- a/xwords4/android/app/src/main/res/values/common_rsrc.xml +++ b/xwords4/android/app/src/main/res/values/common_rsrc.xml @@ -184,6 +184,7 @@ @string/phonies_ignore @string/phonies_warn @string/phonies_disallow + @string/phonies_block diff --git a/xwords4/android/app/src/main/res/values/strings.xml b/xwords4/android/app/src/main/res/values/strings.xml index 4512ff56e..19cf3c223 100644 --- a/xwords4/android/app/src/main/res/values/strings.xml +++ b/xwords4/android/app/src/main/res/values/strings.xml @@ -355,6 +355,8 @@ Disallow phonies + + Block phonies At least one player must diff --git a/xwords4/android/app/src/main/res/xml/xwprefs.xml b/xwords4/android/app/src/main/res/xml/xwprefs.xml index c4330709d..fe597a62b 100644 --- a/xwords4/android/app/src/main/res/xml/xwprefs.xml +++ b/xwords4/android/app/src/main/res/xml/xwprefs.xml @@ -374,13 +374,6 @@ android:defaultValue="false" /> - - - + + + - - - - - Block phonies - - - @string/phonies_ignore - @string/phonies_warn - @string/phonies_disallow - @string/phonies_block - - -