Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit afcc5673 authored by Makoto Onuki's avatar Makoto Onuki Committed by Android (Google) Code Review
Browse files

Merge "Don't show "more networks" for me profile"

parents efd97b37 870a87e8
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ public class ContactLoader extends Loader<ContactLoader.Result> {
        private final boolean mStarred;
        private final Integer mPresence;
        private final ArrayList<Entity> mEntities;
        private ArrayList<StreamItemEntry> mStreamItems;
        private final ArrayList<StreamItemEntry> mStreamItems;
        private final HashMap<Long, DataStatus> mStatuses;
        private final ArrayList<AccountType> mInvitableAccountTypes;

@@ -127,9 +127,9 @@ public class ContactLoader extends Loader<ContactLoader.Result> {

        private boolean mLoadingPhoto;
        private byte[] mPhotoBinaryData;
        private boolean mSendToVoicemail;
        private String mCustomRingtone;
        private boolean mIsUserProfile;
        private final boolean mSendToVoicemail;
        private final String mCustomRingtone;
        private final boolean mIsUserProfile;

        /**
         * Constructor for case "no contact found". This must only be used for the
@@ -618,7 +618,9 @@ public class ContactLoader extends Loader<ContactLoader.Result> {
                        loadStreamItems(result);
                    }
                    loadPhotoBinaryData(result);
                    if (mLoadInvitableAccountTypes) {

                    // Note ME profile should never have "Add connection"
                    if (mLoadInvitableAccountTypes && !result.isUserProfile()) {
                        loadInvitableAccountTypes(result);
                    }
                }
+3 −0
Original line number Diff line number Diff line
@@ -787,6 +787,9 @@ public class ContactDetailFragment extends Fragment implements FragmentKeyListen
        String attribution = ContactDetailDisplayUtils.getAttribution(mContext, mContactData);
        boolean hasAttribution = !TextUtils.isEmpty(attribution);
        int networksCount = mOtherEntriesMap.keySet().size();

        // Note: invitableCount will always be 0 for me profile.  (ContactLoader won't set
        // invitable types for me profile.)
        int invitableCount = mContactData.getInvitableAccountTypes().size();
        if (!hasAttribution && networksCount == 0 && invitableCount == 0) {
            return;