mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-13 20:48:02 +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_unlimited">I have an unlimited texting plan</string>
|
||||||
<string name="confirm_sms_willpay">I will happily pay all charges</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>
|
</resources>
|
||||||
|
|
|
@ -1640,6 +1640,7 @@ public class BoardActivity extends XWActivity
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( null != m_xport ) {
|
if ( null != m_xport ) {
|
||||||
|
warnIfNoTransport();
|
||||||
trySendChats();
|
trySendChats();
|
||||||
removeNotifications();
|
removeNotifications();
|
||||||
m_xport.tickle( m_connType );
|
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()
|
private void trySendChats()
|
||||||
{
|
{
|
||||||
if ( null != m_jniThread ) {
|
if ( null != m_jniThread ) {
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class SMSCheckBoxPreference extends CheckBoxPreference {
|
||||||
public void setChecked( boolean checked )
|
public void setChecked( boolean checked )
|
||||||
{
|
{
|
||||||
if ( !checked || !m_attached ) {
|
if ( !checked || !m_attached ) {
|
||||||
super.setChecked( false );
|
super_setChecked( checked );
|
||||||
} else {
|
} else {
|
||||||
m_activity.showDialog( PrefsActivity.CONFIRM_SMS );
|
m_activity.showDialog( PrefsActivity.CONFIRM_SMS );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue