mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-29 08:34:37 +01:00
remove dead code
This commit is contained in:
parent
980ba68297
commit
2a861db675
2 changed files with 1 additions and 56 deletions
|
@ -2966,10 +2966,6 @@ public class BoardDelegate extends DelegateBase
|
||||||
GamePtr jniGamePtr, boolean deleteAfter )
|
GamePtr jniGamePtr, boolean deleteAfter )
|
||||||
{
|
{
|
||||||
boolean doIt = true;
|
boolean doIt = true;
|
||||||
String phone = null;
|
|
||||||
String btAddr = null;
|
|
||||||
String p2pMacAddress = null;
|
|
||||||
String mqttDevID = null;
|
|
||||||
if ( DeviceRole.SERVER_STANDALONE == gi.serverRole ) {
|
if ( DeviceRole.SERVER_STANDALONE == gi.serverRole ) {
|
||||||
// nothing to do??
|
// nothing to do??
|
||||||
} else if ( 2 != gi.nPlayers ) {
|
} else if ( 2 != gi.nPlayers ) {
|
||||||
|
@ -2980,37 +2976,13 @@ public class BoardDelegate extends DelegateBase
|
||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
doIt = false;
|
doIt = false;
|
||||||
} else {
|
|
||||||
CommsAddrRec[] addrs = XwJNI.comms_getAddrs( jniGamePtr );
|
|
||||||
for ( CommsAddrRec addr : addrs ) {
|
|
||||||
if ( addr.contains( CommsConnType.COMMS_CONN_BT ) ) {
|
|
||||||
Assert.assertNull( btAddr );
|
|
||||||
btAddr = addr.bt_btAddr;
|
|
||||||
}
|
|
||||||
if ( addr.contains( CommsConnType.COMMS_CONN_SMS ) ) {
|
|
||||||
Assert.assertNull( phone );
|
|
||||||
phone = addr.sms_phone;
|
|
||||||
}
|
|
||||||
if ( addr.contains( CommsConnType.COMMS_CONN_RELAY ) ) {
|
|
||||||
Assert.failDbg();
|
|
||||||
}
|
|
||||||
if ( addr.contains( CommsConnType.COMMS_CONN_P2P ) ) {
|
|
||||||
Assert.assertNull( p2pMacAddress );
|
|
||||||
p2pMacAddress = addr.p2p_addr;
|
|
||||||
}
|
|
||||||
if ( addr.contains( CommsConnType.COMMS_CONN_MQTT ) ) {
|
|
||||||
Assert.assertNull( mqttDevID );
|
|
||||||
mqttDevID = addr.mqtt_devID;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( doIt ) {
|
if ( doIt ) {
|
||||||
String newName = summary.getRematchName( activity );
|
String newName = summary.getRematchName( activity );
|
||||||
Intent intent = GamesListDelegate
|
Intent intent = GamesListDelegate
|
||||||
.makeRematchIntent( activity, rowid, groupID, gi,
|
.makeRematchIntent( activity, rowid, groupID, gi,
|
||||||
summary.conTypes, btAddr, phone,
|
summary.conTypes, newName, deleteAfter );
|
||||||
p2pMacAddress, mqttDevID, newName, deleteAfter );
|
|
||||||
if ( null != intent ) {
|
if ( null != intent ) {
|
||||||
activity.startActivity( intent );
|
activity.startActivity( intent );
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,16 +96,10 @@ public class GamesListDelegate extends ListDelegateBase
|
||||||
private static final String INVITEE_REC_EXTRA = "invitee_rec";
|
private static final String INVITEE_REC_EXTRA = "invitee_rec";
|
||||||
private static final String REMATCH_ROWID_EXTRA = "rm_rowid";
|
private static final String REMATCH_ROWID_EXTRA = "rm_rowid";
|
||||||
private static final String REMATCH_GROUPID_EXTRA = "rm_groupid";
|
private static final String REMATCH_GROUPID_EXTRA = "rm_groupid";
|
||||||
private static final String REMATCH_DICT_EXTRA = "rm_dict";
|
|
||||||
private static final String REMATCH_LANG_EXTRA = "rm_lang";
|
|
||||||
private static final String REMATCH_PREFS_EXTRA = "rm_prefs";
|
|
||||||
private static final String REMATCH_NEWNAME_EXTRA = "rm_nnm";
|
private static final String REMATCH_NEWNAME_EXTRA = "rm_nnm";
|
||||||
private static final String REMATCH_DELAFTER_EXTRA = "del_after";
|
private static final String REMATCH_DELAFTER_EXTRA = "del_after";
|
||||||
private static final String REMATCH_IS_SOLO = "rm_solo";
|
private static final String REMATCH_IS_SOLO = "rm_solo";
|
||||||
private static final String REMATCH_ADDRS_EXTRA = "rm_addrs";
|
private static final String REMATCH_ADDRS_EXTRA = "rm_addrs";
|
||||||
private static final String REMATCH_BTADDR_EXTRA = "rm_btaddr";
|
|
||||||
private static final String REMATCH_PHONE_EXTRA = "rm_phone";
|
|
||||||
private static final String REMATCH_P2PADDR_EXTRA = "rm_p2pma";
|
|
||||||
|
|
||||||
private static final String INVITE_ACTION = "org.eehouse.action_invite";
|
private static final String INVITE_ACTION = "org.eehouse.action_invite";
|
||||||
private static final String INVITE_DATA = "data_invite";
|
private static final String INVITE_DATA = "data_invite";
|
||||||
|
@ -2678,7 +2672,6 @@ public class GamesListDelegate extends ListDelegateBase
|
||||||
CommsConnTypeSet addrs = (CommsConnTypeSet)params[1];
|
CommsConnTypeSet addrs = (CommsConnTypeSet)params[1];
|
||||||
if ( !granted ) {
|
if ( !granted ) {
|
||||||
addrs.remove( CommsConnType.COMMS_CONN_SMS );
|
addrs.remove( CommsConnType.COMMS_CONN_SMS );
|
||||||
m_rematchExtras.remove( REMATCH_PHONE_EXTRA );
|
|
||||||
}
|
}
|
||||||
if ( 0 < addrs.size() ) {
|
if ( 0 < addrs.size() ) {
|
||||||
rematchWithNameAndPerm( (String)params[0], addrs );
|
rematchWithNameAndPerm( (String)params[0], addrs );
|
||||||
|
@ -3232,8 +3225,6 @@ public class GamesListDelegate extends ListDelegateBase
|
||||||
public static Intent makeRematchIntent( Context context, long rowid,
|
public static Intent makeRematchIntent( Context context, long rowid,
|
||||||
long groupID, CurGameInfo gi,
|
long groupID, CurGameInfo gi,
|
||||||
CommsConnTypeSet addrTypes,
|
CommsConnTypeSet addrTypes,
|
||||||
String btAddr, String phone,
|
|
||||||
String p2pMacAddress, String mqttDevID,
|
|
||||||
String newName, boolean deleteAfter )
|
String newName, boolean deleteAfter )
|
||||||
{
|
{
|
||||||
Intent intent = null;
|
Intent intent = null;
|
||||||
|
@ -3241,31 +3232,13 @@ public class GamesListDelegate extends ListDelegateBase
|
||||||
intent = makeSelfIntent( context )
|
intent = makeSelfIntent( context )
|
||||||
.putExtra( REMATCH_ROWID_EXTRA, rowid )
|
.putExtra( REMATCH_ROWID_EXTRA, rowid )
|
||||||
.putExtra( REMATCH_GROUPID_EXTRA, groupID )
|
.putExtra( REMATCH_GROUPID_EXTRA, groupID )
|
||||||
.putExtra( REMATCH_DICT_EXTRA, gi.dictName )
|
|
||||||
.putExtra( REMATCH_IS_SOLO, isSolo )
|
.putExtra( REMATCH_IS_SOLO, isSolo )
|
||||||
.putExtra( REMATCH_LANG_EXTRA, gi.isoCode().toString() )
|
|
||||||
.putExtra( REMATCH_PREFS_EXTRA, gi.getJSONData() )
|
|
||||||
.putExtra( REMATCH_NEWNAME_EXTRA, newName )
|
.putExtra( REMATCH_NEWNAME_EXTRA, newName )
|
||||||
.putExtra( REMATCH_DELAFTER_EXTRA, deleteAfter );
|
.putExtra( REMATCH_DELAFTER_EXTRA, deleteAfter );
|
||||||
|
|
||||||
if ( null != addrTypes ) {
|
if ( null != addrTypes ) {
|
||||||
Assert.assertTrueNR( !addrTypes.contains( CommsConnType.COMMS_CONN_RELAY ) );
|
Assert.assertTrueNR( !addrTypes.contains( CommsConnType.COMMS_CONN_RELAY ) );
|
||||||
intent.putExtra( REMATCH_ADDRS_EXTRA, addrTypes.toInt() );
|
intent.putExtra( REMATCH_ADDRS_EXTRA, addrTypes.toInt() );
|
||||||
if ( null != btAddr ) {
|
|
||||||
Assert.assertTrue( addrTypes.contains( CommsConnType.COMMS_CONN_BT ) );
|
|
||||||
intent.putExtra( REMATCH_BTADDR_EXTRA, btAddr );
|
|
||||||
}
|
|
||||||
if ( null != phone ) {
|
|
||||||
Assert.assertTrue( addrTypes.contains( CommsConnType.COMMS_CONN_SMS ) );
|
|
||||||
intent.putExtra( REMATCH_PHONE_EXTRA, phone );
|
|
||||||
}
|
|
||||||
if ( null != p2pMacAddress ) {
|
|
||||||
Assert.assertTrue( addrTypes.contains( CommsConnType.COMMS_CONN_P2P ) );
|
|
||||||
intent.putExtra( REMATCH_P2PADDR_EXTRA, p2pMacAddress );
|
|
||||||
}
|
|
||||||
if ( null != mqttDevID ) {
|
|
||||||
intent.putExtra( GameSummary.EXTRA_REMATCH_MQTT, mqttDevID );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return intent;
|
return intent;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue