796 Commits

Author SHA1 Message Date
Brad Ebinger
a0dc9765d3 Add support for starting external Sessions
This change adds support for parceling Session Information to be
transmitted over AIDLs and starting an external session in the external
process.

Test: Telecom Unit tests and new SessionManager Tests.
Bug: 26571395
Change-Id: Ie27ed88d4a8c344b34568025ddcf150fdcb38d62
2016-10-25 14:22:40 -07:00
Brad Ebinger
37521b9ba5 Merge "Switch on android.telecom.Log in Telecom" 2016-10-20 22:53:39 +00:00
Brad Ebinger
836efade0c Adds registerSessionListener API to Log
Adds the registerSessionListener API to android.telecom.Log to allow
callbacks to occur when a session has been fully completed.
CP from internal branch.

Test: Manual Testing
Bug: 26571395
Change-Id: I70ebd6f432768a5d7bd8f3a0997b8e0ef335bb35
2016-10-19 14:32:46 -07:00
Brad Ebinger
096d2829ed Add support for new SessionManager and EventManager tests
Test: Ran new unit tests
Bug: 26571395
Change-Id: I6d14d7c05b8fdc8dc1319a81f0e41f7bcd989b85
2016-10-13 15:26:58 -07:00
Brad Ebinger
4fb372fe16 Switch on android.telecom.Log in Telecom
Move over the Runnable Class into android.telecom and turn on the
framework's usage in Telecom.

Test: All Telecom unit tests pass. Manual Log testing has also been
confirmed to be working as it did before.
Bug: 26571395
Change-Id: If7e2036c746c5a953f3a77e2d625a423ce5bf8f3
2016-10-11 16:26:11 -07:00
Brad Ebinger
51b9834180 Transplant the Logging system from Telecom
This change is the preliminary transplant of the functionality from
Telecom into android.telecom. It is currently not being used
anywhere and is not hooked into Telecom yet. It will be after this
change is committed.

Test: Refactoring CL. Existing tests still pass
Bug: 26571395
Change-Id: I406975e686c6eaab7e31b1efa426b3406c8e90cf
2016-09-30 15:01:01 -07:00
Cuihtlauac ALVARADO
0b3b2a5f3b Fix parameter description
Correct parameter description text according to method name.

Change-Id: If6bd8254386a84efd338b58797c2c338ccb513b7
2016-09-13 14:49:41 +02:00
Brad Ebinger
4fa6a01898 Handle Concurrency issues in Connection
Currently, there is a possibility of concurrent thread operations to the
Extras bundle in Conference/Connection. This can cause unexpected
behavior. We have added a lock on the Extras to prevent that from
occuring.

Bug: 29330310
Change-Id: Id63a9797c2f748120a3df8e3ce06c4ce3891c651
2016-06-15 20:53:25 +00:00
Tony Mak
9ece303402 Remove PROPERTY_WORK_CALL
Bug: 28842878
Change-Id: I7fb28ec3b121f4546ea60d6b170c2c6d98ffcb8c
2016-05-20 19:56:08 +00:00
Tony Mak
53b5df43b4 Rename PROPERTY_WORK_CALL to PROPERTY_ENTERPRISE_CALL based on API review
TODO: After updating all places that use the SDK, remove/hide the old API

Bug: 28842878

Change-Id: I131be644439080dd0507cd10d8bd6618246ee7ad
2016-05-20 15:39:38 +00:00
Chenjie Luo
7e745ec49c Add null pointer check in removeConnection am: e370b538eb
am: 58642e6545

* commit '58642e65455ee9456993a2f6386402fbcec68ab8':
  Add null pointer check in removeConnection

Change-Id: Ia4d14a664c9869d1065313db6795ac4e72dee59d
2016-05-18 20:35:51 +00:00
Chenjie Luo
58642e6545 Add null pointer check in removeConnection
am: e370b538eb

* commit 'e370b538ebb6ca1072f270aee3003faaa0d1deb2':
  Add null pointer check in removeConnection

