156 Commits

Author SHA1 Message Date
John Huang
78c206c750 am 085996c4: am 45bd8303: Merge "Uncomment SIP/VOIP feature check in SipManager." into gingerbread
Merge commit '085996c411b4d3878dfd97c59bfc4a17da08959b'

* commit '085996c411b4d3878dfd97c59bfc4a17da08959b':
  Uncomment SIP/VOIP feature check in SipManager.
2010-10-19 09:54:16 -07:00
John Huang
723e997ef9 am 3e9bcb98: am 382717f3: Merge "Set the thread pool size of NIST sip stack to one." into gingerbread
Merge commit '3e9bcb98c4190b18d113e79ead071a86cd7ca480'

* commit '3e9bcb98c4190b18d113e79ead071a86cd7ca480':
  Set the thread pool size of NIST sip stack to one.
2010-10-19 09:54:02 -07:00
Chung-yih Wang
b4116c09fb Fix the incorrect environment variable name for the thread pool size.
bug: http://b/3099715
Change-Id: I531048414f22c8edcd9c4f815c12a0bdd6347640
2010-10-19 11:31:52 +08:00
John Huang
45bd8303fe Merge "Uncomment SIP/VOIP feature check in SipManager." into gingerbread 2010-10-18 13:41:04 -07:00
Hung-ying Tyan
a0cdfbf5b7 Uncomment SIP/VOIP feature check in SipManager.
http://b/issue?id=2971947

Change-Id: I3afa8eb03c4e347b382213dd388354365f766b2f
2010-10-18 19:48:04 +08:00
Chung-yih Wang
66cc5355a1 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
2010-10-18 16:00:47 +08:00
Hung-ying Tyan
e1baa9c79f am ebad42d6: am 3fbfee2f: Merge "SipService: add wake lock for incoming INVITE packets." into gingerbread
Merge commit 'ebad42d6d35dc0dc07fe89650268453dbdff8a79'

* commit 'ebad42d6d35dc0dc07fe89650268453dbdff8a79':
  SipService: add wake lock for incoming INVITE packets.
2010-10-16 09:01:04 -07:00
Hung-ying Tyan
0601be0803 am 4f5eb955: am bd57eeaf: SipService: add wake lock for multiple components.
Merge commit '4f5eb9550ba2cc037c4aa81613574a38a956dd5c'

* commit '4f5eb9550ba2cc037c4aa81613574a38a956dd5c':
  SipService: add wake lock for multiple components.
2010-10-15 14:01:39 -07:00
Hung-ying Tyan
61312df607 am f3a935f6: am 3bb10442: Merge "Make SipService listen to WIFI state change events." into gingerbread
Merge commit 'f3a935f6aa421110c7b6f36f922223c195f751bc'

* commit 'f3a935f6aa421110c7b6f36f922223c195f751bc':
  Make SipService listen to WIFI state change events.
2010-10-15 14:01:10 -07:00
Hung-ying Tyan
4fe18a4998 am 8a362186: am f1b1eec9: Merge "SipService: mScreenOn is flipped to wrong value." into gingerbread
Merge commit '8a3621866d8a04b0a229eb5765ea9799e68fd90c'

* commit '8a3621866d8a04b0a229eb5765ea9799e68fd90c':
  SipService: mScreenOn is flipped to wrong value.
2010-10-14 21:19:54 -07:00
Hung-ying Tyan
28f63c0689 SipService: add wake lock for incoming INVITE packets.
+ Keep the wake lock for 500ms. (Some measurements on N1 indicate 160~180ms
  needed to bring up InCallScreen but since INVITE doesn't come in frequently
  we can be more generous just to be safe.)
+ Move MyWakeupLock out of SipService so SipSessionGroup can use it without
  awkward inter-dependency with SipService.
  + Add acquire(int timeout) to be used to create the "timed" wake lock.

http://b/issue?id=3081828

Change-Id: Iffd1d78d1a5cae9f795252ada75310917095204d
2010-10-15 09:25:17 +08:00
Hung-ying Tyan
379694f528 am 06e55977: am 907f6f1d: Merge "Fix SipSessionGroup from throwing ConcurrentModificationException" into gingerbread
Merge commit '06e559779edd93a83100824b36c9bf67a27db178'

* commit '06e559779edd93a83100824b36c9bf67a27db178':
  Fix SipSessionGroup from throwing ConcurrentModificationException
2010-10-14 15:29:35 -07:00
Hung-ying Tyan
bd57eeafe0 SipService: add wake lock for multiple components.
+ Add MyWakeLock to maintain a global wake lock for multiple components.
  + Use a Set to store components that want to hold the lock.
  + When the first component enters the set, we grab the global wake lock.
  + When the set becomes empty, we release the global lock.
  + In places like no account being opened to receive calls, we reset the
    wake lock just to be safe from possible leakage.
+ Make MyExecutor aware of the wake lock. It will grab the wake lock on
  behalf of the task so that tasks don't need to worry about the lock.
  + Connectivity receiver is modified to be executed in MyExecutor.
  + WakeupTimer handler is already protected by AlarmManager's wake lock but
    all the timeout handlers that register themselves to the WakeupTimer are
    to be executed in MyExecutor to be protected by the wake lock.
  + Remove unnecessary code in the Keepalive and registration processes. Since
    both processes are executed in MyExecutor submitted by the WakeupTimer (as
    they are timeout handlers registered to the WakeupTimer), they don't need
    to add themselves to MyExecutor explicitly in their run() callbacks.
+ Make the keepalive process wait for at most 3 seconds instead of forever for
  server response. It could cause the wake lock to be held longer than necessary
  and is a potential cause for ANR.

http://b/issue?id=3081828

Related bug:
http://b/issue?id=3087153

Change-Id: Idee0ddb837e67daa0d5092c012bb242bd7c18431
2010-10-14 16:54:47 +08:00
Hung-ying Tyan
8635bb5405 am c74d3917: am ece7e11b: Merge "SipService: fix a missing switch-case break." into gingerbread
Merge commit 'c74d39173e1071dbffe713e008b95784ac4312bc'

* commit 'c74d39173e1071dbffe713e008b95784ac4312bc':
  SipService: fix a missing switch-case break.
2010-10-13 17:01:38 -07:00
Hung-ying Tyan
4f8fd10f76 Make SipService listen to WIFI state change events.
+ Grab a WIFI lock if any account is opened to receive calls and WIFI is enabled
+ Release the WIFI lock if no account is opened to receive calls or WIFI is
  disabled
+ Remove screen on/off event receiver

http://b/issue?id=3077454

Change-Id: Ifdf60a850bcf4106c75ec1e7563b26d8b33d7e92
2010-10-13 17:11:58 +08:00
Hung-ying Tyan
f1b1eec9de Merge "SipService: mScreenOn is flipped to wrong value." into gingerbread 2010-10-12 19:44:17 -07:00
Hung-ying Tyan
d6fc979edb SipService: mScreenOn is flipped to wrong value.
http://b/issue?id=3077454

Change-Id: I23b6f70730074689b939e449c2c202ce8ffb586f
2010-10-13 10:25:07 +08:00
Hung-ying Tyan
ebc886c857 Fix SipSessionGroup from throwing ConcurrentModificationException
http://b/issue?id=3087256

Change-Id: I67df64105db7c1295649f1f3ce77f99025ce3d44
2010-10-12 15:41:11 +08:00
Hung-ying Tyan
685b61b711 SipService: fix a missing switch-case break.
Change-Id: I638eecd8000293d4cb37b3595c02ca33df4924eb
2010-10-12 10:46:29 +08:00
Hung-ying Tyan
82b4003871 am df08c2f0: am 692cac9f: SipHelper: add debug log for challenge responses.
Merge commit 'df08c2f03e7cf7be7002d34efe8e4e8d24e406de'

* commit 'df08c2f03e7cf7be7002d34efe8e4e8d24e406de':
  SipHelper: add debug log for challenge responses.
2010-10-11 18:59:05 -07:00
Chung-yih Wang
ec17ab3354 am 833db408: am dc2e5208: Merge "Do not release the wifi lock if the screen is off." into gingerbread
Merge commit '833db40866ebf27be33aa387d08a2cb0b9a4246d'

* commit '833db40866ebf27be33aa387d08a2cb0b9a4246d':
  Do not release the wifi lock if the screen is off.
2010-10-11 10:03:27 -07:00
Hung-ying Tyan
692cac9fdd SipHelper: add debug log for challenge responses.
Change-Id: If0143a0f076ef30b1b8998e477df933923bfa7b1
2010-10-11 11:26:50 +08:00
Chung-yih Wang
e06be94118 am 77880ae4: am 44b7ef54: Merge "SipService: add permission check for using API" into gingerbread
Merge commit '77880ae4187d92506848249585687fc9d0c0dd25'

* commit '77880ae4187d92506848249585687fc9d0c0dd25':
  SipService: add permission check for using API
