Loading src/com/android/contacts/editor/CompactKindSectionView.java +6 −4 Original line number Diff line number Diff line Loading @@ -449,12 +449,14 @@ public class CompactKindSectionView extends LinearLayout { // Check whether metadata has been bound for all group views for (int i = 0; i < mEditors.getChildCount(); i++) { final View view = mEditors.getChildAt(i); if (view instanceof GroupMembershipView && !((GroupMembershipView) view).wasGroupMetaDataBound()) { if (view instanceof GroupMembershipView) { final GroupMembershipView groupView = (GroupMembershipView) view; if (!groupView.wasGroupMetaDataBound() || !groupView.accountHasGroups()) { setVisibility(GONE); return; } } } // Check that the user has selected to display all fields if (mHideIfEmpty) { setVisibility(GONE); Loading src/com/android/contacts/editor/GroupMembershipView.java +11 −3 Original line number Diff line number Diff line Loading @@ -134,6 +134,7 @@ public class GroupMembershipView extends LinearLayout private RawContactDelta mState; private Cursor mGroupMetaData; private boolean mAccountHasGroups; private String mAccountName; private String mAccountType; private String mDataSet; Loading Loading @@ -207,6 +208,14 @@ public class GroupMembershipView extends LinearLayout return mGroupMetaData != null; } /** * Return true if the account has groups to edit group membership for contacts * belong to the account. */ public boolean accountHasGroups() { return mAccountHasGroups; } public void setState(RawContactDelta state) { mState = state; mAccountType = mState.getAccountType(); Loading @@ -224,7 +233,6 @@ public class GroupMembershipView extends LinearLayout return; } boolean accountHasGroups = false; mFavoritesGroupId = 0; mDefaultGroupId = 0; Loading @@ -244,7 +252,7 @@ public class GroupMembershipView extends LinearLayout && mGroupMetaData.getInt(GroupMetaDataLoader.AUTO_ADD) != 0) { mDefaultGroupId = groupId; } else { accountHasGroups = true; mAccountHasGroups = true; } // Exclude favorites from the list - they are handled with special UI (star) Loading @@ -262,7 +270,7 @@ public class GroupMembershipView extends LinearLayout } } if (!accountHasGroups) { if (!mAccountHasGroups) { setVisibility(GONE); return; } Loading Loading
src/com/android/contacts/editor/CompactKindSectionView.java +6 −4 Original line number Diff line number Diff line Loading @@ -449,12 +449,14 @@ public class CompactKindSectionView extends LinearLayout { // Check whether metadata has been bound for all group views for (int i = 0; i < mEditors.getChildCount(); i++) { final View view = mEditors.getChildAt(i); if (view instanceof GroupMembershipView && !((GroupMembershipView) view).wasGroupMetaDataBound()) { if (view instanceof GroupMembershipView) { final GroupMembershipView groupView = (GroupMembershipView) view; if (!groupView.wasGroupMetaDataBound() || !groupView.accountHasGroups()) { setVisibility(GONE); return; } } } // Check that the user has selected to display all fields if (mHideIfEmpty) { setVisibility(GONE); Loading
src/com/android/contacts/editor/GroupMembershipView.java +11 −3 Original line number Diff line number Diff line Loading @@ -134,6 +134,7 @@ public class GroupMembershipView extends LinearLayout private RawContactDelta mState; private Cursor mGroupMetaData; private boolean mAccountHasGroups; private String mAccountName; private String mAccountType; private String mDataSet; Loading Loading @@ -207,6 +208,14 @@ public class GroupMembershipView extends LinearLayout return mGroupMetaData != null; } /** * Return true if the account has groups to edit group membership for contacts * belong to the account. */ public boolean accountHasGroups() { return mAccountHasGroups; } public void setState(RawContactDelta state) { mState = state; mAccountType = mState.getAccountType(); Loading @@ -224,7 +233,6 @@ public class GroupMembershipView extends LinearLayout return; } boolean accountHasGroups = false; mFavoritesGroupId = 0; mDefaultGroupId = 0; Loading @@ -244,7 +252,7 @@ public class GroupMembershipView extends LinearLayout && mGroupMetaData.getInt(GroupMetaDataLoader.AUTO_ADD) != 0) { mDefaultGroupId = groupId; } else { accountHasGroups = true; mAccountHasGroups = true; } // Exclude favorites from the list - they are handled with special UI (star) Loading @@ -262,7 +270,7 @@ public class GroupMembershipView extends LinearLayout } } if (!accountHasGroups) { if (!mAccountHasGroups) { setVisibility(GONE); return; } Loading