Skip to content
Browse files

Merge "Cherry-picking I25bf497e for MR1" into ics-mr1

  • Loading branch information...
2 parents 60919fb + 574ad60 commit 80dec847e1950cb78899877f66a6d56c1a8b9672 Makoto Onuki committed with Android (Google) Code Review Jan 18, 2012
View
2 src/com/android/contacts/detail/ContactDetailFragment.java
@@ -951,7 +951,7 @@ private void handleGroupMembership(
if (group.getGroupId() == groupId) {
if (!group.isDefaultGroup() && !group.isFavorites()) {
String title = group.getTitle();
- if (!groups.contains(title)) {
+ if (!TextUtils.isEmpty(title) && !groups.contains(title)) {
groups.add(title);
}
}
View
9 src/com/android/contacts/editor/GroupMembershipView.java
@@ -32,6 +32,7 @@
import android.database.Cursor;
import android.provider.ContactsContract.CommonDataKinds.GroupMembership;
import android.provider.ContactsContract.RawContacts;
+import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.View;
import android.view.View.OnClickListener;
@@ -182,10 +183,12 @@ private void updateView() {
if (groupId != mFavoritesGroupId && groupId != mDefaultGroupId
&& hasMembership(groupId)) {
String title = mGroupMetaData.getString(GroupMetaDataLoader.TITLE);
- if (sb.length() != 0) {
- sb.append(", ");
+ if (!TextUtils.isEmpty(title)) {
+ if (sb.length() != 0) {
+ sb.append(", ");
+ }
+ sb.append(title);
}
- sb.append(title);
}
}
}

0 comments on commit 80dec84

Please sign in to comment.
Something went wrong with that request. Please try again.