put up dialog when user picks contact that has no mobile number

This commit is contained in:
Eric House 2012-03-22 18:50:32 -07:00
parent 622bf21308
commit fd30b25546
2 changed files with 10 additions and 2 deletions

View file

@ -1896,4 +1896,6 @@
don\'t see a number you want.</string>
<string name="manual_number_hint">Other number</string>
<string name="manual_owner_name">(Entered manually)</string>
<string name="nbs_nomobile">Contact has no mobile number.</string>
<string name="nbs_nomobilef">Contact for %s has no mobile number.</string>
</resources>

View file

@ -140,9 +140,9 @@ public class NBSInviteActivity extends InviteActivity {
null,
CommonDataKinds.Phone.CONTACT_ID + " = ?",
new String[] { id }, null );
String name = "";
while ( pc.moveToNext() ) {
String name =
name =
pc.getString( pc.getColumnIndex( CommonDataKinds.
Phone.DISPLAY_NAME));
String number =
@ -160,6 +160,12 @@ public class NBSInviteActivity extends InviteActivity {
if ( len_before != m_phones.size() ) {
saveState();
rebuildList();
} else {
int resid = null != name && 0 < name.length()
? R.string.nbs_nomobilef
: R.string.nbs_nomobile;
String msg = Utils.format( this, resid, name );
showOKOnlyDialog( msg );
}
}
}