Commit Graph

1182 Commits

Author SHA1 Message Date
Tyler Gunn
c63f9082a6 Telecom API updates for mainline support.
Moving some Telecom APIs into public since they are harmless to expose.
Moving some other Telecom APIs into the System API space since they're
API details specific to the TelephonyConnectionService so don't need to
be exposed in the public API.

Bug: 141576016
Test: Manual smoke test.
Test: Run unit tests.
Test: Run CTS tests.
Change-Id: Iaf75b9d671712d791f501c11536e73436908f7de
Merged-In: Iaf75b9d671712d791f501c11536e73436908f7de
2019-10-17 10:05:44 -07:00
Hall Liu
31de23da21 Add SDK compatibility code for new call states
Add code that translates the new call states to old call states for
in-call UIs that don't yet support background call screening.

Test: CTS
Bug: 140317205
Change-Id: I104f5f7ab3e3dc075e1d9ed5c64fcd924f9a977b
2019-10-11 17:59:42 -07:00
Hall Liu
360428c44a Merge "Add APIs to support background call screening" 2019-10-02 18:34:54 +00:00
Hall Liu
6dfa249c88 Add APIs to support background call screening
Add Telecom APIs and AIDL code.

Test: CTS
Bug: 140317205
Change-Id: I99970f5ce12442f307a656db76cb26f5101e6c7f
2019-10-01 17:40:32 -07:00
Brad Ebinger
a9a33e1d68 Add Telecom command for setting connectionservice filter
For testing we need the emergency call to go through the CTS
ConnectionService. This is achieved by passing in a package
name filter for testing, which restricts which ConnectionServices
are available for emergency calling.

For safety this filter will be bypassed if the user calls an
actual emergency number (instead of a test number).

Bug: 138741228
Test: atest CtsTelecomTestCases
Change-Id: I656533e4a36a7bba48625bf6f763731991695aed
2019-09-30 17:46:36 -07:00
Grace Jia
2d21e95e61 CallScreeningService API changed.
Test: manual
Merged-In: Idf44886158dcebf96e8bdffd98be3621f496deaa
Change-Id: Idf44886158dcebf96e8bdffd98be3621f496deaa
2019-09-26 14:37:19 -07:00
Brad Ebinger
99f17ced8f Expose ConnectionService Handler to remove flaky tests
Test: atest TelecomUnitTests
Change-Id: Ibb80b5739083ad9f85ee06f4d9f0017f4cb605bd
2019-09-17 10:44:11 -07:00
Aurimas Liutikas
00be951a08 Add missing nullability annotations.
To prepare for enabling MissingNullability Metalava check this CL
works on adding missing nullability issues that metalava flags if
we tell it to flag new things since API 29.

This is not a complete CL, mostly addresses public api and
toString/equals for @SystemApi

Exempt-From-Owner-Approval: Large scale nullability clean up
Bug: 124515653
Test: make -j checkapi
Merged-In: I109260842cfc25f06e40694997fcbb4afa02c867
Change-Id: I109260842cfc25f06e40694997fcbb4afa02c867
2019-08-30 00:14:44 +00:00
Brad Ebinger
4bccabef90 Merge "Prevent Infinite Recursion in Telecom Sessions"
am: 8dec6de25a

Change-Id: I779c9424dc7a1f9f14f7907bba76a24b9026ec5a
2019-08-13 10:25:44 -07:00
Brad Ebinger
839bfaf7d0 Prevent Infinite Recursion in Telecom Sessions
There looks to be a case where infinite recursion
is occuring when printing information about
Telecom Sessions. Set a reasonable limit of
iterations and throw a warning when this condition
occurs to better track down a root cause.

