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:
Eric House 2017-01-20 07:56:03 -08:00
parent 9a8b323f4d
commit 4a93281a2d
2 changed files with 8 additions and 4 deletions

View file

@ -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

View file

@ -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;
}