am e894ff7a: am b595e094: Merge "Return display name in SipConnection.getCnapName()." into gingerbread

Merge commit 'e894ff7a7693fdc406b4f4b28cfd1d9d7d966b38'

* commit 'e894ff7a7693fdc406b4f4b28cfd1d9d7d966b38':
  Return display name in SipConnection.getCnapName().
This commit is contained in:
Hung-ying Tyan
2010-10-21 10:53:49 -07:00
committed by Android Git Automerger

View File

@@ -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;
@@ -676,6 +677,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;