mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-29 08:34:37 +01:00
need to copy in BT address too
This commit is contained in:
parent
e236a32c20
commit
a35527ae88
2 changed files with 18 additions and 4 deletions
|
@ -262,10 +262,19 @@ public class NetLaunchInfo {
|
|||
CommsAddrRec result = new CommsAddrRec();
|
||||
for ( CommsConnType typ : m_addrs.getTypes() ) {
|
||||
result.conTypes.add( typ );
|
||||
if ( CommsConnType.COMMS_CONN_RELAY == typ ) {
|
||||
switch( typ ) {
|
||||
case COMMS_CONN_RELAY:
|
||||
String relayName = XWPrefs.getDefaultRelayHost( context );
|
||||
int relayPort = XWPrefs.getDefaultRelayPort( context );
|
||||
result.setRelayParams( relayName, relayPort, room );
|
||||
break;
|
||||
case COMMS_CONN_BT:
|
||||
result.setBTParams( btAddress, btName );
|
||||
break;
|
||||
case COMMS_CONN_SMS:
|
||||
default:
|
||||
Assert.fail();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -137,11 +137,10 @@ public class CommsAddrRec {
|
|||
setRelayParams( host, port );
|
||||
}
|
||||
|
||||
public CommsAddrRec( String btHost, String btAddr )
|
||||
public CommsAddrRec( String btName, String btAddr )
|
||||
{
|
||||
this( CommsConnType.COMMS_CONN_BT );
|
||||
bt_hostName = btHost;
|
||||
bt_btAddr = btAddr;
|
||||
setBTParams( btAddr, btName );
|
||||
}
|
||||
|
||||
public CommsAddrRec( String phone )
|
||||
|
@ -174,6 +173,12 @@ public class CommsAddrRec {
|
|||
ip_relay_advertiseRoom = false;
|
||||
}
|
||||
|
||||
public void setBTParams( String btAddr, String btName )
|
||||
{
|
||||
bt_hostName = btName;
|
||||
bt_btAddr = btAddr;
|
||||
}
|
||||
|
||||
public void populate( Context context )
|
||||
{
|
||||
for ( CommsConnType typ : conTypes.getTypes() ) {
|
||||
|
|
Loading…
Add table
Reference in a new issue