From 9bb6f8c390db0d0d256bfd1c2963aefffb31fa0f Mon Sep 17 00:00:00 2001 From: Eric House Date: Sat, 11 Jan 2020 15:23:06 -0800 Subject: [PATCH] don't show NFC in network stats unless it's been used --- .../org/eehouse/android/xw4/ConnStatusHandler.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/ConnStatusHandler.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/ConnStatusHandler.java index cb39871c3..2e73ae5f2 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/ConnStatusHandler.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/ConnStatusHandler.java @@ -180,6 +180,15 @@ public class ConnStatusHandler { R.string.connstat_net_fmt, connTypes.toString( context, true ))); for ( CommsConnType typ : connTypes.getTypes() ) { + SuccessRecord record = recordFor( context, typ, false ); + + // Don't show e.g. NFC unless it's been used + if ( !typ.isSelectable() ) { + if ( !record.haveFailure() && !record.haveSuccess() ) { + continue; + } + } + sb.append( String.format( "\n\n*** %s ", typ.longName( context ) ) ); String did = addDebugInfo( context, gamePtr, addr, typ ); if ( null != did ) { @@ -188,7 +197,6 @@ public class ConnStatusHandler { sb.append( "***\n" ); // For sends we list failures too. - SuccessRecord record = recordFor( context, typ, false ); tmp = LocUtils.getString( context, record.successNewer? R.string.connstat_succ : R.string.connstat_unsucc );