From d543b581506011d80c1ccf10f1ca226eab4e50d4 Mon Sep 17 00:00:00 2001 From: Eric House Date: Sat, 20 Jan 2024 15:54:34 -0800 Subject: [PATCH] don't show webui url when game not using mqtt (debug only) --- .../src/main/java/org/eehouse/android/xw4/BoardDelegate.java | 4 ++++ .../app/src/main/java/org/eehouse/android/xw4/GameUtils.java | 2 +- .../app/src/main/java/org/eehouse/android/xw4/NetUtils.java | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) 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 fc9dbd194..ee9af6ee9 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 @@ -1510,6 +1510,10 @@ public class BoardDelegate extends DelegateBase PopupMenu popup = new PopupMenu( m_activity, view ); popup.getMenuInflater().inflate( R.menu.netstat, popup.getMenu() ); + if ( ! m_connTypes.contains(CommsConnType.COMMS_CONN_MQTT) ) { + popup.getMenu().removeItem( R.id.netstat_menu_traffic ); + } + popup.setOnMenuItemClickListener( new PopupMenu .OnMenuItemClickListener() { @Override diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GameUtils.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GameUtils.java index 170784500..dfa247495 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GameUtils.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GameUtils.java @@ -1248,7 +1248,7 @@ public class GameUtils { } catch ( GameLock.GameLockedException gle ) { DbgUtils.toastNoLock( TAG, context, rowid, "feedMessage(): dropping message" - + " for %d", rowid ); + + " for rowid %d", rowid ); } } return draw; diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/NetUtils.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/NetUtils.java index 95f3907ff..1ac2a1dca 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/NetUtils.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/NetUtils.java @@ -81,7 +81,7 @@ public class NetUtils { String host = XWPrefs.getPrefsString( context, R.string.key_mqtt_host ); String myID = XwJNI.dvc_getMQTTDevID(); // Use the route that doesn't require login - String url = String.format( "https://%s/xw4/ui/gameinfo?gameid=%d&devid=%s", + String url = String.format( "https://%s/xw4/ui/gameinfo?gid16=%X&devid=%s", host, gameID, myID ); return url; }