mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-11 08:48:06 +01:00
put up an alert when SMS game opened but SMS is disabled. (Does not
have a button taking you to settings.)
This commit is contained in:
parent
6405294f2f
commit
bc91956e20
3 changed files with 17 additions and 1 deletions
|
@ -1986,4 +1986,8 @@
|
|||
<string name="confirm_sms_unlimited">I have an unlimited texting plan</string>
|
||||
<string name="confirm_sms_willpay">I will happily pay all charges</string>
|
||||
|
||||
<string name="warn_sms_disabled">SMS is currently disabled, so no
|
||||
moves will be sent for this game. (If you want to enable SMS, go
|
||||
to Settings->Network game settings.) </string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -1640,6 +1640,7 @@ public class BoardActivity extends XWActivity
|
|||
}
|
||||
|
||||
if ( null != m_xport ) {
|
||||
warnIfNoTransport();
|
||||
trySendChats();
|
||||
removeNotifications();
|
||||
m_xport.tickle( m_connType );
|
||||
|
@ -1803,6 +1804,17 @@ public class BoardActivity extends XWActivity
|
|||
}
|
||||
}
|
||||
|
||||
private void warnIfNoTransport()
|
||||
{
|
||||
switch( m_connType ) {
|
||||
case COMMS_CONN_SMS:
|
||||
if ( XWApp.SMSSUPPORTED && !XWPrefs.getSMSEnabled( this ) ) {
|
||||
showOKOnlyDialog( R.string.warn_sms_disabled );
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void trySendChats()
|
||||
{
|
||||
if ( null != m_jniThread ) {
|
||||
|
|
|
@ -57,7 +57,7 @@ public class SMSCheckBoxPreference extends CheckBoxPreference {
|
|||
public void setChecked( boolean checked )
|
||||
{
|
||||
if ( !checked || !m_attached ) {
|
||||
super.setChecked( false );
|
||||
super_setChecked( checked );
|
||||
} else {
|
||||
m_activity.showDialog( PrefsActivity.CONFIRM_SMS );
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue