wifi: add reset() that will help troubleshoot

This commit is contained in:
Eric House 2016-12-15 06:44:40 -08:00
parent 721ee381a5
commit 502888ee03
2 changed files with 14 additions and 2 deletions

View file

@ -201,12 +201,19 @@ public class BoardDelegate extends DelegateBase
ab.setNegativeButton( R.string.button_rematch, lstnr );
} else if ( DlgID.DLG_CONNSTAT == dlgID
&& BuildConfig.DEBUG && null != m_connTypes
&& m_connTypes.contains( CommsConnType.COMMS_CONN_RELAY ) ) {
&& (m_connTypes.contains( CommsConnType.COMMS_CONN_RELAY )
|| m_connTypes.contains( CommsConnType.COMMS_CONN_P2P )) ) {
lstnr = new OnClickListener() {
public void onClick( DialogInterface dlg,
int whichButton ) {
NetStateCache.reset( m_activity );
RelayService.reset( m_activity );
if ( m_connTypes.contains( CommsConnType.COMMS_CONN_RELAY ) ) {
RelayService.reset( m_activity );
}
if ( m_connTypes.contains( CommsConnType.COMMS_CONN_P2P ) ) {
WiDirService.reset( m_activity );
}
}
};
ab.setNegativeButton( R.string.button_reconnect, lstnr );

View file

@ -198,6 +198,11 @@ public class WiDirService extends XWService {
}
}
public static void reset( Context context )
{
// Put experimental stuff here that might help get a connection
}
public static boolean supported()
{
return WIFI_DIRECT_ENABLED;