diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BoardDelegate.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BoardDelegate.java index e4a814709..63a28defc 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BoardDelegate.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BoardDelegate.java @@ -1001,6 +1001,7 @@ public class BoardDelegate extends DelegateBase JNICmd cmd = null; switch ( action ) { case ENABLE_MQTT_DO_OR: + XWPrefs.setMQTTEnabled( m_activity, true ); MQTTUtils.setEnabled( m_activity, true ); break; case UNDO_LAST_ACTION: diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DelegateBase.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DelegateBase.java index f5a0a5444..7f12a2847 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DelegateBase.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DelegateBase.java @@ -794,6 +794,7 @@ public abstract class DelegateBase implements DlgClickNotify, BTUtils.enable( m_activity ); break; case ENABLE_MQTT_DO: + XWPrefs.setMQTTEnabled( m_activity, true ); MQTTUtils.setEnabled( m_activity, true ); break; case PERMS_QUERY: 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 90937d190..3e7cc97a8 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 @@ -106,6 +106,11 @@ public class XWPrefs { return enabled; } + public static void setMQTTEnabled( Context context, boolean enabled ) + { + setPrefsBoolean( context, R.string.key_disable_mqtt, !enabled ); + } + public static boolean getBTDisabled( Context context ) { boolean disabled = getPrefsBoolean( context, R.string.key_disable_bt,