Add button to alert warning that SMS isn't on that takes you to

Preferences.
This commit is contained in:
Eric House 2012-10-29 07:20:11 -07:00
parent 2375a6730a
commit e39b776d80
5 changed files with 18 additions and 5 deletions

View file

@ -2141,4 +2141,6 @@
<string name="default_loc">Store wordlists internally</string>
<string name="default_loc_summary">(Not in external/sdcard memory)</string>
<string name="configure">Go to Settings</string>
</resources>

View file

@ -101,6 +101,7 @@ public class BoardActivity extends XWActivity
private static final int VALUES_ACTION = 16;
private static final int BT_PICK_ACTION = 17;
private static final int SMS_PICK_ACTION = 18;
private static final int SMS_CONFIG_ACTION = 19;
private static final String DLG_TITLE = "DLG_TITLE";
private static final String DLG_TITLESTR = "DLG_TITLESTR";
@ -787,7 +788,7 @@ public class BoardActivity extends XWActivity
case R.id.board_menu_file_prefs:
m_firingPrefs = true;
startActivity( new Intent( this, PrefsActivity.class ) );
Utils.launchSettings( this );
break;
case R.id.board_menu_file_about:
@ -836,6 +837,10 @@ public class BoardActivity extends XWActivity
GameUtils.launchSMSInviter( this, m_nMissingPlayers,
SMS_INVITE_RESULT );
break;
case SMS_CONFIG_ACTION:
Utils.launchSettings( this );
break;
case COMMIT_ACTION:
cmd = JNICmd.CMD_COMMIT;
break;
@ -1904,7 +1909,9 @@ public class BoardActivity extends XWActivity
switch( m_connType ) {
case COMMS_CONN_SMS:
if ( XWApp.SMSSUPPORTED && !XWPrefs.getSMSEnabled( this ) ) {
showOKOnlyDialog( R.string.warn_sms_disabled );
showConfirmThen( R.string.warn_sms_disabled,
R.string.configure,
SMS_CONFIG_ACTION );
}
break;
}

View file

@ -587,8 +587,7 @@ public class GamesList extends XWListActivity
break;
case R.id.gamel_menu_prefs:
intent = new Intent( this, PrefsActivity.class );
startActivity( intent );
Utils.launchSettings( this );
break;
case R.id.gamel_menu_about:

View file

@ -166,7 +166,7 @@ public class PrefsActivity extends PreferenceActivity
// Now replace this activity with a new copy
// so the new values get loaded.
startActivity( new Intent( this, PrefsActivity.class ) );
Utils.launchSettings( this );
finish();
}

View file

@ -153,6 +153,11 @@ public class XWActivity extends Activity
m_delegate.showConfirmThen( msg, action );
}
protected void showConfirmThen( int msg, int posButton, int action )
{
m_delegate.showConfirmThen( getString(msg), posButton, action );
}
public void showEmailOrSMSThen( int action )
{
m_delegate.showEmailOrSMSThen( action );