From aade0a9aaeb681f3a4ebe392e2b35dad3e6d1004 Mon Sep 17 00:00:00 2001 From: Eric House Date: Wed, 1 Oct 2014 08:08:45 -0700 Subject: [PATCH] cleanup --- .../org/eehouse/android/xw4/BTService.java | 6 ++--- .../eehouse/android/xw4/DictsDelegate.java | 4 +--- .../eehouse/android/xw4/NetLaunchInfo.java | 3 --- .../eehouse/android/xw4/NewGameDelegate.java | 23 ------------------- 4 files changed, 4 insertions(+), 32 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/BTService.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/BTService.java index 715700f96..6d4a1046f 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/BTService.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/BTService.java @@ -347,7 +347,7 @@ public class BTService extends XWService { nPlayersT = intent.getIntExtra( NTO_STR, -1 ); String btName = intent.getStringExtra( BT_NAME_STR ); btAddr = intent.getStringExtra( BT_ADDRESS_STR ); - /*(void)*/makeOrInvite( this, gameID, null, lang, dict, + /*(void)*/makeOrNotify( this, gameID, null, lang, dict, nPlayersT, 1, btName, btAddr ); break; @@ -505,7 +505,7 @@ public class BTService extends XWService { BluetoothDevice host = socket.getRemoteDevice(); addAddr( host ); - result = makeOrInvite( context, gameID, gameName, lang, dict, + result = makeOrNotify( context, gameID, gameName, lang, dict, nPlayersT, nPlayersH, host.getName(), host.getAddress() ); @@ -1003,7 +1003,7 @@ public class BTService extends XWService { m_sender = null; } - private BTCmd makeOrInvite( Context context, int gameID, String gameName, + private BTCmd makeOrNotify( Context context, int gameID, String gameName, int lang, String dict, int nPlayersT, int nPlayersH, String btName, String btAddr ) { diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictsDelegate.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictsDelegate.java index 9fc32f348..da384f1e2 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictsDelegate.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictsDelegate.java @@ -1228,9 +1228,7 @@ public class DictsDelegate extends ListDelegateBase } } - if ( null != m_filterLang ) { - closedLangs.remove( m_filterLang ); - } + closedLangs.remove( m_filterLang ); m_closedLangs.addAll( closedLangs ); success = true; diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/NetLaunchInfo.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/NetLaunchInfo.java index 043808613..e177ce441 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/NetLaunchInfo.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/NetLaunchInfo.java @@ -102,9 +102,6 @@ public class NetLaunchInfo extends AbsLaunchInfo { init( intent ); room = intent.getStringExtra( MultiService.ROOM ); inviteID = intent.getStringExtra( MultiService.INVITEID ); - // lang = intent.getIntExtra( LANG, -1 ); - // dict = intent.getStringExtra( DICT ); - // nPlayersT = intent.getIntExtra( NPLAYERST, -1 ); boolean valid = null != room && -1 != lang && -1 != nPlayersT; diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/NewGameDelegate.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/NewGameDelegate.java index 04d1bc386..2b1eb8d0d 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/NewGameDelegate.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/NewGameDelegate.java @@ -282,29 +282,6 @@ public class NewGameDelegate extends DelegateBase { } }); break; - // case NEWGAME_FAILURE: - // post( new Runnable() { - // public void run() { - // // stopProgress(); - // DbgUtils.showf( m_activity, - // "Remote failed to create game" ); - // } - // } ); - // break; - // case NEWGAME_SUCCESS: - // final int gameID = (Integer)args[0]; - // post( new Runnable() { - // public void run() { - // long rowid = - // GameUtils.makeNewBTGame( m_activity, m_groupID, - // gameID, null, m_lang, - // m_dict, 2, 1 ); - // DBUtils.setName( m_activity, rowid, m_gameName ); - // GameUtils.launchGame( m_activity, rowid, true ); - // finish(); - // } - // } ); - // break; default: super.eventOccurred( event, args ); break;