Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
Merge "Cherry-picking I25bf497e for MR1" into ics-mr1
Browse files Browse the repository at this point in the history
  • Loading branch information
Makoto Onuki authored and Android (Google) Code Review committed Jan 18, 2012
2 parents 60919fb + 574ad60 commit 80dec84
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/com/android/contacts/detail/ContactDetailFragment.java
Expand Up @@ -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);
}
}
Expand Down
9 changes: 6 additions & 3 deletions src/com/android/contacts/editor/GroupMembershipView.java
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit 80dec84

Please sign in to comment.