remove compile-time switch

SMS rocks and I won't be removing it.
This commit is contained in:
Eric House 2016-12-16 07:44:55 -08:00
parent 5f6cf35d93
commit 52c2973d8f
7 changed files with 6 additions and 8 deletions

View file

@ -2433,7 +2433,7 @@ public class BoardDelegate extends DelegateBase
private void warnIfNoTransport() private void warnIfNoTransport()
{ {
if ( m_connTypes.contains( CommsConnType.COMMS_CONN_SMS ) ) { if ( m_connTypes.contains( CommsConnType.COMMS_CONN_SMS ) ) {
if ( XWApp.SMSSUPPORTED && !XWPrefs.getSMSEnabled( m_activity ) ) { if ( !XWPrefs.getSMSEnabled( m_activity ) ) {
makeConfirmThenBuilder( R.string.warn_sms_disabled, makeConfirmThenBuilder( R.string.warn_sms_disabled,
Action.ENABLE_SMS_ASK ) Action.ENABLE_SMS_ASK )
.setPosButton( R.string.button_enable_sms ) .setPosButton( R.string.button_enable_sms )

View file

@ -528,7 +528,7 @@ public class ConnStatusHandler {
boolean result = true; boolean result = true;
switch( connType ) { switch( connType ) {
case COMMS_CONN_SMS: case COMMS_CONN_SMS:
result = XWApp.SMSSUPPORTED && XWPrefs.getSMSEnabled( context ) result = XWPrefs.getSMSEnabled( context )
&& !getAirplaneModeOn( context ); && !getAirplaneModeOn( context );
break; break;
case COMMS_CONN_BT: case COMMS_CONN_BT:

View file

@ -336,7 +336,7 @@ public class PrefsDelegate extends DelegateBase
private void hideStuff() private void hideStuff()
{ {
if ( !XWApp.SMSSUPPORTED || !Utils.isGSMPhone( m_activity ) ) { if ( !Utils.isGSMPhone( m_activity ) ) {
hideOne( R.string.key_enable_sms, R.string.key_network_behavior ); hideOne( R.string.key_enable_sms, R.string.key_network_behavior );
} }

View file

@ -40,7 +40,7 @@ public class SMSCheckBoxPreference extends ConfirmingCheckBoxPreference {
protected void onAttachedToActivity() protected void onAttachedToActivity()
{ {
super.onAttachedToActivity(); super.onAttachedToActivity();
if ( !XWApp.SMSSUPPORTED || !Utils.deviceSupportsSMS( getContext() ) ) { if ( !Utils.deviceSupportsSMS( getContext() ) ) {
setEnabled( false ); setEnabled( false );
} }
} }

View file

@ -285,7 +285,7 @@ public class SMSService extends XWService {
@Override @Override
public void onCreate() public void onCreate()
{ {
if ( XWApp.SMSSUPPORTED && Utils.deviceSupportsSMS( this ) ) { if ( Utils.deviceSupportsSMS( this ) ) {
registerReceivers(); registerReceivers();
} else { } else {
stopSelf(); stopSelf();
@ -317,7 +317,7 @@ public class SMSService extends XWService {
public int onStartCommand( Intent intent, int flags, int startId ) public int onStartCommand( Intent intent, int flags, int startId )
{ {
int result = Service.START_NOT_STICKY; int result = Service.START_NOT_STICKY;
if ( XWApp.SMSSUPPORTED && null != intent ) { if ( null != intent ) {
int ordinal = intent.getIntExtra( CMD_STR, -1 ); int ordinal = intent.getIntExtra( CMD_STR, -1 );
if ( -1 == ordinal ) { if ( -1 == ordinal ) {
// ??? // ???

View file

@ -36,7 +36,6 @@ public class XWApp extends Application {
private static final String TAG = XWApp.class.getSimpleName(); private static final String TAG = XWApp.class.getSimpleName();
public static final boolean BTSUPPORTED = true; public static final boolean BTSUPPORTED = true;
public static final boolean SMSSUPPORTED = true;
public static final boolean GCMSUPPORTED = true; public static final boolean GCMSUPPORTED = true;
public static final boolean RELAYINVITE_SUPPORTED = false; public static final boolean RELAYINVITE_SUPPORTED = false;
public static final boolean ATTACH_SUPPORTED = false; public static final boolean ATTACH_SUPPORTED = false;

View file

@ -301,7 +301,6 @@ public class UtilCtxtImpl implements UtilCtxt {
public boolean phoneNumbersSame( String num1, String num2 ) public boolean phoneNumbersSame( String num1, String num2 )
{ {
Assert.assertTrue( XWApp.SMSSUPPORTED );
boolean same = PhoneNumberUtils.compare( m_context, num1, num2 ); boolean same = PhoneNumberUtils.compare( m_context, num1, num2 );
return same; return same;
} }