726 Commits

Author SHA1 Message Date
Eric Laurent
164a8f86c7 Partial fix for issue 3124895.
When a SIP call is put on hold and no other call is active, the audio mode should not be
switched to incall.

Change-Id: I1307330f10cbfb9c4223bcb9dc4faa79778750af
2010-10-25 19:45:39 -07:00
Hung-ying Tyan
5d9e3bbb9d Fix connect duration for un-established SIP calls.
Bug: 3118364
Change-Id: I931b675de04a3aac70b45d6bae27ab42a84f2d1e
2010-10-21 15:54:46 +08:00
Hung-ying Tyan
6037a056ea Fix n-way conf call in SipPhone.
+ Avoid concurrent modification when forming >3-way conf call.
+ Revise SipConnection.separate() to put the newly separated call to foreground.

Bug: 3114987

Change-Id: If6204e7e3cc05f4a516c33657a368b53a0ad014d
2010-10-21 03:59:04 +08:00
Jeff Hamilton
23392a84bc Fix the build.
Change-Id: Id5bfa0f91e6ec687201a320a1eb4d8a46050875e
2010-10-20 14:20:29 -05:00
Hung-ying Tyan
6fe795ecd3 Do another contact lookup if the first one fails and...
it's a SIP call and the peer's username is all numeric. The all-numeric username
could be a PSTN number.

