930 Commits

Author SHA1 Message Date
Tyler Gunn
356322fb1e Merge "API review cleanups/changes." am: 9324d6513b am: dd4bc7c69c
am: c49b011151

Change-Id: Ib3d76474bef8c911b2ec6a61b916e38af0a3b861
2017-03-07 03:05:23 +00:00
Tyler Gunn
dd4bc7c69c Merge "API review cleanups/changes."
am: 9324d6513b

Change-Id: Iaeb4bbb5e551bf4206ea2ab4372d1ba0533c4709
2017-03-07 02:49:54 +00:00
Hall Liu
42eb1ac202 Merge "Add further Connection-side APIs for RTT (part 2)" 2017-03-07 00:46:09 +00:00
Tyler Gunn
159f35c8e4 API review cleanups/changes.
- Change onCreateIncomingConnectionFailed/onCreateOutgoingConnectionFailed
to accept the connection mgr phone account as the first parameter.
- For the video APIs, pass the target SDK of the caller into along so
that the Telecom permission check can have fallback behavior for older API
versions.
- Add guidance for how UX should be shown in onShowIncomingCallUi API.
API guidance follows how the Dialer app shows its notification and full
screen UX.

Test: Manual, CTS.
Bug: 35767711
Bug: 35767096
Change-Id: Ib343f0eda1a4d067a38c553f33f140b4efcf3e48
2017-03-06 11:04:55 -08:00
Tyler Gunn
bf8d2a2bf4 Merge "Support for showing self-managed calls in IncallService." am: 5a33057092 am: 8c7d28f163
am: fd0e1a9d93

Change-Id: I88170e214ca6c142e0445a814ad0e76064e72ba7
2017-03-01 23:40:53 +00:00
Hall Liu
57006aa82a Add further Connection-side APIs for RTT (part 2)
Add methods and callbacks to facilitate local and remote RTT initiation
and termination in the middle of a call. Adds @hide Connection-side APIs
to communicate with the ConnectionService, as well as plumbing for
RemoteConnections.

Test: manual, through telecom testapps
Change-Id: Ia80604b7dff8586ff222dbccdbe55e91aab02178
2017-03-01 14:45:15 -08:00
Tyler Gunn
8c7d28f163 Merge "Support for showing self-managed calls in IncallService."
am: 5a33057092

Change-Id: I3491e4c099abf8ccc504fcb85109ba1576e34aba
2017-03-01 21:41:04 +00:00
Tyler Gunn
5a33057092 Merge "Support for showing self-managed calls in IncallService." 2017-03-01 20:32:56 +00:00
Android Build Merger (Role)
df228e3128 Merge "Merge "Add @hide to RttAudioMode IntDef" am: 22af0f3377 am: c284379659 am: f000639f82" 2017-03-01 01:11:54 +00:00
Hall Liu
91300fba36 Merge "Add @hide to RttAudioMode IntDef" am: 22af0f3377 am: c284379659
am: f000639f82

Change-Id: Ibcb239e0aa3499386f6f71026084276b07554cdb
2017-03-01 01:11:04 +00:00
TreeHugger Robot
247a3c0132 Merge "Introduce ANSWER_PHONE_CALLS permission" 2017-03-01 01:10:20 +00:00
Hall Liu
c284379659 Merge "Add @hide to RttAudioMode IntDef"
am: 22af0f3377

Change-Id: Ifdfdf7ced2f88188314475c99dd58cdf886f014d
2017-03-01 01:01:29 +00:00
Hall Liu
07094df24a Add @hide to RttAudioMode IntDef
IntDefs apparently require an @hide annotation to avoid breaking CTS
tests. Adding it here.

Change-Id: Ifd748b55e68091132571df7e74fdb797bd6a83fc
Test: CTS
Fix: 35808951
2017-02-28 15:18:31 -08:00
Tyler Gunn
a955c9df90 Merge "Fix videoStateToString for audio/paused state." am: 89e7a888be am: 2f96f34373
am: 9b59cc7bad