Change-Id: I7b615a8f7c7a89617c4f748ad74007ec73db6784
2016-05-18 20:29:17 +00:00
Chenjie Luo
e370b538eb Add null pointer check in removeConnection
Bug: 28607777
Change-Id: I199ed75740796540d243ad9f507ab2511c9ed3c1
2016-05-12 17:00:27 -07:00
Sailesh Nepal
b05e4851d0 Merge "[Call Timing] Add constants for call timing extras" into nyc-dev 2016-04-18 22:36:40 +00:00
Tyler Gunn
1bf206b766 Hide multi-endpoint APIs.
Per feature council decision, the multi-endpoint APIs will be @hide for
the N release.

Bug: 28196918
Change-Id: Ia80b089bc754ce87ca208382eb79442b5265844d
2016-04-15 11:28:44 -07:00
Sailesh Nepal
da6bb3883f [Call Timing] Add constants for call timing extras
This CL defines new extras that can be set in a call's intent extras.
These extras track the following:
    CALL_CREATED_TIME_MILLIS - the time when the call was created by
	telephony (or another connection service)
    CALL_TELECOM_ROUTING_START_TIME_MILLIS - the time when telecom
	started processing the call
    CALL_TELECOM_ROUTING_END_TIME_MILLIS - the time when telecom
	finished processing things like call blocking and was ready to
	connect to the UI

These extras can be used by the dialer to track how long it takes for
calls to be shown to the user.

Bug: 28202119
Change-Id: I8fca259d449adedaeb4ff91d35bf59a7409be866
2016-04-15 02:23:59 -07:00
Abhijith Shastry
9bacdabf3e Remove deprecated API launchManageBlockedNumbersActivity
BUG: 27364137
Change-Id: Ie608c3f75d5fe353a1ba127b0da763c421401eb8
2016-04-04 10:46:11 -07:00
Tyler Gunn
53c76457e4 Merge "Add hidden capability to indicate account supports emergency video calls." into nyc-dev 2016-04-01 15:36:08 +00:00
Tyler Gunn
53befa2e0b Merge "Add missing null checks on Conference and Connection." into nyc-dev 2016-03-29 19:02:08 +00:00
Tyler Gunn
a8fb8aba7c Add missing null checks on Conference and Connection.
Also add missing bundle passing for Connection Events.

Bug: 27850430
Change-Id: I0f79635929cbe5da18b528b6c1119c7ce4d8e32b
2016-03-29 10:24:22 -07:00
Tyler Gunn
720c664401 Add connection properties to Connections.
- Per suggestion of API council, moving properties of a Connection from
CAPABILITIES_* to PROPERTIES_*.

Bug: 27458894
Change-Id: Icce921b03cda514a991646ed39a26559c7e91230
2016-03-24 20:20:11 -07:00
Tyler Gunn
cee9ea62b0 Add hidden capability to indicate account supports emergency video calls.
This is used by Telephony to let Telecom know when emergency video calls
are supported.

Bug: 27484017
Change-Id: I317070b326e27e74d58afcb247746bdd2552d67b
2016-03-24 11:45:43 -07:00
Tyler Gunn
dee56a8a79 Expand call/connection extras API.
Currently, connection extras are propagated up to Telecom as an
entire bundle.  This is not ideal, as any time a change is made to
the extras, the bundle needs to be fetched, changed, and then re-set on
the connection, where it is parceled to Telecom as a whole.

Using how extras on an Intent as inspiration, this CL adds separate
putExtras, putExtra, and removeExtra methods to allow manipulation of
the extras bundle without operating on it in its entirety.

This Cl also adds support for Calls modifying the extras bundle, with
changes propagated back down to ConnectionServices.

Bug: 27458894
Change-Id: I152340a3bca2dc03f170b06b172a6823410fb961
2016-03-23 16:06:34 -07:00
Jeff Sharkey
f0ec2e0050 Mark even more Bundles as defusable.
Bug: 27766193
Change-Id: Ib027ac7b40c7a575a76f289faabde9655338865e
2016-03-21 12:37:57 -06:00
Brad Ebinger
9bc6ba9746 Merge "Update docs to better document PhoneAccountHandle" into nyc-dev 2016-03-18 22:36:24 +00:00
Tyler Gunn
7904a972e1 DO NOT MERGE Add new ConnectionEvent API (hide) to send a notification to Telecom
Connection event used to inform Telecom that it should play or stop
the on hold tone. This is used to play or stop a tone when the peer
puts the current call on hold.

