mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-18 22:26:30 +01:00
refactor: add methods to be called from elsewhere
This commit is contained in:
parent
e52422afcc
commit
4695619c63
1 changed files with 14 additions and 7 deletions
|
@ -399,9 +399,7 @@ public class BTService extends XWService {
|
||||||
DbgUtils.logf( "unexpected msg %d", msg );
|
DbgUtils.logf( "unexpected msg %d", msg );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ConnStatusHandler.
|
updateStatusIn( true );
|
||||||
updateStatusIn( BTService.this, null,
|
|
||||||
CommsConnType.COMMS_CONN_BT, true );
|
|
||||||
}
|
}
|
||||||
} catch ( IOException ioe ) {
|
} catch ( IOException ioe ) {
|
||||||
DbgUtils.logf( "trying again..." );
|
DbgUtils.logf( "trying again..." );
|
||||||
|
@ -645,10 +643,7 @@ public class BTService extends XWService {
|
||||||
if ( !success ) {
|
if ( !success ) {
|
||||||
addToResends( elem );
|
addToResends( elem );
|
||||||
}
|
}
|
||||||
ConnStatusHandler
|
updateStatusOut( success );
|
||||||
.updateStatusOut( BTService.this, null,
|
|
||||||
CommsConnType.COMMS_CONN_BT,
|
|
||||||
success );
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Assert.fail();
|
Assert.fail();
|
||||||
|
@ -1025,6 +1020,18 @@ public class BTService extends XWService {
|
||||||
body, (int)rowid );
|
body, (int)rowid );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void updateStatusOut( boolean success )
|
||||||
|
{
|
||||||
|
ConnStatusHandler
|
||||||
|
.updateStatusOut( this, null, CommsConnType.COMMS_CONN_BT, success );
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateStatusIn( boolean success )
|
||||||
|
{
|
||||||
|
ConnStatusHandler
|
||||||
|
.updateStatusIn( this, null, CommsConnType.COMMS_CONN_BT, success );
|
||||||
|
}
|
||||||
|
|
||||||
private Thread killSocketIn( final BluetoothSocket socket )
|
private Thread killSocketIn( final BluetoothSocket socket )
|
||||||
{
|
{
|
||||||
return killSocketIn( socket, 10 );
|
return killSocketIn( socket, 10 );
|
||||||
|
|
Loading…
Reference in a new issue