Bug: 139045282
Test: atest TelecomUnitTests:SessionTest
Merged-In: Iae69c5db070c5e58ae5d37c12d1c4df027138611
Change-Id: Iae69c5db070c5e58ae5d37c12d1c4df027138611
2019-08-13 00:39:44 +00:00
Brad Ebinger
0e93d73053 Add CAPABILITY_EMERGENCY_PREFERRED in PhoneAccount
Allow Telephony to mark a SIM PhoneAccount as
emergency preferred, meaning that Telecom will
override a user's PhoneAccount preference for
emergency calls if the PhoneAccount has the
CAPABILITY_EMERGENCY_PREFERRED capability.

Bug: 131203278
Test: Manual testing, Telecom/Telephony unit testing
Merged-In: If70d917cfb3d825f375d282012b8788d69a2f144
Change-Id: I88b8bbfa444f5445b2f0d6a1542c6406a19b240f
2019-07-11 17:55:37 -07:00
Tyler Gunn
6986a63325 Support indicating call direction on existing connections.
This is important for ensuring the original call direction for existing
connections added from Conference Event Packages matches the call direction
of the original calls merged into the conference.

Also moved a utility function into ConferenceParticipant from
ConferenceParticipantConnection to make it generically usable inside
Telephony.

Test: Run all unit tests.
Test: Manual testing using VoLTE conference calls with mix of MO and MT
calls; verify call logging is appropriate.
Bug: 134471046

Change-Id: Iab09397b811782ab0f876aac02070e3447d81f09
2019-06-25 13:48:29 -07:00
Brad Ebinger
a8abb52707 Merge "Make getSimCallManager msim aware" 2019-06-04 20:40:42 +00:00
Usman Abdullah
b0dc29a875 Add silence support to CallScreeningService/Call API
Test: CTS
Test: Unit Tests
Test: Manual
Bug: 126590377
Bug: 122671585

Change-Id: I4e7c67784198678eef1926759ec1d8afb98438f4
Merged-In: I4e7c67784198678eef1926759ec1d8afb98438f4
2019-06-04 15:38:07 +00:00
Tyler Gunn
7fceb2018e Merge "Fix bugs with Remote Connection Services." into qt-dev 2019-06-01 23:52:16 +00:00
Tyler Gunn
156a33b9a8 Fix bugs with Remote Connection Services.
1. A previous change was made in ConnectionServiceAdapterServant to add
another parameter, requiring the user of SomeArgs.  I think this fix is
pretty self-explanatory.  (facepalm)
2. queryRemoteConnectionServices in ConnectionServiceAdapter had an issue
where the callback would not get called if there was more than one
IConnectionServiceAdapter instances.  This isn't an error condition, but
a condition where we don't query telecom for the list of valid remote
connection services.  We ensure a callback with an empty list is made
(this is similar to what Telecom already does).
This seems to be an issue inherent with DSDS because there can be multiple
SIM ConnectionServices where before there was only one.

Test: Run CTS tests.
Bug: 133639062
Change-Id: I1c508e97d1f0ea1bc72ad7ebd026c1ad66a52de3
2019-05-31 17:53:48 -07:00
TreeHugger Robot
d28f0c8c78 Merge "Enhancements to conference for non-conference host scenarios." into qt-dev 2019-05-31 22:42:43 +00:00
Tyler Gunn
ac60f9554e Enhancements to conference for non-conference host scenarios.
When a device A creates a conference call containing device B and C, both
B and C can receive IMS signaling to indicate that they are in a conference
call.  This occurs on most domestic carriers; the Telephony framework
uses the "multiparty" indicator on the IMS call to switch the call to a
conference call.

We made some changes to how conference calls are logged in Q which improves
the accuracy of the call durations.  We used to log calls as they're merged
into a conference.  In the case of a participant in a remotely hosted
conference call, we'd log the call as soon as they are remotely added
to the conference.  This is unfortunate as the call durations are grossly
under-reported.

The conference call logging changes now assume we'll log the conference
event package children in the conference instead of the participants which
merge into the conference itself.  On domestic carriers, since the
call on B (or C) becomes a conference, we would then no longer log the
call.

