From 34c70825b96f2cf48b326beb9d7bb98dd14feda0 Mon Sep 17 00:00:00 2001 From: Eric House Date: Thu, 13 Aug 2015 07:06:12 -0700 Subject: [PATCH] toward figuring out why relay communication stalls: log network availability state changes. --- .../XWords4/src/org/eehouse/android/xw4/NetStateCache.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/NetStateCache.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/NetStateCache.java index 6dd49af74..dea479421 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/NetStateCache.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/NetStateCache.java @@ -140,6 +140,8 @@ public class NetStateCache { NetworkInfo ni = (NetworkInfo)intent. getParcelableExtra(ConnectivityManager.EXTRA_NETWORK_INFO); NetworkInfo.State state = ni.getState(); + DbgUtils.logdf( "NetStateCache.PvtBroadcastReceiver.onReceive(state=%s)", + state.toString() ); boolean netAvail; switch ( state ) { @@ -193,6 +195,10 @@ public class NetStateCache { }; mHandler.postDelayed( mNotifyLater, WAIT_STABLE_MILLIS ); } + } else { + DbgUtils.logdf( "NetStateCache.PvtBroadcastReceiver.onReceive:" + + " no change; doing nothing; s_netAvail=%b", + s_netAvail ); } } }