diff options
-rw-r--r-- | voip/java/com/android/server/sip/SipSessionGroup.java | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/voip/java/com/android/server/sip/SipSessionGroup.java b/voip/java/com/android/server/sip/SipSessionGroup.java index 29f5f5a..30ddfb5 100644 --- a/voip/java/com/android/server/sip/SipSessionGroup.java +++ b/voip/java/com/android/server/sip/SipSessionGroup.java @@ -527,11 +527,14 @@ class SipSessionGroup implements SipListener { } public void answerCall(String sessionDescription, int timeout) { - try { - processCommand(new MakeCallCommand(mPeerProfile, - sessionDescription, timeout)); - } catch (SipException e) { - onError(e); + synchronized (SipSessionGroup.this) { + if (mPeerProfile == null) return; + try { + processCommand(new MakeCallCommand(mPeerProfile, + sessionDescription, timeout)); + } catch (SipException e) { + onError(e); + } } } @@ -540,14 +543,11 @@ class SipSessionGroup implements SipListener { } public void changeCall(String sessionDescription, int timeout) { - doCommandAsync(new MakeCallCommand(mPeerProfile, sessionDescription, - timeout)); - } - - public void changeCallWithTimeout( - String sessionDescription, int timeout) { - doCommandAsync(new MakeCallCommand(mPeerProfile, sessionDescription, - timeout)); + synchronized (SipSessionGroup.this) { + if (mPeerProfile == null) return; + doCommandAsync(new MakeCallCommand(mPeerProfile, + sessionDescription, timeout)); + } } public void register(int duration) { |