Change-Id: Idee131069636fc8a4ea086a3d41bce4c1dfcbda6
2017-02-27 03:10:57 +00:00
Tyler Gunn
2f96f34373 Merge "Fix videoStateToString for audio/paused state."
am: 89e7a888be

Change-Id: I04fe4d5b61c548f3b5f012af343c4e08334933e0
2017-02-27 03:01:08 +00:00
Tyler Gunn
89e7a888be Merge "Fix videoStateToString for audio/paused state." 2017-02-27 02:55:25 +00:00
Eugene Susla
cae3d3e59e Introduce ANSWER_PHONE_CALLS permission
This exposes an API to answer a ringing call, as well as a corresponding
runtime permission and appop

Test: Grant the permission and ensure the call gets answered.
Deny the permission, and ensure that the API call throws an exception.
Bug: 30932767
Change-Id: I4c33fcea6b95a30469fa6c0c37090be32b0ad52e
2017-02-24 20:28:46 -08:00
Hall Liu
52084367c0 Merge "Introduce APIs for RTT calls (part 1)" am: 27ad05169e am: d83b06cd31
am: ba6c607728

Change-Id: I02e7291091d2452cb7cdb7351c8744606b340e76
2017-02-22 19:05:03 +00:00
Hall Liu
d83b06cd31 Merge "Introduce APIs for RTT calls (part 1)"
am: 27ad05169e

Change-Id: I3fb3cb89b467e5df808967dcd478964a84e2e61f
2017-02-22 18:56:48 +00:00
Tyler Gunn
1aee66f523 Fix videoStateToString for audio/paused state.
The videoStateToString method erroneously assumed that if the videostate
was Audio - Paused, that it was audio-only.  Simple logic error to fix.

Test: Added new unit tests.
Bug: 35645334
Change-Id: Ia5ae4d05284b70ad4ba86b8e5d2c53ee8e68a1fa
2017-02-21 19:22:21 -08:00
Hall Liu
95d5587d0a Introduce APIs for RTT calls (part 1)
Add signaling methods and data pipes for handling real-time text during
a call.

Change-Id: I876827c448252c5f786d7a4919c47891acb03877
Test: manual, through telecom testapps
2017-02-21 15:27:25 -08:00
Hall Liu
c788f3e15c Merge "Add extra key for app-specified outgoing call timeout" am: decc6c9d56 am: 2bc24e252e am: 38f5001c10
am: b521143aa1

Change-Id: I416d7ad1a12a6b8ddb2ea2958356a487e7f10aef
2017-02-15 22:56:31 +00:00
Hall Liu
b521143aa1 Merge "Add extra key for app-specified outgoing call timeout" am: decc6c9d56 am: 2bc24e252e
am: 38f5001c10

Change-Id: I6e7e67c946205b28440a4daeeab3a002f8d6bccc
2017-02-15 22:35:52 +00:00
Hall Liu
8f613fb4d6 Add extra key for app-specified outgoing call timeout
Bug: 34474757
Test: manual
Change-Id: Ia93d68d6a01308b0b93b88977daf983a0ed3a22c
2017-02-14 18:11:11 -08:00
Tyler Gunn
24e1833617 Support for showing self-managed calls in IncallService.
Also added new isInManagedCall TelecomManager API, used to determine if
there are ongoing managed calls only.

Test: Manual, cts
Bug: 34159263
Change-Id: Ib8020617607ccb433c2eee9b9d5a2c929665214b
2017-02-12 19:33:35 -08:00
Tyler Gunn
00f033f234 Merge "Add support for wait-on-handlers command." am: da6d683caa am: a3b4985ad4 am: 3e086be542
am: 8d2d9d758f

Change-Id: Ib2373609eb15e65ae86e14e081c72909d1fd5808
2017-02-08 20:37:32 +00:00
Tyler Gunn
8d2d9d758f Merge "Add support for wait-on-handlers command." am: da6d683caa am: a3b4985ad4
am: 3e086be542