This is FURTHER complicated because on some carriers, B and C will ALSO
receive a conference event package from the network showing all the
participants in the conference.  So if B hangs up on the conference, they
will have entries in their call log for A and C, which is really strange
because a call to C was never originated on their device.

In Telecom we need to ensure we do not log remotely hosted conference
participants, and we need to ensure that we DO log a remotely hosted
conference as if its just a single party call.

To accomplish this we need:
1. the address and name display information associated with the call from
A-B / A-C prior to the call turning into a remotely hosted conference.
We need this to log to the call log
2. the remotely hosted conference and participants need to be marked in a
manner that Telecom can identify them.

Test: Manual test.
Test: Add unit test to cover this logging scenario.
Bug: 132325382
Change-Id: I65e713f68d1695a48d96dacbf7faa4476cd8d815
2019-05-31 12:45:19 -07:00
Brad Ebinger
3636d74ead Add CAPABILITY_EMERGENCY_PREFERRED in PhoneAccount
Allow Telephony to mark a SIM PhoneAccount as
emergency preferred, meaning that Telecom will
override a user's PhoneAccount preference for
emergency calls if the PhoneAccount has the
CAPABILITY_EMERGENCY_PREFERRED capability.

Bug: 131203278
Test: Manual testing, Telecom/Telephony unit testing
Change-Id: I88b8bbfa444f5445b2f0d6a1542c6406a19b240f
2019-05-22 19:52:01 +00:00
Brad Ebinger
5d22b5c5fe Make getSimCallManager msim aware
When there are multiple subscriptions available,
the SIM call manager is currently resolved based
on what the default voice subscription is. Add the
ability for TelecomManager to get the SIM call
manager for a Telephony subscription ID.

Test: Manual; atest TelecomUnitTests
Bug: 131627085
Merged-In: I77fecbad6bc8f2c39a755ae0d2d2343d7a0b5db9
Change-Id: I748fcebb44f07fbc9deef0c6a07d2f15a44b22d3
2019-05-22 00:23:51 +00:00
Tyler Gunn
ac9d572269 Merge "Make queryRemoteConnectionServices DSDS aware." into qt-dev 2019-05-21 15:18:59 +00:00
Tyler Gunn
4c69fb3d7b Make queryRemoteConnectionServices DSDS aware.
The method queryRemoteConnectionServices had the issue that it assumes
there is a single connection manager for the device.  This assumption does
not work on a multisim device.  Since the ConnectionManager is associated
with a particular carrier, this means that the connection mgr for one
carrier could try to impact calls destined for another carrier.

This change ensures that the calling package is passed into Telecom so
that we can determine which RemoteConnectionServices which are available to
the calling connection manager.

Test: Manual test on DSDS with a connection mgr carrier and another carrier.
Bug: 131856987
Change-Id: I46d80dc68adaab7fd4374f023d7ba4242804c253
2019-05-17 10:49:38 -07:00
Ian Pedowitz
3bd719b534 Merge "Revert "Revert "Remove deprecated System APIs added in Q.""" into qt-dev 2019-05-15 16:28:54 +00:00
Tyler Gunn
f18ee4c9b8 Update API docs for TelecomManager#endCall.
Make it clear that ending an emergency call is not possible with this
method.

Test: Compile; this is a docs change.
Bug: 132438333
Change-Id: I736b90e31723ee2055cedf16142c4d0f494bf49b
2019-05-14 11:08:06 -07:00
Suprabh Shukla
169bed7b7a Revert "Revert "Remove deprecated System APIs added in Q.""
This reverts commit 79a19effee.

