summaryrefslogtreecommitdiffstats
path: root/voip/java/com/android/server/sip
diff options
context:
space:
mode:
authorChung-yih Wang <cywang@google.com>2010-10-18 15:57:24 +0800
committerChung-yih Wang <cywang@google.com>2010-10-18 16:00:47 +0800
commit66cc5355a137e291cc1e3c5d871e1d9cd35ee0ab (patch)
tree9ca1b7891cf1ba48818866e265055dc95b54b8ac /voip/java/com/android/server/sip
parentd1f7f4a68375f879671d300510f23d3ee78a500e (diff)
downloadframeworks_base-66cc5355a137e291cc1e3c5d871e1d9cd35ee0ab.zip
frameworks_base-66cc5355a137e291cc1e3c5d871e1d9cd35ee0ab.tar.gz
frameworks_base-66cc5355a137e291cc1e3c5d871e1d9cd35ee0ab.tar.bz2
Set the thread pool size of NIST sip stack to one.
Set the thread pool size to one to fix the out-of-order packets seen in sip service when the device is waken up from sleep. bug:http://b/3099715 Change-Id: Ia169e3fde77488068c369e3345ecf6a6d8ddf792
Diffstat (limited to 'voip/java/com/android/server/sip')
-rw-r--r--voip/java/com/android/server/sip/SipSessionGroup.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/voip/java/com/android/server/sip/SipSessionGroup.java b/voip/java/com/android/server/sip/SipSessionGroup.java
index d861fa5..578bd9b 100644
--- a/voip/java/com/android/server/sip/SipSessionGroup.java
+++ b/voip/java/com/android/server/sip/SipSessionGroup.java
@@ -82,6 +82,11 @@ class SipSessionGroup implements SipListener {
private static final boolean DEBUG = true;
private static final boolean DEBUG_PING = DEBUG && false;
private static final String ANONYMOUS = "anonymous";
+ // Limit the size of thread pool to 1 for the order issue when the phone is
+ // waken up from sleep and there are many packets to be processed in the SIP
+ // stack. Note: The default thread pool size in NIST SIP stack is -1 which is
+ // unlimited.
+ private static final String THREAD_POOL_SIZE = "1";
private static final int EXPIRY_TIME = 3600; // in seconds
private static final int CANCEL_CALL_TIMER = 3; // in seconds
private static final long WAKE_LOCK_HOLDING_TIME = 500; // in milliseconds
@@ -129,6 +134,7 @@ class SipSessionGroup implements SipListener {
SipFactory sipFactory = SipFactory.getInstance();
Properties properties = new Properties();
properties.setProperty("javax.sip.STACK_NAME", getStackName());
+ properties.setProperty("javax.sip.THREAD_POOL_SIZE", THREAD_POOL_SIZE);
String outboundProxy = myself.getProxyAddress();
if (!TextUtils.isEmpty(outboundProxy)) {
Log.v(TAG, "outboundProxy is " + outboundProxy);