Change-Id: Ib704d3d5c67b987e4daa375c6ca7f2b1a5d8fdbb
2017-02-08 20:16:15 +00:00
Tyler Gunn
da6d683caa Merge "Add support for wait-on-handlers command." 2017-02-08 16:09:09 +00:00
Brad Ebinger
63073e0ae8 Merge "Perform camera permission and app ops check when setting camera for VT." am: ed5c217fc0 am: 3d6f878b75
am: ac3f482f15

Change-Id: I773c607ea2999e6d32c7fcc578cf7b3c86510521
2017-02-07 22:41:58 +00:00
Brad Ebinger
ed5c217fc0 Merge "Perform camera permission and app ops check when setting camera for VT." 2017-02-07 22:26:44 +00:00
Tyler Gunn
18dfc36012 Add support for wait-on-handlers command.
Add support for wait on handlers adb telecom command.  Used in CTS
tests to ensure work is completed once all Telecom handlers have finished
their current work.

Test: CTS, Manual
Bug: 34159263
Change-Id: I14acc0a04710b445c172629c2327813ee73a5a55
2017-02-06 20:47:04 -08:00
Tyler Gunn
efeae9bca4 Merge "Self managed CS implementation." am: d736a6b2c2 am: 6bd991b3d2
am: 6a643c3a60

Change-Id: I43f59846ecc7601730aa3a15b106292d7ace0df0
2017-02-07 00:05:09 +00:00
Tyler Gunn
bf9c6fdb43 Perform camera permission and app ops check when setting camera for VT.
When a calling InCallService attempts to use the setCamera API on the
VideoCall, Telecom will perform a permission check to ensure that the
caller has the correct camera permission and passes the app-ops camera
check.  A failure to set the camera will result in a callback via the
call session event API.

This got a little messy as the app ops package name needs to come from the
InCallService, and handler usage in the VideoProvider API means we had to
pass around the uid/pid of the caller, obtained before we trampoline onto
the handler.

Test: Unit tests added, manual testing performed.
Bug: 32747443
Change-Id: I555a04f9c3fb45e60bb811f64ba855ccf2e3b0e2
2017-02-06 14:49:03 -08:00
Tyler Gunn
d736a6b2c2 Merge "Self managed CS implementation." 2017-02-06 22:32:14 +00:00
Tyler Gunn
cd6ccfd23c Framework fixes to support VoLTE conf calls via RemoteConnectionServices.
Fixing some issues with the addExistingConnection and addConference APIs
on ConnectionService.  When a connection manager relays the addition of
an existing connection or a conference to Telecom, it will assign a new
ID to the new connection/conference.  Due to how RemoteCSes work, the
Connection/Conf will be added directly via TelephonyConnectionService and
also via the connection manager's connection service.  Because the ID
changes, we ended up adding these twice. Conferences weren't a problem in
the GSM conference case because the TElephonyConnectionService's
ConnectionServiceWrapper didn't know of the IDs for the children of the
conference.  However, due to how the existing connections work its not the
case for VoLTE conferences.  To mitigate this, I'm passing the original
connection/conference ID to the connection manager via extras (ugh) and
using this to ensure that when the new existing connection/conference is
added to telecom that the same ID is used.  This ensures that we can
properly de-dupe the requests from TelephonyConnectionService and the
connection manager.

Also, there was some missing code in RemoteConnectionService which would
cause it to not properly track existing connections.

Bug: 31464792
Change-Id: I436f4438fd000ea48ebea7ceb75105bd3f456e46
2017-02-06 12:31:53 -08:00
Tyler Gunn
44e019140e Self managed CS implementation.
Add required AIDL changes to pass along connection fails.

Test: Manual
Bug: 34159263
Merged-In: I0a24ff786b2867aa4e19ac79959df54a04983251
Change-Id: I0a24ff786b2867aa4e19ac79959df54a04983251
2017-02-06 16:20:12 +00:00
Tyler Gunn
3edafc16ac Self managed CS implementation.
Add required AIDL changes to pass along connection fails.

Test: Manual
Bug: 34159263
Change-Id: I0a24ff786b2867aa4e19ac79959df54a04983251
2017-02-03 13:08:17 -08:00
Brad Ebinger
38e704cace Merge "Deprecate old TelecomManager actions" am: d1ab15a1af am: ee9a9babb1 am: 50315f010c
am: aaad10d729

Change-Id: I35639813b1d356df1fea82c9470bd18fda1c5267
2017-01-23 19:49:34 +00:00
Brad Ebinger
aaad10d729 Merge "Deprecate old TelecomManager actions" am: d1ab15a1af am: ee9a9babb1
am: 50315f010c

Change-Id: I89621d6f584ee743b67838a11fde212d2030900c
2017-01-23 19:38:42 +00:00
Brad Ebinger
50315f010c Merge "Deprecate old TelecomManager actions" am: d1ab15a1af
am: ee9a9babb1

Change-Id: Ib24d46d70b10cd8bb6ac39fd4dc915ac9a19a3ba
2017-01-23 19:31:18 +00:00
Brad Ebinger
d1ab15a1af Merge "Deprecate old TelecomManager actions" 2017-01-23 19:09:12 +00:00
Tyler Gunn
15470f9bfc Merge "Adding self-managed connection service APIs." am: 3a7253a09d am: 2155be0218 am: d70e5d9317
am: 61650097ed

Change-Id: Icfeff293b66b1bb062095a857c8a22ac0dcbdd63
2017-01-19 18:44:10 +00:00
Tyler Gunn
61650097ed Merge "Adding self-managed connection service APIs." am: 3a7253a09d am: 2155be0218
am: d70e5d9317

Change-Id: I20ba841ceefb5905bf81262d6c42ea4b252ba3d4
2017-01-19 18:39:50 +00:00
Tyler Gunn
d70e5d9317 Merge "Adding self-managed connection service APIs." am: 3a7253a09d
am: 2155be0218

Change-Id: I75319e09f352905ffa45194086b11711f9070c70
2017-01-19 18:34:53 +00:00
Tyler Gunn
f50354363c Adding self-managed connection service APIs.
1. Adding new APIs for self-managed connection services.
2. Adding Telecom package-level documentation.

Test: Manual (unit, cts pending; this is just scaffolding for now)
Bug: 34159263
Change-Id: Ic226ec8bfcb2fbcc02fe802b47499e47aab17d0a
2017-01-18 14:44:43 -08:00
Brad Ebinger
23b1c6d061 Deprecate old TelecomManager actions
The ACTION_INCOMING_CALL and ACTION_NEW_UNKNOWN_CALL intents are
not used anymore and have been replaced with methods in
TelecomManager. This change marks them as deprecated.

Test: None
Bug: 33783690
Change-Id: I840b0ac202237cc43a0540fe64c832e119b33aa2
2017-01-12 13:10:40 -08:00
mike dooley
4af561ff17 Adding extra key to indicate when the last emergency call was made.
This can be used to determine if an incoming call is potentially
an emergency callback.

Bug: 30952524
Test: none
Change-Id: I2d4ca8e6885c0314394b3a2ad389ad8115b79156
2017-01-10 20:56:23 +00:00
Christine Hallstrom
2830ce9a09 Add ability to set supported audio routes on phone accounts and connection
The set audio routes are used by Telecom to restrict where the audio may
be routed to. For example, an account can specify that calls may not be
routed over bluetooth headsets, which will prevent a new call from being
routed to this source.

This is a cherry-pick of abandoned ag/1521009.

Bug: 32958838
Change-Id: Idd5e4d38b157f11454f3d991385644f2f384596e
2016-12-13 17:48:50 -08:00
Tyler Gunn
5f4fa1d324 Add reason code used to tell dialer when call failed due to WFC being off. am: 6adbd2bf5f
am: 9507a1a716

Change-Id: I135bb3c266ce1f0136ef3a9413942bf9d8fa1fe7
2016-12-12 17:26:07 +00:00
Tyler Gunn
9507a1a716 Add reason code used to tell dialer when call failed due to WFC being off.
am: 6adbd2bf5f

Change-Id: Id175a279bed0e80115abf1b2043a0fc1472d49f1
2016-12-12 17:17:21 +00:00