Bug: 129975435
Change-Id: I113c87f8c0b7ab225e4b99ef2462ae12e199b816
2019-05-13 21:04:39 +00:00
TreeHugger Robot
5968659e8f Merge changes from topics "role-dialer-dialog", "role-sms-dialog" into qt-dev
* changes:
  Deprecate intent action to the old changing default dialer/SMS dialogs.
  Remove TelecomManager.ACTION_CHANGE_DEFAULT_DIALER for apps targeting Q.
  Remove Telephony.Sms.Intents.ACTION_CHANGE_DEFAULT for apps targeting Q.
2019-05-11 03:01:50 +00:00
Hai Zhang
929085f3c3 Deprecate intent action to the old changing default dialer/SMS dialogs.
Bug: 124452117
Bug: 131204827
Test: presubmit
Change-Id: Iee636cf2dbcf4bdda5fc487d6883591e9463b0af
2019-05-10 17:48:30 -07:00
Brad Ebinger
e7833312d7 Make getSimCallManager msim aware
When there are multiple subscriptions available,
the SIM call manager is currently resolved based
on what the default voice subscription is. Add the
ability for TelecomManager to get the SIM call
manager for a Telephony subscription ID.

Test: Manual; atest TelecomUnitTests
Bug: 131627085
Change-Id: I748fcebb44f07fbc9deef0c6a07d2f15a44b22d3
2019-05-10 00:08:20 +00:00
Ian Pedowitz
79a19effee Revert "RESTRICT AUTOMERGE Remove deprecated System APIs added in Q."
This reverts commit 02014297fd.

Reason for revert: QT SDK Finalization. Will be merged again on/after May 13th

Bug: 129975435
Change-Id: Ia054b193a982dee669630555974d2d7831fe2b50
2019-05-02 00:54:39 +00:00
Tyler Gunn
d62c76c87c Merge "Add PhoneAccountHandle method to check if 2 accts are from same CS."
am: 09d4aba478

Change-Id: I91b75c13d087f55aec05c63a17528447e6869124
2019-04-30 13:41:33 -07:00
Tyler Gunn
09d4aba478 Merge "Add PhoneAccountHandle method to check if 2 accts are from same CS." 2019-04-30 20:30:13 +00:00
Sudheer Shanka
02014297fd RESTRICT AUTOMERGE Remove deprecated System APIs added in Q.
Test: Builds, boots
Bug: 129975435
Change-Id: I4bfd0bfbbc52b7822477ec0c70a08de6f85a3672
2019-04-30 10:49:28 -07:00
Hall Liu
8dd5bbbdf5 Merge "Make connection events work for conferences" into qt-dev 2019-04-17 18:19:52 +00:00
Hall Liu
7ae228c189 Merge "Make connection events work for conferences"
am: fc53864672

Change-Id: I2248723dfc7ce7c1488b58c6907b23bf3c713ee7
2019-04-16 19:10:04 -07:00
Hall Liu
c9bc1c6639 Make connection events work for conferences
Pipe through the onConnectionEvent call between the conference host
connection and the android.telecom.Conference object.

Fixes: 130404376
Test: manual
Change-Id: Ifad3e59dc9764aa2efb2b9766271e18853bf1c76
2019-04-16 15:06:13 -07:00
Hall Liu
a5400916be Make connection events work for conferences
Pipe through the onConnectionEvent call between the conference host
connection and the android.telecom.Conference object.

Fixes: 130404376
Test: manual
Change-Id: Ifad3e59dc9764aa2efb2b9766271e18853bf1c76
2019-04-16 14:00:55 -07:00
Tyler Gunn
b1145bd87e Merge "Add PhoneAccountHandle method to check if 2 accts are from same CS." into qt-dev 2019-04-16 14:16:33 +00:00
Tyler Gunn
c7d1078468 Add PhoneAccountHandle method to check if 2 accts are from same CS.
Add a new PhoneAccountHandle method to check if 2 phone account handles
are from the same connectionservice (package).

