From 8d1b2a17d9935819ec96f1b5fca0e9945f564eaa Mon Sep 17 00:00:00 2001 From: Hung-ying Tyan Date: Wed, 3 Nov 2010 11:50:05 +0800 Subject: Throw proper exceptions in SipManager instead of silently returning null and causing NPE in applications as returning null is not documented in the javadoc. Add connection to the connection list in SipCall after dial() succeeds so that we don't need to clean up if it fails. The original code will cause the failed connection to continue to live in the SipCall and in next dial() attempt, a new connection is created and the in-call screen sees two connections in the call and thus shows conference call UI. Bug: 3157234, 3157387 Change-Id: Iabc3235f781c4f1e09384a67ad56b09ad2c12e5e --- telephony/java/com/android/internal/telephony/sip/SipPhone.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'telephony') diff --git a/telephony/java/com/android/internal/telephony/sip/SipPhone.java b/telephony/java/com/android/internal/telephony/sip/SipPhone.java index b154c91..818605a 100755 --- a/telephony/java/com/android/internal/telephony/sip/SipPhone.java +++ b/telephony/java/com/android/internal/telephony/sip/SipPhone.java @@ -390,12 +390,11 @@ public class SipPhone extends SipPhoneBase { new SipProfile.Builder(calleeSipUri).build(); SipConnection c = new SipConnection(this, callee, originalNumber); - connections.add(c); c.dial(); + connections.add(c); setState(Call.State.DIALING); return c; } catch (ParseException e) { - // TODO: notify someone throw new SipException("dial", e); } } -- cgit v1.1