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

Commit 0ade90bc authored by Edgar Arriaga García's avatar Edgar Arriaga García Committed by Android (Google) Code Review
Browse files

Merge "Expose telecom API for retrieving photo uri"

parents 24883861 3bac1a46
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1422,6 +1422,10 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable,
        }
    }

    public Uri getContactPhotoUri() {
        return mCallerInfo != null ? mCallerInfo.getContactDisplayPhotoUri() : null;
    }

    public String getCallerDisplayName() {
        return mCallerDisplayName;
    }
@@ -1441,6 +1445,12 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable,
        }
    }

    void setContactPhotoUri(Uri contactPhotoUri) {
        if (mCallerInfo != null) {
            mCallerInfo.SetContactDisplayPhotoUri(contactPhotoUri);
        }
    }

    public String getName() {
        return mCallerInfo == null ? null : mCallerInfo.getName();
    }
+1 −0
Original line number Diff line number Diff line
@@ -2170,6 +2170,7 @@ public class InCallController extends CallsManagerListenerBase implements

            // removing the contactsDisplayName
            builder.setContactDisplayName(null);
            builder.setContactPhotoUri(null);

            // removing the Call.EXTRA_IS_SUPPRESSED_BY_DO_NOT_DISTURB extra
            if (parcelableCall.getExtras() != null) {
+3 −0
Original line number Diff line number Diff line
@@ -196,6 +196,8 @@ public class ParcelableCallUtils {
        String callerDisplayName = call.getCallerDisplayNamePresentation() ==
                TelecomManager.PRESENTATION_ALLOWED ?  call.getCallerDisplayName() : null;

        Uri contactPhotoUri = call.getContactPhotoUri();

        List<Call> conferenceableCalls = call.getConferenceableCalls();
        List<String> conferenceableCallIds = new ArrayList<String>(conferenceableCalls.size());
        for (Call otherCall : conferenceableCalls) {
@@ -255,6 +257,7 @@ public class ParcelableCallUtils {
                .setCallerNumberVerificationStatus(call.getCallerNumberVerificationStatus())
                .setContactDisplayName(call.getName())
                .setActiveChildCallId(activeChildCallId)
                .setContactPhotoUri(contactPhotoUri)
                .createParcelableCall();
    }