Test: Manual testing.
Test: Added new unit tests for this new method.
Bug: 129505115
Change-Id: I85eca54340e79d4a4f189188ae787201bab1724e
2019-04-15 17:59:34 +00:00
Tyler Gunn
6345bf6e9a Add PhoneAccountHandle method to check if 2 accts are from same CS.
Add a new PhoneAccountHandle method to check if 2 phone account handles
are from the same connectionservice (package).

Test: Manual testing.
Test: Added new unit tests for this new method.
Bug: 129505115
Change-Id: I85eca54340e79d4a4f189188ae787201bab1724e
2019-04-11 21:04:51 -07:00
Tyler Gunn
556d24003a Telecom API doc cleanup.
InCallService - remove references to roles cut in Q release.
TelecomManager - make it more clear how to use the silenceRinger method
and under which conditions it should be used.

Test: Compile; docs only.
Fixes: 130285730
Change-Id: I55f9c2df119140666f8167e8521a4372d1108e7a
2019-04-11 21:30:39 +00:00
Shuo Qian
2a5098f888 Use Received Uri as Gateway Uri
Gateway information is the core component to perform redirection.
We should clarify the uri we received from
 CallRedirectionService is gateway Uri. And apply it in Telecom.

Test: Treehugger; Manual
Bug: 130048865
Change-Id: I3599377406b88751ee11139e9a1aa5afab734f7c
Merged-In: I3599377406b88751ee11139e9a1aa5afab734f7c
2019-04-09 22:57:58 +00:00
Shuo Qian
ed0690d2bb Merge "Use Received Uri as Gateway Uri"
am: 211771cf79

Change-Id: Ibf96f72717f99d9aab112161c4ce354e1cf9e6c2
2019-04-09 10:54:30 -07:00
sqian
5f78486ac1 Use Received Uri as Gateway Uri
Gateway information is the core component to perform redirection.
We should clarify the uri we received from
 CallRedirectionService is gateway Uri. And apply it in Telecom.

Test: Treehugger; Manual
Bug: 130048865
Change-Id: I3599377406b88751ee11139e9a1aa5afab734f7c
2019-04-08 17:55:17 -07:00
sqian
3c9e9d1939 Merge "Fix documentation of CallRedirectionService"
am: 820a7b5144

Change-Id: I5025ba7b17ee7597e05f7b8c466d9b4d0a2ca80c
2019-04-08 11:17:28 -07:00
sqian
f08dd80e7c Fix documentation of CallRedirectionService
Test: sanity
Bug: 130026756
Change-Id: I48f60b3c4a465e22250aa513a4d7d73f82375426
Merged-In: I48f60b3c4a465e22250aa513a4d7d73f82375426
(cherry picked from commit 87833ee867)
2019-04-07 02:36:16 +00:00
sqian
87833ee867 Fix documentation of CallRedirectionService
Test: sanity
Bug: 130026756
Change-Id: I48f60b3c4a465e22250aa513a4d7d73f82375426
2019-04-05 16:23:37 +00:00
Tyler Gunn
4d97d127fd resolve merge conflicts of 37f6620029 to stage-aosp-master
Bug: 129531123
Test: I solemnly swear I didn't test this conflict resolution.
Change-Id: I9efdae311353efc40402db6080312d3683330c41
2019-04-04 20:54:37 +00:00
Tyler Gunn
37f6620029 Merge "Remove call identification APIs." 2019-04-04 19:35:10 +00:00
Tyler Gunn
61460ac068 Remove call identification APIs.
Removing the CallIdentification API surface.

Test: Build, run tests.
Bug: 129531123
Change-Id: I5f1451ffba04ee438df739a17472c028c44f19b2
Merged-In: I5f1451ffba04ee438df739a17472c028c44f19b2
2019-04-02 00:38:48 +00:00
Tyler Gunn
a842e76231 Remove call identification APIs.
Removing the CallIdentification API surface.

Test: Build, run tests.
Bug: 129531123
Change-Id: I5f1451ffba04ee438df739a17472c028c44f19b2
2019-04-01 17:27:12 -07:00