225 Commits

Author SHA1 Message Date
repo sync
c133781723 Fix the issue of onNetwork in UI thread.
bug:458435

This will temporarily start a thread for answering calls, we are
going to add a handler thread to handle this soon.

Change-Id: I9079038d671e1b1631c6e663fc2c3de297d97428
2011-06-13 17:46:41 +08:00
Chung-yih Wang
bb0a989c17 Add KeepAlive Interval Measurement.
Change-Id: Id5ea2fcfa0bcd45198e773a5842d39eacc8ae400
2011-06-09 18:19:07 +08:00
Dima Zavin
34bb419e59 update for new audio.h header location
Change-Id: Ic4c62c4037800802427eb7d3c7f5eb8b25d18876
Signed-off-by: Dima Zavin <dima@android.com>
2011-05-12 14:09:57 -07:00
Andreas Huber
4b3913a3e4 Squashed commit of the following:
commit c80992e419ed567abef451042f09c4958534b90d
Author: Andreas Huber <andih@google.com>
Date:   Wed May 11 14:00:07 2011 -0700

    Support for the mp3 audio decoder as a software OMX component.

    Change-Id: I66e10c4d0be4c3aecdef1c21b15a2c7359ceb807

commit a358d0e1bf2a88897887445f42ccdda0f5f2f528
Author: Andreas Huber <andih@google.com>
Date:   Wed May 11 13:11:23 2011 -0700

    Support for G.711 alaw and mulaw decoders as software OMX components

    Change-Id: Ia5c76c02cb83a9f94ce39a27b2251e5880218f03

commit 79088b9c9a5c8b8c97ea66cb4f90a2b0f0d34553
Author: Andreas Huber <andih@google.com>
Date:   Thu May 5 15:43:32 2011 -0700

    Instead of using an RGB surface and conversion yuv420->rgb565

    convert from OMX_COLOR_FormatYUV420Planar to HAL_PIXEL_FORMAT_YV12 instead.

    Change-Id: I8c4fc3c54c963f0d4ba6377f3c4ab4e0013152e5
    related-to-bug: 4394005

commit 69469d3bd84425777b11b9fc938c5e0c61af26a7
Author: Andreas Huber <andih@google.com>
Date:   Tue May 10 15:46:42 2011 -0700

    voip mustn't link against libstagefright.so

    Change-Id: I4d0ba9a8b9dc9380b792a1bd04bcda231964862c

commit 2a9a9eeeeeb36ae3a9e680469c3016d509ff08c3
Author: Andreas Huber <andih@google.com>
Date:   Tue May 10 14:37:10 2011 -0700

    Remove most non-OMX software decoders by default

    Change-Id: Ic56514bc1b56b8fa952e8c4a164ea7379ecb69d0

commit a4de62c37b335c318217765403a9fb282b20a216
Author: Andreas Huber <andih@google.com>
Date:   Mon May 9 16:50:02 2011 -0700

    Conditionally build the old-style software decoders.

    Change-Id: I5de609e1d76c92d26d6eb81d1551462258f3f15f

commit 5d8b039f9449dc3dad1e77c42c80cc0b54b0c846
Author: Andreas Huber <andih@google.com>
Date:   Mon May 9 16:13:12 2011 -0700

    Support for MPEG4 and H.263 video decoders as soft OMX components.

    Change-Id: I5e3a4835afab89f98e3aa128d013628f5830eafe

commit b25a1bfbeb0ff6e62e1cc694ce2599c91489c7d0
Author: Andreas Huber <andih@google.com>
Date:   Mon May 9 11:49:10 2011 -0700

    Boost Soft OMX thread priority, fix timestamp handling in vorbis Soft OMX decoder.

    Change-Id: I68d26d4999f06fcc451d69e5303663fab0cba9e8

commit c0574362f8dc3319ce84d981097867062a698527
Author: Andreas Huber <andih@google.com>
Date:   Mon May 9 11:28:53 2011 -0700

    Support for the AMR decoders (NB and WB) as Soft OMX components.

    Change-Id: Ia565f59833fb52653e23f26536e7e41fc329a754

