get rid of old standin for missing contact name

Since it's now possible to add a name for an SMS contact added manually,
don't assuming a missing name means it was added manually. Just leave
blank if not provided.
This commit is contained in:
Eric House 2017-06-21 07:59:22 -07:00
parent e3e7add5a9
commit 4e101862a6
2 changed files with 6 additions and 8 deletions

View file

@ -364,14 +364,16 @@ public class SMSInviteDelegate extends InviteDelegate {
this( null, phone ); this( null, phone );
} }
@Override
public String getDev() { return m_phone; } public String getDev() { return m_phone; }
@Override
public boolean equals( InviterItem item ) public boolean equals( InviterItem item )
{ {
boolean result = false; boolean result = false;
if ( null != item && item instanceof PhoneRec ) { if ( null != item && item instanceof PhoneRec ) {
PhoneRec rec = (PhoneRec)item; PhoneRec rec = (PhoneRec)item;
result = m_name.equals(rec.m_name) result = m_name == rec.m_name
&& PhoneNumberUtils.compare( m_phone, rec.m_phone ); && PhoneNumberUtils.compare( m_phone, rec.m_phone );
} }
return result; return result;
@ -380,10 +382,6 @@ public class SMSInviteDelegate extends InviteDelegate {
private PhoneRec( String name, String phone ) private PhoneRec( String name, String phone )
{ {
m_phone = phone; m_phone = phone;
if ( null == name || 0 == name.length() ) {
name = getString( R.string.contact_not_found );
}
m_name = name; m_name = name;
} }
} }

View file

@ -1936,7 +1936,8 @@
<string name="summary_conn_sms_fmt">Game in play with %1$s</string> <string name="summary_conn_sms_fmt">Game in play with %1$s</string>
<!-- --> <!-- -->
<string name="warn_unlimited">Are you certain this number is on an <string name="warn_unlimited">Are you certain this number is on an
account with unlimited texting? Click cancel if you are not.</string> account with unlimited texting? Tap \"Cancel\" if you are
not.</string>
<!-- --> <!-- -->
<string name="remote_undone">Remote device undid a turn.</string> <string name="remote_undone">Remote device undid a turn.</string>
@ -2672,7 +2673,6 @@
<!-- In the permissions rationale explanation, means go ahead and <!-- In the permissions rationale explanation, means go ahead and
have the OS ask for permission --> have the OS ask for permission -->
<string name="button_ask_again">Ask again</string> <string name="button_ask_again">Ask again</string>
<string name="contact_not_found">Not in Contacts</string>
<!-- Displayed as a toast --> <!-- Displayed as a toast -->
<string name="sms_send_failed">SMS send failed</string> <string name="sms_send_failed">SMS send failed</string>
<!-- In the permissions rationale explanation, means don't have the <!-- In the permissions rationale explanation, means don't have the