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

Commit 870a87e8 authored by Makoto Onuki's avatar Makoto Onuki
Browse files

Don't show "more networks" for me profile

Bug 5144040

Change-Id: Iad17cb01d37ec24ee74ff6f7784483227f846bac
parent f63c770f
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;