commit 3e5575a8f0e27a490cb7bde77bd9456087837f08
Author: Andreas Huber <andih@google.com>
Date:   Wed May 4 13:41:25 2011 -0700

    Signal an error if the aac decoder failed to initialize from codec specific data.

    Change-Id: I01da7831bdf722edd7d6dc5974486daa2cf2b209
    related-to-bug: 4272179

commit f94aeaa9886e772ff4823e671ed237096649f4af
Author: Andreas Huber <andih@google.com>
Date:   Tue May 3 13:07:38 2011 -0700

    Software OMX nodes don't (yet?) support native_window mode.

    Change-Id: I7d9ca9164ef4abf66b573ca21dba12d672f8b12d

commit eefdfabac8dc659e00daa56da69aea705c49cb67
Author: Andreas Huber <andih@google.com>
Date:   Tue May 3 12:57:16 2011 -0700

    Fixing the OMX tests to refer to appropriate files from test content.

    Change-Id: I5b61c3498749bfb876abbd3946a5132356e3f6ff

commit f31b7326aef14b6a1b7946520a9688f092e844d5
Author: Andreas Huber <andih@google.com>
Date:   Tue May 3 11:08:38 2011 -0700

    Soft OMX components are now dynamiclly loaded/unloaded, not directly linked against.

    Change-Id: I1e2ecfbfab67a8869886f738eaf0c7b3c948b6d9

commit b7f0343879e4df06f0a1c9bfece24df557954e2f
Author: Andreas Huber <andih@google.com>
Date:   Mon May 2 15:58:36 2011 -0700

    Support for the AVC software decoder as an OMX component.

    Change-Id: I13c12df435ba4afbd968a9fc659f66b91c818bc2

commit 5bb9e616d6c8e1b13d531fe996b9a9affdfb2977
Author: Andreas Huber <andih@google.com>
Date:   Fri Apr 29 12:05:37 2011 -0700

    Fix Vorbis OMX decoder's component role.

    Change-Id: I5e871e5e11b3f951c93590210e63fd7987c467b5

commit 089c91f2333062e196c7afd5fb0ca914878aa474
Author: Andreas Huber <andih@google.com>
Date:   Fri Apr 29 12:05:18 2011 -0700

    Support vorbis_decoder OMX testing.

    Change-Id: I1985be178a12ae3f8768bc72067d9236238be170

commit 56e241fa36fc37219bc536b823bdc2ab82dc1fad
Author: Andreas Huber <andih@google.com>
Date:   Fri Apr 29 12:01:46 2011 -0700

    SoftVorbis OMX component now respects the number of valid frames per page.

    Change-Id: I82a117a064d9b083fc58a54ad900a987a763ef03

commit fcd618ec520c376fdb78f4cbb44b8d9f5d213e2b
Author: Andreas Huber <andih@google.com>
Date:   Fri Apr 29 10:59:38 2011 -0700

    Support for the vorbis audio decoder as a soft OMX component.

    Change-Id: Iaeb057e58ca306d3dce205c0445b74d5aefef492

commit d1fcc3203fc8003ad79c6e96b3a1fc4261743f16
Author: Andreas Huber <andih@google.com>
Date:   Fri Apr 29 10:07:50 2011 -0700

    VPX decoder now properly resizes buffers after a port settings change.

    Change-Id: I110749a31b6cba087891d8e5dfe420830bdbf831

commit 35c7168243cb69849d88911144a2c7fdfed5c54e
Author: Andreas Huber <andih@google.com>
Date:   Thu Apr 28 13:23:34 2011 -0700

    Support for the VPX video decoder as a Software OMX component.

    Change-Id: Ic345add2d6d768d4af631160153f2e9b97fcea71

commit 923b2534b4211fc5405377b5190bfa6f2dd27f32
Author: Andreas Huber <andih@google.com>
Date:   Thu Apr 28 11:34:40 2011 -0700

    Table-based registration of soft omx components.

    Change-Id: I7f45f0fa5b3a7950776e69c66349731f7674e937

