mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-26 07:58:52 +01:00
add warning about unlimited SMS plans that's triggered whenever a new
number is added to the list of possible invitees.
This commit is contained in:
parent
010fae495b
commit
6930da9686
2 changed files with 16 additions and 6 deletions
|
@ -1924,4 +1924,6 @@
|
|||
<string name="connect_label_sms">Connection (via SMS/text)</string>
|
||||
<string name="phone_label">Connected number[s]:</string>
|
||||
<string name="summary_conn_sms">Game in play with %s</string>
|
||||
<string name="warn_unlimited">Are you certain this number is on an
|
||||
account with unlimited texting? Click cancel if you are not.</string>
|
||||
</resources>
|
||||
|
|
|
@ -57,6 +57,7 @@ public class SMSInviteActivity extends InviteActivity {
|
|||
|
||||
private static final int CLEAR_ACTION = 1;
|
||||
private static final int USE_IMMOBILE_ACTION = 2;
|
||||
private static final int POST_WARNING_ACTION = 3;
|
||||
|
||||
private ArrayList<PhoneRec> m_phoneRecs;
|
||||
private SMSPhonesAdapter m_adapter;
|
||||
|
@ -131,8 +132,11 @@ public class SMSInviteActivity extends InviteActivity {
|
|||
public void onClick( DialogInterface dlg, int item ) {
|
||||
String number = namerView.getName();
|
||||
PhoneRec rec = new PhoneRec( number );
|
||||
addChecked( rec );
|
||||
saveAndRebuild();
|
||||
m_pendingNumber = number;
|
||||
m_pendingName = null;
|
||||
showConfirmThen( R.string.warn_unlimited,
|
||||
R.string.button_yes,
|
||||
POST_WARNING_ACTION );
|
||||
}
|
||||
};
|
||||
dialog = new AlertDialog.Builder( this )
|
||||
|
@ -193,6 +197,10 @@ public class SMSInviteActivity extends InviteActivity {
|
|||
clearSelectedImpl();
|
||||
break;
|
||||
case USE_IMMOBILE_ACTION:
|
||||
showConfirmThen( R.string.warn_unlimited, R.string.button_yes,
|
||||
POST_WARNING_ACTION );
|
||||
break;
|
||||
case POST_WARNING_ACTION:
|
||||
addChecked( new PhoneRec( m_pendingName, m_pendingNumber ) );
|
||||
saveAndRebuild();
|
||||
break;
|
||||
|
@ -229,12 +237,12 @@ public class SMSInviteActivity extends InviteActivity {
|
|||
cursor.getString( cursor.getColumnIndex( Phone.NUMBER ) );
|
||||
|
||||
int type = cursor.getInt( cursor.getColumnIndex( Phone.TYPE ) );
|
||||
m_pendingName = name;
|
||||
m_pendingNumber = number;
|
||||
if ( Phone.TYPE_MOBILE == type ) {
|
||||
addChecked( new PhoneRec( name, number ) );
|
||||
saveAndRebuild();
|
||||
showConfirmThen( R.string.warn_unlimited, R.string.button_yes,
|
||||
POST_WARNING_ACTION );
|
||||
} else {
|
||||
m_pendingName = name;
|
||||
m_pendingNumber = number;
|
||||
String msg = Utils.format( this, R.string.warn_nomobilef,
|
||||
number, name );
|
||||
showConfirmThen( msg, R.string.button_yes, USE_IMMOBILE_ACTION );
|
||||
|
|
Loading…
Add table
Reference in a new issue