This commit is contained in:
Eric House 2019-02-08 13:39:27 -08:00
parent fe721edb97
commit 3023ae1af6
2 changed files with 5 additions and 6 deletions

View file

@ -339,10 +339,10 @@ public class BTService extends XWJIService {
Assert.assertNotNull( targetAddr ); Assert.assertNotNull( targetAddr );
String btAddr = getSafeAddr( targetAddr ); String btAddr = getSafeAddr( targetAddr );
if ( null != btAddr && 0 < btAddr.length() ) { if ( null != btAddr && 0 < btAddr.length() ) {
Intent intent = getIntentTo( context, BTAction.SEND ); Intent intent = getIntentTo( context, BTAction.SEND )
intent.putExtra( MSG_KEY, buf ); .putExtra( MSG_KEY, buf )
intent.putExtra( ADDR_KEY, btAddr ); .putExtra( ADDR_KEY, btAddr )
intent.putExtra( GAMEID_KEY, gameID ); .putExtra( GAMEID_KEY, gameID );
enqueueWork( context, intent ); enqueueWork( context, intent );
nSent = buf.length; nSent = buf.length;
} }

View file

@ -57,8 +57,7 @@ abstract class XWJIService extends JobIntentService {
XWJICmds cmdFrom( Intent intent ) XWJICmds cmdFrom( Intent intent )
{ {
int ord = intent.getIntExtra( CMD_KEY, -1 ); return cmdFrom( intent, getCmds() );
return getCmds()[ord];
} }
long getTimestamp( Intent intent ) long getTimestamp( Intent intent )