commit 04a88f3edb2266a463da9c4481b80178be460902
Author: Andreas Huber <andih@google.com>
Date:   Thu Apr 28 11:22:31 2011 -0700

    Apparently OMX_GetParameter is valid in any state other than OMX_StateInvalid

    OMX_SetParameter is still constrained to OMX_StateLoaded or a disabled port.

    Change-Id: I1032d7cf4011982d306aa369d4158a82830d26fb

commit 9d70ca68445e7c40f5c9b2d12466e468f514de88
Author: Andreas Huber <andih@google.com>
Date:   Wed Apr 27 15:03:18 2011 -0700

    Use the new soft OMX aac decoder for HTTP live playback.

    Change-Id: Ifbcfb732a9edb855cb46b49f6d0ac942170ee28f

commit 213fe4a10ea93cce08e8622dc3908053f29878a1
Author: Andreas Huber <andih@google.com>
Date:   Tue Apr 12 16:39:45 2011 -0700

    Foundation for supporting software decoders as OMX components

    Change-Id: I7fdab256563b35d1d090617abaea9a26b198d816

Change-Id: I83e9236beed4af985d10333c203f065df9e09a42
2011-05-11 14:24:58 -07:00
Scott Main
b8df57d876 am d81214da: am a7a9c4cb: am 46524f83: Merge "docs: add package description for RTP" into honeycomb-mr1
* commit 'd81214dae45a4b38919296af41bf756e3931675a':
  docs: add package description for RTP
2011-05-05 18:04:28 -07:00
Scott Main
d81214dae4 am a7a9c4cb: am 46524f83: Merge "docs: add package description for RTP" into honeycomb-mr1
* commit 'a7a9c4cbbc2315a59ad27b43c83c66e272dcc2f2':
  docs: add package description for RTP
2011-05-05 18:02:47 -07:00
Scott Main
de9acb76d9 docs: add package description for RTP
Change-Id: I02c181a48101be288fb4aabf497f573f00038f90
2011-05-05 17:32:01 -07:00
Dima Zavin
24fc2fb1c5 audio/media: convert to using the audio HAL and new audio defs
Change-Id: Ibc637918637329e4f2b62f4ac7781102fbc269f5
Signed-off-by: Dima Zavin <dima@android.com>
2011-04-27 13:10:10 -07:00
Eric Laurent
d8cbd16659 am 7a492a9a: am b7a76e84: am a482d83c: Merge "Issue 4157048: mic gain for VoIP/SIP calls." into gingerbread
* commit '7a492a9ad42947a3a7b777b0eb6eec56f5bb942b':
  Issue 4157048: mic gain for VoIP/SIP calls.
2011-04-05 10:27:06 -07:00
Eric Laurent
7a492a9ad4 am b7a76e84: am a482d83c: Merge "Issue 4157048: mic gain for VoIP/SIP calls." into gingerbread
* commit 'b7a76e84fde7fe534d46aaaa71e3224798354009':
  Issue 4157048: mic gain for VoIP/SIP calls.
2011-04-04 17:44:50 -07:00
Eric Laurent
b7a76e84fd am a482d83c: Merge "Issue 4157048: mic gain for VoIP/SIP calls." into gingerbread
* commit 'a482d83ccf35ccd6cc29a9e1ace3d77b5f28d013':
  Issue 4157048: mic gain for VoIP/SIP calls.
2011-04-04 12:25:37 -07:00
Eric Laurent
d7a724e6d8 Issue 4157048: mic gain for VoIP/SIP calls.
Herring board exhibits a strong echo even in non speakerphone modes.
To compensate the lack of AEC or AES when not in speakerphone, the mic gain
had been reduced in the ADC. But this has an adverse effect on other VoIP applications
that have their own AEC and are penalized by the weak mic gain.

This workaround enables an acceptable mic gain for other VoIP apps while offering a
SIP call experience which is not worse than it was with the residual echo that was
present even with mic gain reduction.

Change-Id: I33fd37858758e94e42ef5b545d3f0dc233220bf1
2011-03-29 18:44:03 -07:00
Brad Fitzpatrick
397de169e5 am fae5e289: am 6f67e7bf: am 2e383bc6: Merge "Making it possible to call SIP calls with special allowed chars."
* commit 'fae5e2894ff3c09f27efac2a7ee6b9cfd4ed14b0':
  Making it possible to call SIP calls with special allowed chars.
2011-03-29 08:53:48 -07:00
Brad Fitzpatrick
fae5e2894f am 6f67e7bf: am 2e383bc6: Merge "Making it possible to call SIP calls with special allowed chars."
* commit '6f67e7bf831147257e078dd72a22f2e43e009122':
  Making it possible to call SIP calls with special allowed chars.
2011-03-29 08:45:30 -07:00
Magnus Strandberg
b5c72ead01 Making it possible to call SIP calls with special allowed chars.
Since String.replaceFirst uses regex and since SIP user names are
allowed to include regex charaters such as '+', the code must
fist convert the string to a literal pattern String before using
replaceFirst method.

Change-Id: I25eac852bd620724ca1c5b2befc023af9dae3c1a
2011-03-22 08:03:58 +01:00
Carl Shapiro
3f9e08973f Include strings.h instead of string.h for the strcasecmp prototype.
Change-Id: I6b0ddc2408c30851edcffb36f1bc74245403ffc7
2011-03-21 20:21:40 -07:00
Iliyan Malchev
3070af0882 frameworks/base: remove LOCAL_PRELINK_MODULE
Change-Id: I54dd62ebef47e7690afa5a858f3cad941b135481
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-03-14 14:25:59 -07:00
Chia-chi Yeh
6defd2d47e NEW_API: Unhide RTP APIs.
This change unhides RTP related classes including AudioCodec,
AudioGroup, AudioStream, and RtpStream. This allows developers
to control audio streams directly and also makes conference
calls possible with the combination of the public SIP APIs.

Change-Id: Idfd4edf65a1cbf3245ec2786fbc03b06438b0fb3
2011-03-08 05:59:09 +08:00
Chia-chi Yeh
c52f5b2ec5 RTP: update javadocs.
Change-Id: If600df0eb1e6135aed9f3b2eacfb6bc9ed5d78ff
2011-03-03 08:01:01 +08:00
Chung-yih Wang
89bc1fe73e Activate the wifi high perf. for sip calls.
bug:3487791

Change-Id: I7d8d146f8542cd7df387547c7ce3d5ded27f8e97
2011-02-25 10:21:37 +08:00
Chung-yih Wang
fcd0e50da5 Add rport argument for a reinvite request.
bug:3461707
Change-Id: I69a4f84dde3929c754c838fd12e624b774f44826
2011-02-21 11:53:58 +08:00
Chung-yih Wang
9e25df4463 Make SIP AuthName APIs public.
bug:3326867
Change-Id: I766e6e28f6ad3e84de2c9e24850d472ad00271cc
2011-02-17 15:06:08 +08:00
Jean-Michel Trivi
2ba92c71b5 do not merge bug 3370834 Cherrypick from master
Cherripick from master CL 79833, 79417, 78864, 80332, 87500

Add new audio mode and recording source for audio communications
 other than telelphony.

The audio mode MODE_IN_CALL signals the system the device a phone
 call is currently underway. There was no way for audio video
 chat or VoIP applications to signal a call is underway, but not
 using the telephony resources. This change introduces a new mode
 to address this. Changes in other parts of the system (java
 and native) are required to take this new mode into account.
The generic AudioPolicyManager is updated to not use its phone
 state variable directly, but to use two new convenience methods,
 isInCall() and isStateInCall(int) instead.

Add a recording source used to designate a recording stream for
voice communications such as VoIP.

Update the platform-independent audio policy manager to pass the
 nature of the audio recording source to the audio policy client
 interface through the AudioPolicyClientInterface::setParameters()
 method.

SIP calls should set the audio mode to MODE_IN_COMMUNICATION,
 Audio mode MODE_IN_CALL is reserved for telephony.

SIP: Enable built-in echo canceler if available.
1. Always initialize AudioRecord with VOICE_COMMUNICATION.
2. If echo canceler is available, disable our echo suppressor.

