diff options
author | Hung-ying Tyan <tyanh@google.com> | 2010-10-25 17:04:36 +0800 |
---|---|---|
committer | Hung-ying Tyan <tyanh@google.com> | 2010-12-01 15:02:36 +0800 |
commit | 06e8cdc0f81ead604d5adf9d7b3f982e10226fd2 (patch) | |
tree | f527f2cc6e5ff004666eaddb0ffed3a75738ba6c /voip/java/com | |
parent | d7116ff1f0d1a3c14992273d0b899c3b71ba6d3f (diff) | |
download | frameworks_base-06e8cdc0f81ead604d5adf9d7b3f982e10226fd2.zip frameworks_base-06e8cdc0f81ead604d5adf9d7b3f982e10226fd2.tar.gz frameworks_base-06e8cdc0f81ead604d5adf9d7b3f982e10226fd2.tar.bz2 |
Fix race between ending and answering a SIP call.
+ Also fix race between ending and changing (holding/unholding) a SIP call.
+ Remove an unused method.
Bug : 3128233
Change-Id: Ie18d8333a88f0d9906d54988243d909b58e07e4b
Diffstat (limited to 'voip/java/com')
-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) { |