This commit is contained in:
Eric House 2016-02-02 07:04:29 -08:00
parent 19713a40ad
commit d3e521ca6e
3 changed files with 6 additions and 5 deletions

View file

@ -220,10 +220,10 @@
<receiver android:name="BTReceiver"> <receiver android:name="BTReceiver">
<intent-filter> <intent-filter>
<action android:name="android.bluetooth.adapter.action.STATE_CHANGED" /> <action android:name="android.bluetooth.device.action.ACL_CONNECTED" />
</intent-filter> </intent-filter>
<intent-filter> <intent-filter>
<action android:name="android.bluetooth.device.action.ACL_CONNECTED" /> <action android:name="android.bluetooth.adapter.action.STATE_CHANGED" />
</intent-filter> </intent-filter>
</receiver> </receiver>

View file

@ -32,9 +32,10 @@ public class BTReceiver extends BroadcastReceiver {
public void onReceive( Context context, Intent intent ) public void onReceive( Context context, Intent intent )
{ {
if ( XWApp.BTSUPPORTED ) { if ( XWApp.BTSUPPORTED ) {
DbgUtils.logf( "BTReceiver.onReceive()" );
String action = intent.getAction(); String action = intent.getAction();
DbgUtils.logf( "BTReceiver.onReceive(action=%s)", action ); DbgUtils.logdf( "BTReceiver.onReceive(action=%s, intent=%s)",
action, intent.toString() );
if ( action.equals( BluetoothDevice.ACTION_ACL_CONNECTED ) ) { if ( action.equals( BluetoothDevice.ACTION_ACL_CONNECTED ) ) {
BTService.startService( context ); BTService.startService( context );
} else if ( action.equals( BluetoothAdapter.ACTION_STATE_CHANGED ) ) { } else if ( action.equals( BluetoothAdapter.ACTION_STATE_CHANGED ) ) {

View file

@ -92,7 +92,7 @@ public class NetStateCache {
} }
boolean result = s_netAvail || s_onSDKSim; boolean result = s_netAvail || s_onSDKSim;
DbgUtils.logf( "netAvail() => %b", result ); DbgUtils.logdf( "netAvail() => %b", result );
return result; return result;
} }