BUG=25357778
Change-Id: I2669f8f5062449784a712b9dd28e576326fcc679
2016-03-17 18:34:27 -07:00
Brad Ebinger
428cec9056 Update docs to better document PhoneAccountHandle
Warns developers to not create PhoneAccountHandles with null
arguments. If they do, a log warning is printed, reminding them that the
APIs should not be used in this manner.

Bug: 26684527
Change-Id: I03895cac9d732ee618649d38176d48620f705a1b
2016-03-17 15:22:06 -07:00
Hall Liu
792ad96eea Prevent multi-threaded access to digest object
Bug: 27717431
Change-Id: I3ebd1dda7386c35078c0624df1446e64c3fb0aa0
2016-03-17 11:27:55 -07:00
Hall Liu
712acbe13c Un-hide Connection#onReject(String) and its associated capability
The capability is CAPABILITY_CAN_SEND_RESPONSE_VIA_CONNECTION

Bug: 27501686
Change-Id: Id73bb99650ca8440a9f4e87bfe533a97c4d19778
2016-03-15 10:19:40 -07:00
Tyler Gunn
876dbfb476 Add API support for multi-endpoint.
This CL includes changes required to support multi-endpoint (see the
design doc linked off the bug).

Main changes include:
- support for indicating if a call/connection is "external" to the device.
- support for indicating if an external call can be pulled from the
remote device to the local device.
- API used to initiate a pull of a call external to the current device to
the current device.
- Made the "connection event" API public (was previously @hide); this will
be used to support passing some error events involving pulling calls to
the incall ui.
- Added new InCallService metadata which will be used to determine if an
InCallService wants to be informed of external calls.
- New disconnect causes which will be used to expose the fact that a
multi-endpoint call was answered elsewhere and that a call ended because
it was pulled to another device.
- New call log call types to indicate if calls were answered elsewhere
or pulled to another device.

Bug: 27458894
Change-Id: I423f64ff965b5e50194635a51868c327782db2a1
2016-03-14 23:26:34 +00:00
Abhijith Shastry
ec30d2fd12 Tweak createManageBlockedNumbersIntent API documentation.
BUG: 27364137
Change-Id: I82b9802b3108f4d9d405fc55fefa766dbcddd537
2016-03-04 16:47:23 -08:00
Abhijith Shastry
35293d2ff7 Merge "Add deprecated annotation to launchManageBlockedNumbersActivity API." into nyc-dev 2016-03-01 19:56:06 +00:00
Santos Cordon
3041048a0a Merge "Adding toStrings() to the API." into nyc-dev 2016-03-01 18:57:03 +00:00
Abhijith Shastry
6701be428c Add deprecated annotation to launchManageBlockedNumbersActivity API.
BUG: 27364137
Change-Id: I0c5c05042e6bc05a605613bde7ba3c579c1858ed
2016-02-29 16:31:12 -08:00
Abhijith Shastry
1ce163fe34 Merge "Add new API to create an intent to manage blocked numbers." into nyc-dev 2016-02-29 20:23:21 +00:00
Abhijith Shastry
a26fe99b1e Add new API to create an intent to manage blocked numbers.
This replaces the launchManageBlockedNumbersActivity API.

BUG: 27364137

Change-Id: I5d5a20d25f0dea8b8e0e998b51f80658ff404e2c
2016-02-29 11:53:43 -08:00
Omkar Kolangade
a0a8f75699 Merge "IMS Connection Capabilities Update" into mm-wireless-dev
am: 4aeafd8f27

* commit '4aeafd8f27852bdb684711f1df807ff0e59cb354':
  IMS Connection Capabilities Update
2016-02-29 18:10:06 +00:00
Tyler Gunn
4aeafd8f27 Merge "IMS Connection Capabilities Update" into mm-wireless-dev 2016-02-29 18:06:25 +00:00
Santos Cordon
3c20d63373 Adding toStrings() to the API.
Bug: 16979045
Change-Id: Ibbe1bcea6ab7981f62e7fb4bbe35f71e881166bd
2016-02-25 16:12:35 -08:00
Santos Cordon
256aa5afd7 Merge "Add APIs to support CDMA add-call limitations." into nyc-dev 2016-02-25 16:16:43 +00:00
Tyler Gunn
86c9fb4173 Adding missing break statements causing crash on MSG_SET_EXTRAS.
The case block for MSG_SET_EXTRAS was missing its break statement, all
the way back to summer 2015 when that code was originally added.

When the new MSG_ON_CONNECTION_EVENT handler was added, it introduced a
new potential fall-through from MSG_SET_EXTRAS (in addition to the fact it
too was missing a break statement).

Bug: 27338441
Change-Id: I2df2bc78c4ceb32e6245888eed18c2d8834e629b
2016-02-24 13:17:21 -08:00
Santos Cordon
a6018b9bf4 Add APIs to support CDMA add-call limitations.
Bug: 22850789
Change-Id: I63de958c6c788a7da5696416e59d2f43cbe633cc
2016-02-17 12:14:04 -08:00
Tyler Gunn
bd1eb1f105 Add new ConnectionEvent API (hide) to send a notification to Telecom
Connection event used to inform Telecom that it should play or stop
the on hold tone. This is used to play or stop a tone when the peer
puts the current call on hold.

BUG=25357778
Change-Id: I2669f8f5062449784a712b9dd28e576326fcc679
2016-02-16 14:36:20 -08:00
Hall Liu
e362e501ee Initialize MD5 in logging in background
Use a background task to call MessageDigest.getInstance in order to
avoid a possible disk read on initialization.

Bug: 26069217
Change-Id: I0091ce012bcd811dfca0e85c21a12c54913ed919
2016-02-11 10:39:40 -08:00
Hall Liu
6579e696fc Merge "Initialize MD5 in logging in background" into cw-e-dev
am: 5839e7804c

* commit '5839e7804c717f3b398fd777540e2297e8c85300':
  Initialize MD5 in logging in background
2016-02-11 18:16:08 +00:00
Brad Ebinger
ec0d33490a Update TelecomManager docs regarding PhoneAccounts
Updates the docs for addNewIncomingCall to mention that if the
PhoneAccountHandle representing a PhoneAccount is not registered or not
enabled, a SecurityException will be thrown (as of b/26864502). Also
notifies the user that PhoneAccounts are stored in DE storage
in registerPhoneAccount.

Bug: 26874536
Bug: 26780305
Change-Id: I2dae932cfa3404d7d5060dad840a75227793603e
2016-02-08 19:07:08 +00:00
Abhijith Shastry
3af4eb5b50 Merge "Add API in TelecomManager to launch the UI to manage blocked numbers." 2016-02-04 03:43:54 +00:00
Abhijith Shastry
1908cb84a5 Add API in TelecomManager to launch the UI to manage blocked numbers.
BUG: 26917087
Change-Id: Ide328d250561577f652e3a1ee093b37ad19084d8
2016-02-02 14:55:15 -08:00
Hall Liu
f2301bcbbf Remove check for missing parent calls
Telecom now guarantees that when sending a conference call to an in-call
service, all children will be sent before any parents. Thus, it is
acceptable for children to temporarily have invalid references to
parent calls, but not vice versa.

Bug: 26818778
Change-Id: Id34e4c3a773e6f7c75be8c85ec2642cf05dabe0a
2016-01-29 18:41:14 -08:00
Tyler Gunn
a3fc54f0d8 DO NOT MERGE Add capability to determine if downgrade to audio is denied.
By default we assume downgrade to audio is permitted; this capability
probides a means for a carrier to specifically deny that.

Bug: 22728624

Change-Id: I75e0a5b9e5ad2d970003a4691b6fc0ac0dcfe9e0
2016-01-27 19:45:23 -08:00