Note that this CL is intentionally not correcting the
 getAudioSourceMax() return value in MediaRecorder.java as the
 new source is hidden here.

Change-Id: Ie68cd03c50553101aa2ad838fe9459b2cf151bc8
2011-01-26 11:20:01 -08:00
Hung-ying Tyan
14b6d0620b Merge changes Ib70e0cf2,I0691cd70 into gingerbread
* changes:
  SipService: registers broadcast receivers on demand.
  SipService: release wake lock for cancelled tasks.
2011-01-24 19:41:42 -08:00
Hung-ying Tyan
f46013b672 Merge "Merge "SipService: registers broadcast receivers on demand."" into honeycomb 2011-01-18 02:25:52 -08:00
Hung-ying Tyan
e9b5407727 Merge "SipService: registers broadcast receivers on demand."
The previous implementation registers receivers when SipService starts up.
If the user doesn't use SIP at all, SipService will still process connecivity
and wifi state change events, which involves holding wake lock and thus
consumes power unnecessarily.

With this CL, SipService is completely idle if the user doesn't use SIP at all.
It registers receivers only when at least one account is opened.

Bug: 3326998
Change-Id: Idea43747f8204b0ccad3fc05a1b1c0b29c9b2557
2011-01-18 16:55:44 +08:00
Hung-ying Tyan
40f2cacbc9 Merge "SipService: release wake lock for cancelled tasks."
Bug: 3327004
Change-Id: Ice47f973b5f2969f26eaa83a3e4795b2e153ba8b
2011-01-18 16:50:56 +08:00
Chung-yih Wang
0f7de88cb9 Merge "Add auth. username in SipProfile." from gingerbread.
bug:3326867
Change-Id: Ic67dd7d4858f28224e4f01ad8b65bcd3a3c15f10
2011-01-12 11:43:27 +08:00
Chung-yih Wang
f268a2f848 Add auth. username in SipProfile.
bug:3326867
Change-Id: I2a62c75fb3f5e9c6ec2e00b29396e93b0c183d9b
2011-01-07 15:21:54 +08:00
Hung-ying Tyan
f0bb1ce70f SipService: registers broadcast receivers on demand.
The previous implementation registers receivers when SipService starts up.
If the user doesn't use SIP at all, SipService will still process connecivity
and wifi state change events, which involves holding wake lock and thus
consumes power unnecessarily.

With this CL, SipService is completely idle if the user doesn't use SIP at all.
It registers receivers only when at least one account is opened.

Bug: 3326998
Change-Id: Ib70e0cf2c808e0ebab4c3c43dcab5532d24e5eeb
2011-01-07 11:57:22 +08:00
Chia-chi Yeh
d87be273aa Enable built-in echo canceler if available.
1. Always initialize AudioRecord with VOICE_COMMUNICATION.
2. If echo canceler is available, disable our echo suppressor.

Change-Id: Idf18d3833189a8478c1b252ebe6ce55e923280b3
2011-01-06 17:43:24 +08:00
Chia-chi Yeh
4bf82df2f0 Do not set back to AudioManager.MODE_NORMAL in SipAudioCall.
Change-Id: I8f68e01e5f8c73bb8afd44312cbfadb55aab4330
2011-01-06 15:51:45 +08:00
Hung-ying Tyan
0c01e6e060 SipService: release wake lock for cancelled tasks.
Bug: 3327004
Change-Id: I0691cd70edf61f815ecb0613aca85babd89f6cc4
2011-01-06 13:05:29 +08:00
Chia-chi Yeh
d0da380796 am dc78e3fe: am 3cf71376: RTP: Send silence packets on idle streams for every second.
* commit 'dc78e3fe7f2ffbc810cd54e86e3a83e279d74984':
  RTP: Send silence packets on idle streams for every second.
2011-01-04 17:41:16 -08:00
Chia-chi Yeh
3cf7137642 RTP: Send silence packets on idle streams for every second.
Originally a stream does not send packets when it is receive-only or there is
nothing to mix. However, this causes some problems with certain firewalls and
proxies. A firewall might remove a port mapping when there is no outgoing
packet for a preiod of time, and a proxy might wait for incoming packets from
both sides before start forwarding. To solve these problems, we send out a
silence packet on the stream for every second. It should be good enough to
keep the stream alive with relatively low resources.

