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

Commit 538e58fc authored by Hung-ying Tyan's avatar Hung-ying Tyan
Browse files

Return display name in SipConnection.getCnapName().

Bug: 3105116 (case #1)

Change-Id: Iedf3c8de07213c786cffb861bd52c3b4a768a86c
parent dd7341f7
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import android.os.AsyncResult;
import android.os.Message;
import android.telephony.PhoneNumberUtils;
import android.telephony.ServiceState;
import android.text.TextUtils;
import android.util.Log;

import com.android.internal.telephony.Call;
@@ -673,6 +674,18 @@ public class SipPhone extends SipPhoneBase {
            this(owner, callee, getUriString(callee));
        }

        @Override
        public String getCnapName() {
            String displayName = mPeer.getDisplayName();
            return TextUtils.isEmpty(displayName) ? null
                                                  : displayName;
        }

        @Override
        public int getNumberPresentation() {
            return Connection.PRESENTATION_ALLOWED;
        }

        void initIncomingCall(SipAudioCall sipAudioCall, Call.State newState) {
            setState(newState);
            mSipAudioCall = sipAudioCall;