mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-09 05:24:44 +01:00
fix assertion, and up version code since I already uploaded a beta to
This commit is contained in:
parent
b4d919b3a1
commit
ec9f233fdd
3 changed files with 11 additions and 6 deletions
|
@ -22,7 +22,7 @@
|
||||||
to come from a domain that you own or have control over. -->
|
to come from a domain that you own or have control over. -->
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.eehouse.android.xw4dbg"
|
package="org.eehouse.android.xw4dbg"
|
||||||
android:versionCode="91"
|
android:versionCode="93"
|
||||||
android:versionName="@string/app_version"
|
android:versionName="@string/app_version"
|
||||||
>
|
>
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
to come from a domain that you own or have control over. -->
|
to come from a domain that you own or have control over. -->
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.eehouse.android.xw4"
|
package="org.eehouse.android.xw4"
|
||||||
android:versionCode="92"
|
android:versionCode="93"
|
||||||
android:versionName="@string/app_version"
|
android:versionName="@string/app_version"
|
||||||
>
|
>
|
||||||
|
|
||||||
|
|
|
@ -286,6 +286,7 @@ public class BTService extends XWService {
|
||||||
public static void inviteRemote( Context context, String btAddr,
|
public static void inviteRemote( Context context, String btAddr,
|
||||||
NetLaunchInfo nli )
|
NetLaunchInfo nli )
|
||||||
{
|
{
|
||||||
|
Assert.assertTrue( null != btAddr && 0 < btAddr.length() );
|
||||||
Intent intent = getIntentTo( context, BTAction.INVITE );
|
Intent intent = getIntentTo( context, BTAction.INVITE );
|
||||||
String nliData = nli.toString();
|
String nliData = nli.toString();
|
||||||
intent.putExtra( GAMEDATA_KEY, nliData );
|
intent.putExtra( GAMEDATA_KEY, nliData );
|
||||||
|
@ -311,16 +312,20 @@ public class BTService extends XWService {
|
||||||
CommsAddrRec targetAddr, int gameID )
|
CommsAddrRec targetAddr, int gameID )
|
||||||
{
|
{
|
||||||
int nSent = -1;
|
int nSent = -1;
|
||||||
if ( null != targetAddr ) {
|
Assert.assertNotNull( targetAddr );
|
||||||
String btAddr = getSafeAddr( targetAddr );
|
String btAddr = getSafeAddr( targetAddr );
|
||||||
|
if ( null != btAddr && 0 < btAddr.length() ) {
|
||||||
Intent intent = getIntentTo( context, BTAction.SEND );
|
Intent intent = getIntentTo( context, BTAction.SEND );
|
||||||
intent.putExtra( MSG_KEY, buf );
|
intent.putExtra( MSG_KEY, buf );
|
||||||
intent.putExtra( ADDR_KEY, btAddr );
|
intent.putExtra( ADDR_KEY, btAddr );
|
||||||
intent.putExtra( GAMEID_KEY, gameID );
|
intent.putExtra( GAMEID_KEY, gameID );
|
||||||
context.startService( intent );
|
context.startService( intent );
|
||||||
nSent = buf.length;
|
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;
|
return nSent;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue