277 Commits

Author SHA1 Message Date
Chia-chi Yeh
4c7cc83827 Merge "RTP: Prepare to unhide the APIs." 2010-11-30 19:45:47 -08:00
Chia-chi Yeh
53aa6ef70d RTP: Prepare to unhide the APIs.
Polish things a little bit.

Change-Id: I2c3cea8b34b9c858879bc722ea1f38082ba22b8d
2010-12-01 11:35:51 +08:00
Hung-ying Tyan
1c8c173666 am c41b27e2: am 349f3509: Merge "Correct SipService.isOpened() implementation." into gingerbread
* commit 'c41b27e2748ee19620636a14721a1dc14c3b418c':
  Correct SipService.isOpened() implementation.
2010-11-30 16:24:15 -08:00
Hung-ying Tyan
121006789e am 5c85338d: am d9e12303: Merge "Notify SipSessions before closing SIP stack." into gingerbread
* commit '5c85338dcf85462534d85440ded100a8012ff9dd':
  Notify SipSessions before closing SIP stack.
2010-11-30 16:24:05 -08:00
Hung-ying Tyan
ebf28fa3f0 am 0e58a952: am 0bba9535: Merge "Throw proper exceptions in SipManager" into gingerbread
* commit '0e58a9529895e270dae90e69486a59e41de714b8':
  Throw proper exceptions in SipManager
2010-11-30 16:23:54 -08:00
Chia-chi Yeh
342a9be009 am e843dfa8: am bd399b0b: Merge "RTP: Pause echo suppressor when far-end volume is low." into gingerbread
* commit 'e843dfa8dcd0a7bfa956b75424bb5db834975a64':
  RTP: Pause echo suppressor when far-end volume is low.
2010-11-30 16:23:17 -08:00
Hung-ying Tyan
fa81463e88 Set AudioGroup mode according to audio settings
Set AudioGroup mode according to holding, mute and speaker phone settings.

Bug: 3119690
Change-Id: I02803ae105409b7f8482e6c2ef3e67623bd54e03
2010-11-30 18:55:37 +08:00
Hung-ying Tyan
4189d99b6e Do not suppress error feedback during a SIP call.
Bug: 3124788
Change-Id: Ia0a06f72336d1795515428eba0c9f875c32d13d1
2010-11-30 17:00:45 +08:00
Hung-ying Tyan
349f3509f7 Merge "Correct SipService.isOpened() implementation." into gingerbread 2010-11-30 00:56:57 -08:00
Hung-ying Tyan
d9e12303d2 Merge "Notify SipSessions before closing SIP stack." into gingerbread 2010-11-30 00:54:51 -08:00
Hung-ying Tyan
0bba953541 Merge "Throw proper exceptions in SipManager" into gingerbread 2010-11-30 00:51:22 -08:00
Chia-chi Yeh
bd399b0bd2 Merge "RTP: Pause echo suppressor when far-end volume is low." into gingerbread 2010-11-29 22:19:57 -08:00
Hung-ying Tyan
8d1b2a17d9 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
2010-11-03 18:09:31 +08:00
Hung-ying Tyan
262cdfca7a Correct SipService.isOpened() implementation.
Make it return true for all existing accounts.
Rename mOpened to mOpenedToReceiveCalls to make it less confusing.

Bug: 3155849
Change-Id: I327f411bf76afd73434ad1fa2ffef3db1e35d778
2010-11-02 15:17:50 +08:00
Scott Main
e5bc8f617b am 9a8df805: am 1112632a: Merge "docs: revise javadocs for sip add a package description, revise class descriptions and edit some method docs" into gingerbread
* commit '9a8df8054b2e38a27d8e8e6b17365979218f0e3f':
  docs: revise javadocs for sip add a package description, revise class descriptions and edit some method docs
2010-10-29 10:26:24 -07:00
Scott Main
02b1d685cc docs: revise javadocs for sip
add a package description, revise class descriptions and edit some method docs

Change-Id: Ice969a99c830349674c65d99e4b7a6f1d2f24a7e
2010-10-28 16:37:43 -07:00
Chia-chi Yeh
0c7d30660c RTP: Pause echo suppressor when far-end volume is low.
Bug: 3136725
Change-Id: Ieeedd2836d3028045aacac963f44285491708cc3
2010-10-27 18:15:26 +08:00
Hung-ying Tyan
5d0c5cf2d6 Notify SipSessions before closing SIP stack.
Bug: 3116480
Change-Id: I748d63382ade250aed27ccb09ea68c76a433fd27
2010-10-25 16:12:26 +08:00
Hung-ying Tyan
2754b4bde8 am d4d3f36f: am 1257d330: Merge "Clean up pending sessions on incoming call in SipService" into gingerbread
Merge commit 'd4d3f36f4c25b41f4253eadd5e67035fe220cad3'

* commit 'd4d3f36f4c25b41f4253eadd5e67035fe220cad3':
  Clean up pending sessions on incoming call in SipService
