mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-06 20:45:54 +01:00
wifi: update status on first connect
And remove the hack pretending on lack of permission that support was compiled out.
This commit is contained in:
parent
bf83741393
commit
54d02e0fb2
1 changed files with 3 additions and 2 deletions
|
@ -75,7 +75,7 @@ public class WiDirService extends XWService {
|
|||
private static final String MAC_ADDR_KEY = "p2p_mac_addr";
|
||||
private static final String SERVICE_NAME = "srvc_" + BuildConstants.VARIANT;
|
||||
private static final String SERVICE_REG_TYPE = "_presence._tcp";
|
||||
private static boolean WIFI_DIRECT_ENABLED = true;
|
||||
private static final boolean WIFI_DIRECT_ENABLED = true;
|
||||
private static final int OWNER_PORT = 5432;
|
||||
|
||||
private enum P2PAction { _NONE,
|
||||
|
@ -342,6 +342,7 @@ public class WiDirService extends XWService {
|
|||
public void gotPacket( BiDiSockWrap socket, byte[] bytes )
|
||||
{
|
||||
DbgUtils.logd( TAG, "wrapper got packet!!!" );
|
||||
updateStatusIn( true );
|
||||
processPacket( socket, bytes );
|
||||
}
|
||||
|
||||
|
@ -424,7 +425,7 @@ public class WiDirService extends XWService {
|
|||
succeeded = true;
|
||||
} catch ( SecurityException se ) {
|
||||
DbgUtils.logd( TAG, "disabling wifi; no permissions" );
|
||||
WIFI_DIRECT_ENABLED = false;
|
||||
sEnabled = false;
|
||||
}
|
||||
} else {
|
||||
succeeded = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue