fix assertion, and up version code since I already uploaded a beta to

google
This commit is contained in:
Eric House 2015-12-27 20:48:41 -08:00
parent b4d919b3a1
commit ec9f233fdd
3 changed files with 11 additions and 6 deletions

View file

@ -22,7 +22,7 @@
to come from a domain that you own or have control over. -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.eehouse.android.xw4dbg"
android:versionCode="91"
android:versionCode="93"
android:versionName="@string/app_version"
>

View file

@ -22,7 +22,7 @@
to come from a domain that you own or have control over. -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.eehouse.android.xw4"
android:versionCode="92"
android:versionCode="93"
android:versionName="@string/app_version"
>

View file

@ -286,6 +286,7 @@ public class BTService extends XWService {
public static void inviteRemote( Context context, String btAddr,
NetLaunchInfo nli )
{
Assert.assertTrue( null != btAddr && 0 < btAddr.length() );
Intent intent = getIntentTo( context, BTAction.INVITE );
String nliData = nli.toString();
intent.putExtra( GAMEDATA_KEY, nliData );
@ -311,16 +312,20 @@ public class BTService extends XWService {
CommsAddrRec targetAddr, int gameID )
{
int nSent = -1;
if ( null != targetAddr ) {
String btAddr = getSafeAddr( targetAddr );
Assert.assertNotNull( targetAddr );
String btAddr = getSafeAddr( targetAddr );
if ( null != btAddr && 0 < btAddr.length() ) {
Intent intent = getIntentTo( context, BTAction.SEND );
intent.putExtra( MSG_KEY, buf );
intent.putExtra( ADDR_KEY, btAddr );
intent.putExtra( GAMEID_KEY, gameID );
context.startService( intent );
nSent = buf.length;
} else {
DbgUtils.logf( "BTService.enqueueFor(): targetAddr is null" );
}
if ( -1 == nSent ) {
DbgUtils.logf( "BTService.enqueueFor(): can't send to %s",
targetAddr.bt_hostName );
}
return nSent;
}