Bug: 3119690
Change-Id: Ib9c55e5dddfba28928bd9b376832b68bda24c0e4
2011-01-04 19:54:49 +08:00
Hung-ying Tyan
33808c6d24 am aec9a33f: am e0bd2688: Merge "Check if VoIP API is supported in SipManager." into gingerbread
* commit 'aec9a33f1cfc7c32690bc8e24aefaeb137ab9859':
  Check if VoIP API is supported in SipManager.
2010-12-22 11:35:14 -08:00
Hung-ying Tyan
5bd3782f24 Check if VoIP API is supported in SipManager.
This is to make SipManager.isVoipSupported() effective.
Also add NPE check now that we may return null SipAudioCall when VOIP is not
supported.

Bug: 3251016

Change-Id: Icd551123499f55eef190743b90980922893c4a13
2010-12-21 11:51:03 +08:00
Hung-ying Tyan
635b2b77b9 am d90bc225: am a936b256: Remove SIP realm/domain check
* commit 'd90bc225b9d6e4f8f69d984aa63062a7b20ac65c':
  Remove SIP realm/domain check
2010-12-20 11:33:23 -08:00
Hung-ying Tyan
a936b256eb Remove SIP realm/domain check
as the realm may be different from the domain.

Bug: 3283834
Change-Id: I64c9f0d6d626afdb397c5d378d30afa9d6a64ca9
2010-12-17 10:20:06 +08:00
Hung-ying Tyan
58ee2acba8 Check port in create peer's SIP profile.
SipURI returns port -1 when port is not present in the URI.
Don't call SipProfile.Builder.setPort() when that happens.

Bug: 3291248
Change-Id: I8e608cbc56ea82862df55fdba885f6a864db83ab
2010-12-16 20:46:50 +08:00
Hung-ying Tyan
eecf4a6f11 Check port in create peer's SIP profile.
SipURI returns port -1 when port is not present in the URI.
Don't call SipProfile.Builder.setPort() when that happens.

Change-Id: Ic5fe7301195705a77010038cae20d6629b33135e
2010-12-16 20:27:57 +08:00
Chung-yih Wang
c030a164c8 am c9cc9ab5: am 5f86d7f5: Merge "Fix SIP bug of different transport/port used for requests." into gingerbread
* commit 'c9cc9ab590ef879877e466c0b5f5823e11bb4c47':
  Fix SIP bug of different transport/port used for requests.
2010-12-06 23:36:23 -08:00
Chung-yih Wang
f053292d7a Fix SIP bug of different transport/port used for requests.
bug: http://b/3156148
Change-Id: I4fa5b274d2e90ebde12d9e99822dc193a65bad32
2010-12-07 10:36:19 +08:00
Hung-ying Tyan
2aef9a1e84 am 7da1ffc9: am e2abd103: Merge "Set AudioGroup mode according to audio settings" into gingerbread
* commit '7da1ffc9d2a51ef6120389a06351fd770ab45f46':
  Set AudioGroup mode according to audio settings
2010-12-02 18:02:58 -08:00
Hung-ying Tyan
e2abd103a2 Merge "Set AudioGroup mode according to audio settings" into gingerbread 2010-12-02 17:50:33 -08:00
Hung-ying Tyan
d6b0d689a7 am 6034f9b2: am 06e8cdc0: Fix race between ending and answering a SIP call.
* commit '6034f9b2664799cb4f983657a78023b49efff825':
  Fix race between ending and answering a SIP call.
2010-12-01 09:21:45 -08:00
Hung-ying Tyan
db4245291b am ed34b244: am d7116ff1: Merge "Do not suppress error feedback during a SIP call." into gingerbread
* commit 'ed34b244f1665b604d2a291db504415b10a514d7':
  Do not suppress error feedback during a SIP call.
2010-12-01 09:21:36 -08:00
Hung-ying Tyan
06e8cdc0f8 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
2010-12-01 15:02:36 +08:00
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