2010-10-10 14:21:18 -07:00
Hung-ying Tyan
3d59480dc2 am ea445758: am 08faac3c: Unhide SIP API.
Merge commit 'ea445758efba6b728d5e597402e9d9538f3ef451'

* commit 'ea445758efba6b728d5e597402e9d9538f3ef451':
  Unhide SIP API.
2010-10-10 14:19:29 -07:00
Hung-ying Tyan
c7e4b2d5bb am 841d6ff9: am 62ec9834: Merge "Make SipService broadcast SIP_SERVICE_UP when it\'s up." into gingerbread
Merge commit '841d6ff9e05daccbc60daa1618a27e9db3a4fb32'

* commit '841d6ff9e05daccbc60daa1618a27e9db3a4fb32':
  Make SipService broadcast SIP_SERVICE_UP when it's up.
2010-10-08 18:28:20 -07:00
Hung-ying Tyan
1d8db8a0a8 am 909a974f: am 16c29bd7: Merge "SIP: Fix busy authentication loop." into gingerbread
Merge commit '909a974f8e5df4b6fc2cf8de6c64633406095c6e'

* commit '909a974f8e5df4b6fc2cf8de6c64633406095c6e':
  SIP: Fix busy authentication loop.
2010-10-08 17:58:55 -07:00
Chung-yih Wang
c7fda188ae Do not release the wifi lock if the screen is off.
We need to be able to receive calls if the device is able to
reassociate with any AP later on.

Change-Id: Ib7aafb98386bf250ed9b5ec0a5b519594efa1649
2010-10-09 08:37:40 +08:00
Hung-ying Tyan
aa562ffdb8 SipService: add permission check for using API
Change-Id: Ifd85ba07f1b913011cb3e80e5027c67bfe3db280
2010-10-08 11:57:18 +08:00
Hung-ying Tyan
08faac3c26 Unhide SIP API.
Change-Id: I09468e3149a242a3b1e085ad220eb74f84ac6c68
2010-10-08 08:31:42 +08:00
Hung-ying Tyan
9db99a4dc1 Make SipService broadcast SIP_SERVICE_UP when it's up.
http://b/issue?id=3062010

Change-Id: I13419fa3a8fdfba1977260f703e4dcaa42a6606c
2010-10-07 09:15:25 +08:00
Hung-ying Tyan
f209cd7062 am a785a59c: am 718e0033: Merge "SIP: add SERVER_UNREACHABLE error code." into gingerbread
Merge commit 'a785a59c831256f274627f8f8eb77f9d54508916'

* commit 'a785a59c831256f274627f8f8eb77f9d54508916':
  SIP: add SERVER_UNREACHABLE error code.
2010-10-06 17:08:43 -07:00
Hung-ying Tyan
828c89ba8e am 3cb2d3be: am 1862af57: Merge "SipService: supply PendingIntent when open a profile." into gingerbread
Merge commit '3cb2d3be6cb501c77c7a5765d954363125857cca'

* commit '3cb2d3be6cb501c77c7a5765d954363125857cca':
  SipService: supply PendingIntent when open a profile.
2010-10-06 17:08:34 -07:00
Hung-ying Tyan
ee8a884f35 SIP: Fix busy authentication loop.
Add a retry count and give up after two attempts.
Also stop auto registration when server is unreachable.
And rename onError() to restartLater() for better readability.

http://b/issue?id=3066573

Change-Id: Icfa65c58546a1e2bf8e59e29584a3926c53c479b
2010-10-07 07:04:46 +08:00
Hung-ying Tyan
718e0033e6 Merge "SIP: add SERVER_UNREACHABLE error code." into gingerbread 2010-10-04 23:03:26 -07:00
Hung-ying Tyan
c6548fd9ed SIP: add SERVER_UNREACHABLE error code.
Let SipSession return it when UnknownHostException is caught.
Add DisconnectCause.SERVER_UNREACHABLE in Connection and have SipPhone report
it when receiving SERVER_UNREACHABLE from SipSession.

http://b/issue?id=3061691

Change-Id: I944328ba3ee30c0a9386e89b5c4696d4d9bde000
2010-10-05 13:30:28 +08:00
Hung-ying Tyan
323d3671ac SipService: supply PendingIntent when open a profile.
The SipService used to take an action string and broadcasts an intent with
that action string when an incoming call is received. The design is not safe
(as the intent may be sniffed) and inflexible (can only received by
BroadcastReceiver). Now we use PendingIntent to fix all these.

Companion CL: https://android-git.corp.google.com/g/#change,71800

