From e3a8bef3cb22904b10f08cff91d603d19bfdd37c Mon Sep 17 00:00:00 2001 From: Eric House Date: Tue, 20 Jun 2017 07:49:01 -0700 Subject: [PATCH] add new param It's not the case that forcing send and showing UI go together. --- .../app/src/main/java/org/eehouse/android/xw4/BTService.java | 2 +- .../app/src/main/java/org/eehouse/android/xw4/GameUtils.java | 3 +-- .../main/java/org/eehouse/android/xw4/GamesListDelegate.java | 2 +- .../src/main/java/org/eehouse/android/xw4/NetStateCache.java | 2 +- .../app/src/main/java/org/eehouse/android/xw4/Perms23.java | 2 +- .../main/java/org/eehouse/android/xw4/SMSResendReceiver.java | 3 ++- .../src/main/java/org/eehouse/android/xw4/WiDirService.java | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BTService.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BTService.java index 41181df39..70df610ca 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BTService.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BTService.java @@ -405,7 +405,7 @@ public class BTService extends XWService { postEvent( evt ); if ( cameOn ) { GameUtils.resendAllIf( this, CommsConnType.COMMS_CONN_BT, - false ); + false, false ); } else { ConnStatusHandler.updateStatus( this, null, CommsConnType.COMMS_CONN_BT, 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 589fde7cf..c84787594 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 @@ -434,9 +434,8 @@ public class GameUtils { } public static void resendAllIf( Context context, CommsConnType filter, - boolean force ) + boolean force, boolean showUI ) { - boolean showUI = force; long now = Utils.getCurSeconds(); if ( !force ) { diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GamesListDelegate.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GamesListDelegate.java index a257f387a..b56954219 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GamesListDelegate.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GamesListDelegate.java @@ -1533,7 +1533,7 @@ public class GamesListDelegate extends ListDelegateBase // There's no selection for these items, so nothing to clear case R.id.games_menu_resend: - GameUtils.resendAllIf( m_activity, null, true ); + GameUtils.resendAllIf( m_activity, null, true, true ); break; case R.id.games_menu_newgame_solo: handleNewGame( true ); diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/NetStateCache.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/NetStateCache.java index c4251475f..77b748fdb 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/NetStateCache.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/NetStateCache.java @@ -252,7 +252,7 @@ public class NetStateCache { if ( s_netAvail ) { CommsConnType typ = CommsConnType .COMMS_CONN_RELAY; - GameUtils.resendAllIf( context, typ, false ); + GameUtils.resendAllIf( context, typ, false, false ); } } }; diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/Perms23.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/Perms23.java index a95aec328..452333cd0 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/Perms23.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/Perms23.java @@ -265,7 +265,7 @@ public class Perms23 { // Perm-by-Perm, but I'm in a hurry. if ( granted && perm == Perm.SEND_SMS ) { GameUtils.resendAllIf( context, CommsConnType.COMMS_CONN_SMS, - true ); + true, true ); } // Log.d( TAG, "calling %s.onPermissionResult(%s, %b)", diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/SMSResendReceiver.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/SMSResendReceiver.java index 752131d80..4260a0d1d 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/SMSResendReceiver.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/SMSResendReceiver.java @@ -47,7 +47,8 @@ public class SMSResendReceiver extends BroadcastReceiver { @Override public void onReceive( Context context, Intent intent ) { - GameUtils.resendAllIf( context, CommsConnType.COMMS_CONN_SMS, true ); + GameUtils.resendAllIf( context, CommsConnType.COMMS_CONN_SMS, true, + BuildConfig.DEBUG ); setTimer( context, true ); } diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/WiDirService.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/WiDirService.java index f8c6c6729..1c173d568 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/WiDirService.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/WiDirService.java @@ -738,7 +738,7 @@ public class WiDirService extends XWService { GameUtils.resendAllIf( XWApp.getContext(), CommsConnType.COMMS_CONN_P2P, - false ); + false, false ); } }