Bug: 3105116 (case #2)

Change-Id: I1de9cfac3aab1c4c89935176264d07693adb5e7d
2010-10-21 02:54:57 +08:00
Hung-ying Tyan
88e3f0ad28 Silently reject a ringing call when another call is dialing/ringing.
http://b/issue?id=3109483
http://b/issue?id=3103072

Change-Id: I34f13225319c7f2a41e1ea9e25811866432ab809
2010-10-21 02:38:04 +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
Hung-ying Tyan
b595e094e3 Merge "Return display name in SipConnection.getCnapName()." into gingerbread 2010-10-19 23:00:16 -07:00
Hung-ying Tyan
538e58fc75 Return display name in SipConnection.getCnapName().
Bug: 3105116 (case #1)

Change-Id: Iedf3c8de07213c786cffb861bd52c3b4a768a86c
2010-10-20 11:21:55 +08: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
David Brown
d34d30ac2e Reduce CallerInfoAsyncQuery logging in user builds (STOPSHIP cleanup)
Bug: 3095005

Change-Id: Ide96756282d17252fac16a27cc184ea314a8b31a
2010-10-13 17:02:33 -07:00
Wink Saville
a42880749b Remove some PII.
Change-Id: I4df27119b6bbd28bf950516fd6f44676a8e04f06
2010-10-12 12:36:38 -07:00
John Wang
844a6b3cca Turn off additional debug.
Bug:3038245
Change-Id: If3c894511b4bbfd0d3e95b51aeca299edbbcf55d
2010-10-12 11:32:24 -07:00
Hung-ying Tyan
f5201ab71f Keep original phone number in SipConnection.
In case it's a PSTN number carried by an Internet call, the phone app can still
get the original phone number from Connection.getAddress() instead of getting a
SIP URI.

http://b/issue?id=3085996

Change-Id: Ie6c66100a4b5b2ce3f73baa1b446761cd51d7727
2010-10-12 11:34:01 +08:00
David Brown
d07833f54b Don't manually create CallerInfo objects from SipPhone
Currently the SipPhone class manually creates a CallerInfo object, and
populates it with very basic info from the SIP address, when making an
outgoing call.

But this is no longer needed, now that we do caller-id lookup properly for
SIP addresses (based on real data from the contacts database -- see
bug 3004127 and change https://android-git.corp.google.com/g/70555).
And in fact the presence of this initial CallerInfo object actually
*disabled* contacts lookup for outgoing calls (bug 3072731).

This change removes all that CallerInfo-related stuff from SipPhone.

(Thus SipPhone is now consistent with the other phone objects, like
GSMPhone and CDMAPhone, in that it doesn't muck with CallerInfo data at
all, but instead lets the phone app do it.)

Also, update isUriNumber() to handle "%40" in case the passed-in string is
URI-escaped.  (Nobody depends on that now, but it may be needed in the
future, and it's certainly safe to say that "%40" will never be found in a
legal PSTN number.)

TESTED:
  - Outgoing SIP call:
    - In-call UI shows correct contact info
    - After the call, Call Log shows correct contact info

  - Incoming SIP call:
    - In-call UI shows correct contact info
    - After the call, Call Log shows correct contact info

  - PSTN calls:
    - correct contact info everywhere

Bug: 3072731

Change-Id: I51434e4e5ad66d2e8ff51fc220001fb74485f0f5
2010-10-10 16:40:21 -07:00
John Wang
864032f951 Fix startDtmf.
Call correct startDtmf() function.

Bug: 3033030

Change-Id: Ia90311ac5d2e4b070a28533c865c81dc90326557
2010-10-10 11:36:05 -07:00
John Wang
35c4c211e0 Add flag to skip restoring network seletion.
For bug 3045366.

Change-Id: I7ad9ff89b0a77df473b638ad917b363c42de5405
2010-10-07 09:44:19 -07:00
Wink Saville
2e27a0be78 Changed handling of onQueryCompelete to not use mimeType.
Using mimeType causes an IPC request to contacts which can
be slow. This can cause an ANR of the Phone app. This change
parses the URL and to decide which column to use for the person_id
and thus should not cause an ANR.

bug: 3060704
Change-Id: I750c72746c7269e162f0338c0a3e00230a600519
2010-10-07 08:28:34 -07:00
Hung-ying Tyan
fc7e7766e7 Merge "CallManager/SipPhone: fix reject a ringing call" into gingerbread 2010-10-05 18:33:22 -07:00
Hung-ying Tyan
17956e626b CallManager/SipPhone: fix reject a ringing call
+ CallManager: fix getFirstActiveRingingCall(), getActiveFgCall(), getFirstActiveBgCall()
+ Set DisconnectCause to be INCOMING_REJECTED when a call is rejected

http://b/issue?id=3049671

Change-Id: Ica1d81ca4b71ab0ceb2ab437b82bbb4ccf86fe92
2010-10-06 09:31:44 +08:00
Mike Lockwood
2f65a99fdc Merge changes Ic5551c94,I0207f7f7 into gingerbread
* changes:
  GPS: Clean up GPS API extension initialization in JNI code.
  GPS: Add support for AGpsRilInterface.
2010-10-05 12:36:34 -07:00
Robert Greenwalt
45a8901dc3 Merge "Add supporting MCC=450(Korea)" into gingerbread 2010-10-05 11:46:12 -07:00
Miguel Torroja
1e84da822e GPS: Add support for AGpsRilInterface.
Adding changes to be able to have access to missing data to SUPL
(celld, imsi, WAP_PUSH and SMS)

Change-Id: I0207f7f7ea6595ed3fd7021cb732feddf52e4cf9
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-10-05 13:15:37 -04: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
306137d97f SIP telephony cleanup.
+ Remove unused classes.
+ Remove unused imports.
+ Remove unused code.
+ add DEBUG flag.

Change-Id: Ie1236d909d971093b68b066d3d8c1857ac89f56f
2010-10-02 08:30:48 +08:00
Hung-ying Tyan
10e2120bdd Merge "Add CallManager/Phone.setEchoSuppressionEnabled()." into gingerbread 2010-10-01 14:52:00 -07:00
Sang-il, Lee
64cb04a9e6 Add supporting MCC=450(Korea)
Change-Id: I009f77b064b8bb7f5bd055ac6e7c55a8f608e9d7
2010-10-01 11:46:55 +09:00
Dianne Hackborn
0a69f59760 Merge "Rub in a little 'ol log-b-gone." into gingerbread 2010-09-30 19:03:38 -07:00
Dianne Hackborn
cef65eeb03 Rub in a little 'ol log-b-gone.
Mmmmmm...  great fresh scent!

Change-Id: I050e70b31b5d4a9c6731f15a4b51a3620a33a78d
2010-09-30 18:27:22 -07:00
Jake Hamby
f51eadaf1f Typo fixes in comments and minor code cleanups.
* Fix some typos in Javadoc and log messages.
* Remove redundant initializer in BluetoothAdapter.readOutOfBandData()
* Use canonical "UTF-8" charset name instead of "UTF8" in
    BluetoothDevice.convertPinToBytes()

Change-Id: I58cd5dc48a7ad0053d204c5f590b4b3d438d8672
2010-09-30 15:43:34 -07:00
Hung-ying Tyan
23f21600d0 Add CallManager/Phone.setEchoSuppressionEnabled().
Change-Id: I7bc6241e6fa815787799a53d6f3a076567edc361
2010-09-30 12:34:41 +08:00
Hung-ying Tyan
0e41230481 Catch exceptions in SipPhone.canTake().
Exceptions may throw during canTake() as the peer may cancel the call and
result in a race with this method call.

Change-Id: I61903d601d8f9b2dcb4c4fbe1586e2c1a1069109
http://b/issue?id=3033868
2010-09-30 08:30:36 +08:00
Hung-ying Tyan
421c34c162 SipPhone: revise hangup() in SipCall and SipConnection.
Make them DISCONNECTED immediately. Don't enter DISCONNECTING state and wait
until SipSession ends the session. SipSession will get timed out eventually
but PhoneApp/user don't need to know this detail and wait.

This should fix the bug:
http://b/issue?id=3027719

Change-Id: Ida5a1bd09d08b9d591721384b4978127619aab51
2010-09-30 08:26:59 +08:00
David Brown
158d390f53 Implement contacts lookup (caller-id) for incoming SIP calls.
CallerInfoAsyncQuery can now handle SIP addresses in addition to regular
phone numbers: if the number passed in to startQuery() is actually a "URI
number", we now treat it as a SIP address and look it up directly in the
Data table.

If it's a regular phone number, the behavior is unchanged: we use the
PhoneLookup table as before.

This piece of the fix covers only the contact lookup for incoming calls;
we still need some more cleanup of the CallerInfo class in order to get
the call log working.

Bug: 3004127

Change-Id: I0fcb80f9de5b8ecf99d31ee92e0889ddb07216fd
2010-09-28 17:47:36 -07:00
Hung-ying Tyan
624d5b4e8c SIP: add DisconnectCause.SERVER_ERROR
and fix how SipErrorCode.SERVER_ERROR is determinted from server response, not
from local exceptions.

http://b/issue?id=3041332

Change-Id: Idce67e29858d5c7573b98b7fa1fac074913d71d6
2010-09-28 14:54:13 +08:00
Chung-yih Wang
245475925e Fix the startAudio order for 3-way calls.
Change-Id: Ib387b4b1f641f9bf52dd6007d23aee08f0925811
2010-09-28 12:46:04 +08:00
Hung-ying Tyan
368d796e2e Fix build.
Change-Id: I30f2615bc080db2c672e0391fd8bc735de17fcbf
2010-09-28 12:05:40 +08:00
Hung-ying Tyan
2b4f5cfd9b Don't enter DISCONNECTING state when the call/connection is not alive
http://b/issue?id=3027719

Change-Id: I1b52418a3695e96b48538fbf14497e34d2cfdda9
2010-09-28 09:01:26 +08:00
Hung-ying Tyan
025a39af34 SIP: misc fixes
+ check REQUEST_TERMINATED response on INVITE not CANCEL,
+ check if a TransactionTerminatedEvent matches the ongoing transaction,
+ add log to track SipConnection disconnect events.

Change-Id: I28325be62ac44e4a7507d3c4b5b78b066c0ea2ad
2010-09-28 01:52:42 +08:00
Hung-ying Tyan
00a22064ef SipService: handle cross-domain authentication error
and add new CROSS_DOMAIN_AUTHENTICATION error code and OUT_OF_NETWORK
DisconnectCause.

http://b/issue?id=3020185

Change-Id: Icc0a341599d5a72b7cb2d43675fbddc516544978
2010-09-27 10:45:24 -07:00
Chung-yih Wang
bd2294204e Fix the unhold issue especially if one is behind NAT.
+call startAudio() when call is established.

Change-Id: Ib6a1e34017fb83007ce275da1991058e8b803833
2010-09-27 23:53:39 +08:00
John Wang
8f5a1211dc Merge "Add debug functions." into gingerbread 2010-09-26 13:53:33 -07:00
John Wang
55bc084bf4 Add debug functions.
Enable more debug in CallManager.

Change-Id: Iaf66e31dc67f7ca9123fe5d8b351a21b1ec8b987
2010-09-26 13:39:55 -07:00
Hung-ying Tyan
194bbcce9b SIP: longer timeout for making call, shorter for cancelling
http://b/3021865

Change-Id: I354ebcc00f1ac68e4b7b466745c36aeb314f9138
2010-09-25 06:09:00 +08:00
Hung-ying Tyan
84a357bb6a Refactoring SIP classes to get ready for API review.
+ replace SipAudioCall and its Listener interfaces with real implementations,
  + remove SipAudioCallImpl.java, most of it is has become part of SipAudioCall,
+ add SipSession and its Listener classes to wrap ISipSession and ISipSessionListener,
+ move SipSessionState to SipSession.State,
+ make SipManager keep context and remove the context argument from many methods of its,
+ rename SipManager.getInstance() to newInstance(),
+ rename constant names for action strings and extra keys to follow conventions,
+ set thread names for debugging purpose.

Change-Id: Ie1790dc0e8f49c06c7fc80d33fec0f673a9c3044
2010-09-24 10:06:59 +08:00
Chung-yih Wang
4c571a62b1 Fix the build.
Change-Id: I6e3f683be22ab834ca1b83a1dbb0b3acd62645d2
2010-09-21 13:38:17 +08:00
Chung-yih Wang
9779b714f4 Revert the ANSWERING state.
+fix the unknown call flash for answering an incoming call and
updating the screen if the background call got dropped.
+change the getFirstActiveBgCall to return the call if the state
is not IDLE. This will help to fix unknown flash if the background
call got dropped.

Change-Id: I9803ccebd919acbd5296e7dfde7dc5f29cc9f180
2010-09-21 11:51:51 +08:00
John Wang
ee2ef3220f Merge "Use PhoneBase in the phone list." into gingerbread 2010-09-20 15:35:02 -07:00
Hung-ying Tyan
8544560ccc SipPhone: fix missing-call DisconnectCause feedback
also fix delivering bad news before closing a SipAudioCallImpl object so that
apps can get the current audio-call object state before it's closed:

http://b/issue?id=3009262

Change-Id: I94c19dae8b4f252de869e614ec462b19b4ff2077
2010-09-20 13:06:30 +08:00
Hung-ying Tyan
97963794af SIP: convert enum to static final int.
Converts SipErrorCode and SipSessionState.

Change-Id: Iee3a465649ea89d395b2336bbd673c25113e5f93
2010-09-20 09:51:31 +08:00