mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-30 10:26:58 +01:00
remove compile-time switch
SMS rocks and I won't be removing it.
This commit is contained in:
parent
5f6cf35d93
commit
52c2973d8f
7 changed files with 6 additions and 8 deletions
|
@ -2433,7 +2433,7 @@ public class BoardDelegate extends DelegateBase
|
|||
private void warnIfNoTransport()
|
||||
{
|
||||
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,
|
||||
Action.ENABLE_SMS_ASK )
|
||||
.setPosButton( R.string.button_enable_sms )
|
||||
|
|
|
@ -528,7 +528,7 @@ public class ConnStatusHandler {
|
|||
boolean result = true;
|
||||
switch( connType ) {
|
||||
case COMMS_CONN_SMS:
|
||||
result = XWApp.SMSSUPPORTED && XWPrefs.getSMSEnabled( context )
|
||||
result = XWPrefs.getSMSEnabled( context )
|
||||
&& !getAirplaneModeOn( context );
|
||||
break;
|
||||
case COMMS_CONN_BT:
|
||||
|
|
|
@ -336,7 +336,7 @@ public class PrefsDelegate extends DelegateBase
|
|||
|
||||
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 );
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ public class SMSCheckBoxPreference extends ConfirmingCheckBoxPreference {
|
|||
protected void onAttachedToActivity()
|
||||
{
|
||||
super.onAttachedToActivity();
|
||||
if ( !XWApp.SMSSUPPORTED || !Utils.deviceSupportsSMS( getContext() ) ) {
|
||||
if ( !Utils.deviceSupportsSMS( getContext() ) ) {
|
||||
setEnabled( false );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -285,7 +285,7 @@ public class SMSService extends XWService {
|
|||
@Override
|
||||
public void onCreate()
|
||||
{
|
||||
if ( XWApp.SMSSUPPORTED && Utils.deviceSupportsSMS( this ) ) {
|
||||
if ( Utils.deviceSupportsSMS( this ) ) {
|
||||
registerReceivers();
|
||||
} else {
|
||||
stopSelf();
|
||||
|
@ -317,7 +317,7 @@ public class SMSService extends XWService {
|
|||
public int onStartCommand( Intent intent, int flags, int startId )
|
||||
{
|
||||
int result = Service.START_NOT_STICKY;
|
||||
if ( XWApp.SMSSUPPORTED && null != intent ) {
|
||||
if ( null != intent ) {
|
||||
int ordinal = intent.getIntExtra( CMD_STR, -1 );
|
||||
if ( -1 == ordinal ) {
|
||||
// ???
|
||||
|
|
|
@ -36,7 +36,6 @@ public class XWApp extends Application {
|
|||
private static final String TAG = XWApp.class.getSimpleName();
|
||||
|
||||
public static final boolean BTSUPPORTED = true;
|
||||
public static final boolean SMSSUPPORTED = true;
|
||||
public static final boolean GCMSUPPORTED = true;
|
||||
public static final boolean RELAYINVITE_SUPPORTED = false;
|
||||
public static final boolean ATTACH_SUPPORTED = false;
|
||||
|
|
|
@ -301,7 +301,6 @@ public class UtilCtxtImpl implements UtilCtxt {
|
|||
|
||||
public boolean phoneNumbersSame( String num1, String num2 )
|
||||
{
|
||||
Assert.assertTrue( XWApp.SMSSUPPORTED );
|
||||
boolean same = PhoneNumberUtils.compare( m_context, num1, num2 );
|
||||
return same;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue