919 Commits

Author SHA1 Message Date
Tyler Gunn
b6ce026fd1 Add getSelfManagedPhoneAccounts() TelecomManager API.
This is consistent with the existing getCallCapablePhoneAccounts API
which is used to get the phone accounts capable of placing phone calls.

Test: CTS
Bug: 34159263
Merged-In: I1396c63a6882947cd66721528e53b6964a9091e0
Change-Id: I1396c63a6882947cd66721528e53b6964a9091e0
2017-04-10 13:29:21 -07:00
Hall Liu
f6f3c16dfb Merge "Add @TestApi annotations to CS-side RTT APIs for CTS" 2017-04-04 23:31:38 +00:00
Tyler Gunn
f19c52d20d Merge "Add api to retrieve call creation time." 2017-04-04 21:35:26 +00:00
Tyler Gunn
9fab4ad9b3 Merge "Self Managed CS Implementation"
am: 98fad21a8a

Change-Id: I8c972f521270e6c973c2524a2684aa32a65ca0fd
2017-03-31 04:26:27 +00:00
Tyler Gunn
3765356699 Self Managed CS Implementation
- Add API guide for developers giving an overview of what they need
to implement.
- Add @hide setLabel method in PhoneAccount; used when registering a
self-managed CS's phone account; we override it with their app label to
ensure they don't try to give themselves another name.

Test: Unit
Bug: 34159263
Change-Id: I0c890dc2feeb3ee438a80ed425db2aaf1f4c1fdd
2017-03-30 19:00:41 -07:00
Hall Liu
ffa4a812f8 Add @TestApi annotations to CS-side RTT APIs for CTS
CTS tests need both the in-call and connection service sides of the APIs
to test Telecom functionality properly, so annotating the hidden-for-now
connection service APIs with TestApi.

Test: part of CTS
Change-Id: I3711729d7e8c8aff2735f4da9fbd04bcca6b4942
2017-03-30 13:49:12 -07:00
Tyler Gunn
c0bf6deced Add api to retrieve call creation time.
Test: CTS
Bug: 36124432
Change-Id: Ic8288dec73adda7870377f189f560acef0a575f6
2017-03-24 16:04:25 -07:00
Brad Ebinger
d31314d550 Merge "Disable a phone number log for user build"
am: 59a40691a5

Change-Id: I9b2a14b29fe5e096b734b6e3f1d4b65806753646
2017-03-09 21:46:39 +00:00
Brad Ebinger
59a40691a5 Merge "Disable a phone number log for user build" 2017-03-09 21:39:00 +00:00
Hall Liu
033972b5b2 Merge "Add further Connection-side APIs for RTT (part 2)"
am: 6bb5110f2c

Change-Id: Idfe092393301fb47e6a635eb150103cb928a2696
2017-03-07 21:52:52 +00:00
Hall Liu
6bb5110f2c Merge "Add further Connection-side APIs for RTT (part 2)" 2017-03-07 21:44:43 +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
b64ac4c57a 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
Merged-In: Ia80604b7dff8586ff222dbccdbe55e91aab02178
Change-Id: Ia80604b7dff8586ff222dbccdbe55e91aab02178
2017-03-06 16:48:24 -08: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
youhei.x.miyoshi
b3cd7b51d3 Disable a phone number log for user build
A phone number is privacy data. Therefore, it should be prevented
from logging in user build.

Test: manual - checked log
Bug: 34582911
Change-Id: Id040653dbfd236250e7eb07c9c2e9587ded3d63f
2017-03-06 14:53:10 +09: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
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
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
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
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
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
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
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
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
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
Tyler Gunn
6adbd2bf5f Add reason code used to tell dialer when call failed due to WFC being off.
Adding new reason code which will be sent to Dialer to display a message
to the user when the call fails to the WFC being off.

Test: Manual
Bug: 28709116
Change-Id: I155fda9a47823d6d3f68be6f07dbe64998a582ae
2016-12-07 13:19:44 -08:00
Christine Hallstrom
22de17247b Add ability to set supported audio routes on phone accounts and connection am: 4e22d6dc45
am: bad3a2ab2e

Change-Id: Ib162b2de42b636081a07d91a61406858d40e56f3
2016-12-02 03:57:13 +00:00
Christine Hallstrom
9161228e31 Add ability to set supported audio routes on phone accounts and connection
am: 4e22d6dc45

Change-Id: I5144f403e9dcdc7934fa56e045e2f95703af7ad6
2016-12-02 03:45:29 +00:00
Christine Hallstrom
4e22d6dc45 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-01 17:18:35 -08:00