mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-08 05:24:39 +01:00
remove unused constant
This commit is contained in:
parent
4f17c64301
commit
8957b3ff53
4 changed files with 21 additions and 26 deletions
|
@ -32,29 +32,27 @@ public class BTReceiver extends BroadcastReceiver {
|
|||
@Override
|
||||
public void onReceive( Context context, Intent intent )
|
||||
{
|
||||
if ( XWApp.BTSUPPORTED ) {
|
||||
String action = intent.getAction();
|
||||
Log.d( TAG, "BTReceiver.onReceive(action=%s, intent=%s)",
|
||||
action, intent.toString() );
|
||||
String action = intent.getAction();
|
||||
Log.d( TAG, "BTReceiver.onReceive(action=%s, intent=%s)",
|
||||
action, intent.toString() );
|
||||
|
||||
switch (action ) {
|
||||
case BluetoothDevice.ACTION_ACL_CONNECTED:
|
||||
BTService.onACLConnected( context );
|
||||
switch (action ) {
|
||||
case BluetoothDevice.ACTION_ACL_CONNECTED:
|
||||
BTService.onACLConnected( context );
|
||||
break;
|
||||
case BluetoothAdapter.ACTION_STATE_CHANGED:
|
||||
int newState =
|
||||
intent.getIntExtra( BluetoothAdapter.EXTRA_STATE, -1 );
|
||||
switch ( newState ) {
|
||||
case BluetoothAdapter.STATE_OFF:
|
||||
BTService.radioChanged( context, false );
|
||||
break;
|
||||
case BluetoothAdapter.STATE_ON:
|
||||
BTService.radioChanged( context, true );
|
||||
break;
|
||||
case BluetoothAdapter.STATE_TURNING_ON:
|
||||
case BluetoothAdapter.STATE_TURNING_OFF:
|
||||
break;
|
||||
case BluetoothAdapter.ACTION_STATE_CHANGED:
|
||||
int newState =
|
||||
intent.getIntExtra( BluetoothAdapter.EXTRA_STATE, -1 );
|
||||
switch ( newState ) {
|
||||
case BluetoothAdapter.STATE_OFF:
|
||||
BTService.radioChanged( context, false );
|
||||
break;
|
||||
case BluetoothAdapter.STATE_ON:
|
||||
BTService.radioChanged( context, true );
|
||||
break;
|
||||
case BluetoothAdapter.STATE_TURNING_ON:
|
||||
case BluetoothAdapter.STATE_TURNING_OFF:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -346,8 +346,7 @@ public class BTService extends XWJIService {
|
|||
m_btMsgSink = new BTMsgSink();
|
||||
mHandler = new Handler();
|
||||
|
||||
BluetoothAdapter adapter = XWApp.BTSUPPORTED
|
||||
? BluetoothAdapter.getDefaultAdapter() : null;
|
||||
BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
|
||||
if ( null != adapter && adapter.isEnabled() ) {
|
||||
m_adapter = adapter;
|
||||
Log.i( TAG, "onCreate(); bt name = %s; bt addr = %s",
|
||||
|
|
|
@ -674,8 +674,7 @@ public class ConnStatusHandler {
|
|||
&& !getAirplaneModeOn( context );
|
||||
break;
|
||||
case COMMS_CONN_BT:
|
||||
result = XWApp.BTSUPPORTED && BTService.BTEnabled()
|
||||
&& BTService.BTEnabled();
|
||||
result = BTService.BTEnabled();
|
||||
// No: we can be in airplane mode but with BT turned on manually.
|
||||
//!getAirplaneModeOn( context );
|
||||
break;
|
||||
|
|
|
@ -45,7 +45,6 @@ public class XWApp extends Application
|
|||
implements LifecycleObserver, NBSProxy.Callbacks {
|
||||
private static final String TAG = XWApp.class.getSimpleName();
|
||||
|
||||
public static final boolean BTSUPPORTED = true;
|
||||
public static final boolean DEBUG_EXP_TIMERS = false;
|
||||
public static final boolean LOCUTILS_ENABLED = false;
|
||||
public static final boolean CONTEXT_MENUS_ENABLED = true;
|
||||
|
|
Loading…
Reference in a new issue