Change-Id: Id12e5c1cf9321edafb171494932cd936eae10b6e
2010-10-05 10:13:25 +08:00
Hung-ying Tyan
51d2adab83 am 1f34ffd7: am 5cab38ba: Merge "SIP: minor fixes." into gingerbread
Merge commit '1f34ffd7e36de5d1a12d4a3901c3ac4e4e56cb99'

* commit '1f34ffd7e36de5d1a12d4a3901c3ac4e4e56cb99':
  SIP: minor fixes.
2010-10-03 22:49:09 -07:00
Hung-ying Tyan
9ea96c6cad SIP: minor fixes.
+ Log error instead of crashing app process in SipManager's ListenerRelay.
+ Terminate dialog and transaction in SipSessionGroup.reset().
+ Remove redundant reset() in SipSessionGroup.

Change-Id: Ifbf29d2c9607ffe1a1a50b0c131ee3a4e81a0d0e
2010-10-04 08:07:42 +08:00
Hung-ying Tyan
1041bb7eec am 9af6b536: am 063d02bb: Merge "SipService: turn off verbose logging" into gingerbread
Merge commit '9af6b53676061db6fc9c18300dc7d8258f7306ab'

* commit '9af6b53676061db6fc9c18300dc7d8258f7306ab':
  SipService: turn off verbose logging
2010-09-30 19:46:40 -07:00
Hung-ying Tyan
b031957d52 SipService: turn off verbose logging
Change-Id: I264662ba17d215d532f58b6ee793e569fe67c334
2010-10-01 07:09:30 +08:00
Hung-ying Tyan
e0ed9dbcb8 am c79e74ec: am d29e0754: Merge "Add uri field to SipManager.ListenerRelay" into gingerbread
Merge commit 'c79e74ec1d30f95de89568ee645a9b1577ae73b3'

* commit 'c79e74ec1d30f95de89568ee645a9b1577ae73b3':
  Add uri field to SipManager.ListenerRelay
2010-09-30 13:36:37 -07:00
Hung-ying Tyan
f3da1ea405 am 34552149: am 6a53489a: SipService: add UID check.
Merge commit '34552149e4b997d4ed3383fc153faff2bb189066'

* commit '34552149e4b997d4ed3383fc153faff2bb189066':
  SipService: add UID check.
2010-09-30 13:36:16 -07:00
Chia-chi Yeh
a77c9541d0 am cbee6229: am 0a537b78: Merge "RTP: Enable AMR codec." into gingerbread
Merge commit 'cbee622954de5e9e0c07557f8ec9aaa741110043'

* commit 'cbee622954de5e9e0c07557f8ec9aaa741110043':
  RTP: Enable AMR codec.
2010-09-30 12:02:10 -07:00
Hung-ying Tyan
d161479237 am 947d2abd: am 2365b78e: Merge "SIP: misc fixes." into gingerbread
Merge commit '947d2abd82ef68c661fc29fd5167e4c0ba749f71'

* commit '947d2abd82ef68c661fc29fd5167e4c0ba749f71':
  SIP: misc fixes.
2010-09-30 12:02:03 -07:00
Chia-chi Yeh
5a7c6d298e am 1c2eab2d: am 955ab37c: Merge "RTP: Enable GSM-EFR codec." into gingerbread
Merge commit '1c2eab2d86faa9c647a9893f761a50cfa28d9d57'

* commit '1c2eab2d86faa9c647a9893f761a50cfa28d9d57':
  RTP: Enable GSM-EFR codec.
2010-09-30 10:59:48 -07:00
Hung-ying Tyan
9e1d308e99 Add uri field to SipManager.ListenerRelay
in case mSession is not available.

Change-Id: Ifee2c129e48aa1177f648f176413ab6aa5606770
2010-09-30 15:00:34 +08:00
Hung-ying Tyan
6a53489ae5 SipService: add UID check.
Only allow creator or radio user to access profiles.

Change-Id: I548938f117926bcc878419142d1b5d818a4e70df
2010-09-30 12:40:11 +08:00
Chia-chi Yeh
0a537b78d3 Merge "RTP: Enable AMR codec." into gingerbread 2010-09-29 18:32:24 -07:00
Hung-ying Tyan
2365b78e64 Merge "SIP: misc fixes." into gingerbread 2010-09-29 18:12:12 -07:00
Chia-chi Yeh
f88fc1fa90 RTP: Enable AMR codec.
Change-Id: I49e6bdc1b67306b44173f2f346f8372a50264870
2010-09-30 08:55:12 +08:00