2010-10-22 06:01:29 -07:00
Hung-ying Tyan
60c45d0269 Clean up pending sessions on incoming call in SipService
Bug: 3122186
Change-Id: I25c9aa19d138f6940a29025d54e7bc2ffb7daa29
2010-10-22 09:01:49 +08:00
Chia-chi Yeh
39df5331c7 am 044fcd64: am 703aae06: Merge "RTP: Fix non-zero DC in EchoSuppressor caused while aggregating samples." into gingerbread
Merge commit '044fcd64fe999dca0f986dfce9cb3b5b1da77f44'

* commit '044fcd64fe999dca0f986dfce9cb3b5b1da77f44':
  RTP: Fix non-zero DC in EchoSuppressor caused while aggregating samples.
2010-10-21 16:08:47 -07:00
Hung-ying Tyan
6d848f759e am bdc15d8b: am 4056ab97: Merge "Add permission requirements to SipAudioCall and SipManager javadoc." into gingerbread
Merge commit 'bdc15d8b43e7763bf72780d0f683b223b8cf6625'

* commit 'bdc15d8b43e7763bf72780d0f683b223b8cf6625':
  Add permission requirements to SipAudioCall and SipManager javadoc.
2010-10-21 13:44:06 -07:00
Chia-chi Yeh
703aae06c0 Merge "RTP: Fix non-zero DC in EchoSuppressor caused while aggregating samples." into gingerbread 2010-10-21 12:53:37 -07:00
Chia-chi Yeh
8a68b52b98 RTP: Fix non-zero DC in EchoSuppressor caused while aggregating samples.
Rewrite using integer arithmetic to get full 32-bit precision instead
of 23-bit in single precision floating-points.

Bug: 3029745
Change-Id: If67dcc403923755f403d08bbafb41ebce26e4e8b
2010-10-22 03:47:02 +08:00
Hung-ying Tyan
164cd438fb am 51028569: am 1180f2a0: Merge "Remove ringtone API from SipAudioCall." into gingerbread
Merge commit '5102856947595cffc1cceb11b9e4c5baf70b2e82'

* commit '5102856947595cffc1cceb11b9e4c5baf70b2e82':
  Remove ringtone API from SipAudioCall.
2010-10-21 10:55:33 -07:00
Chung-yih Wang
16f5d6ee79 am aefcdde4: am 4944fdd7: Periodically scan wifi when wifi is not connected and wifi lock is grabbed in SipService.
Merge commit 'aefcdde4bdf2be74bdf9620359830faeed5419e6'

* commit 'aefcdde4bdf2be74bdf9620359830faeed5419e6':
  Periodically scan wifi when wifi is not connected and wifi lock is
2010-10-21 09:51:01 -07:00
Hung-ying Tyan
9d6d17fcd8 am 35d9e770: am 0a6e717f: Handle dialing a SIP call to self.
Merge commit '35d9e7701eea343d8cdfcd3c990ae74685b299b2'

* commit '35d9e7701eea343d8cdfcd3c990ae74685b299b2':
  Handle dialing a SIP call to self.
2010-10-21 09:50:50 -07:00
Brad Fitzpatrick
385a753dea resolved conflicts for merge of 368fdba4 to master
Change-Id: I42b7b433c86a71a5da5db67109f056a280077c9d
2010-10-21 07:39:10 -07:00
Hung-ying Tyan
e87b644402 Add permission requirements to SipAudioCall and SipManager javadoc.
Bug: 3116259

Change-Id: I00a033794e9d3e1c2d2ccfe4e612cd50003ec2ee
2010-10-21 03:27:20 +08:00
Hung-ying Tyan
9b449e5606 Remove ringtone API from SipAudioCall.
(watch out auto-merge conflict for SipAudioCall).

Bug: 3113033, related CL: https://android-git/g/#change,75185

Change-Id: Ib48d3b990e229e0b341e47e10e76934e1a50d10f
2010-10-20 22:51:22 +08:00
Chung-yih Wang
4944fdd771 Periodically scan wifi when wifi is not connected and wifi lock is
grabbed in SipService.

bug: http://b/3077454
Change-Id: I153974325c29e0f927c8eb7fdbc4725aaf10087d
2010-10-19 14:09:30 -07:00
Hung-ying Tyan
0a6e717fb6 Handle dialing a SIP call to self.
Reply BUSY HERE response so server may redirect the call to the voice mailbox.

http://b/issue?id=3103072
http://b/issue?id=3109479

Change-Id: I81f5dd59ad87298dd9dda87084538ee460eabba8
2010-10-19 14:00:11 -07:00
Joe Onorato
431bb22695 Reduce logging.
Remember, the system and main logs are
    - Shared resources
    - Primarily for recording problems
    - To be used only for large grained events during normal operation

Bug: 3104855
Change-Id: I136fbd101917dcbc8ebc3f96f276426b48bde7b7
2010-10-19 15:08:05 -04:00
Chung-yih Wang
dc58e5211f am cd6fe63f: am b4116c09: Fix the incorrect environment variable name for the thread pool size.
Merge commit 'cd6fe63fdc2e99da11b19a233afd81e2448d0db2'

* commit 'cd6fe63fdc2e99da11b19a233afd81e2448d0db2':
  Fix the incorrect environment variable name for the thread pool size.
2010-10-19 11:18:42 -07:00
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