mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-22 07:28:16 +01:00
enable wifidirect in xw4dbg variant
As it was before.... Also log rather than assert a common widir packet forwarding error.
This commit is contained in:
parent
9a8b323f4d
commit
4a93281a2d
2 changed files with 8 additions and 4 deletions
|
@ -36,7 +36,6 @@ android {
|
|||
|
||||
// FIX ME
|
||||
variant.buildConfigField "String", "STRINGS_HASH", "\"00000\""
|
||||
variant.buildConfigField "boolean", "WIDIR_ENABLED", "false"
|
||||
|
||||
def senderID = System.getenv("GCM_SENDER_ID")
|
||||
variant.buildConfigField "String", "GCM_SENDER_ID", "\"$senderID\""
|
||||
|
@ -53,6 +52,7 @@ android {
|
|||
resValue "string", "app_name", "CrossWords"
|
||||
resValue "string", "nbs_port", "3344"
|
||||
resValue "string", "invite_prefix", "/and/"
|
||||
buildConfigField "boolean", "WIDIR_ENABLED", "false"
|
||||
}
|
||||
xw4dbg {
|
||||
dimension "variant"
|
||||
|
@ -61,6 +61,7 @@ android {
|
|||
resValue "string", "app_name", "CrossDbg"
|
||||
resValue "string", "nbs_port", "3345"
|
||||
resValue "string", "invite_prefix", "/anddbg/"
|
||||
buildConfigField "boolean", "WIDIR_ENABLED", "true"
|
||||
}
|
||||
|
||||
// WARNING: "all" breaks things. Seems to be a keyword. Need
|
||||
|
|
|
@ -922,9 +922,12 @@ public class WiDirService extends XWService {
|
|||
boolean forwarded = false;
|
||||
String destAddr = packet.getString( KEY_DEST );
|
||||
if ( null != destAddr && 0 < destAddr.length() ) {
|
||||
Assert.assertFalse( destAddr.equals( sMacAddress ) );
|
||||
forwarded = destAddr.equals( sMacAddress );
|
||||
if ( forwarded ) {
|
||||
forwardPacket( bytes, destAddr );
|
||||
forwarded = true;
|
||||
} else {
|
||||
DbgUtils.logd( TAG, "addr mismatch: %s vs %s", destAddr, sMacAddress );
|
||||
}
|
||||
}
|
||||
return forwarded;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue