268 Commits

Author SHA1 Message Date
Treehugger Robot
811de5db8c Merge "Add new API to notify CallRedirectionService timed out." am: 5a5c3d7562 am: 423dd00f7f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1782287

Change-Id: I44f952574d81b1ce6cc8d0f1c1e82d638c7fc558
2021-08-10 19:07:40 +00:00
Grace Jia
5400101ec6 Add new API to notify CallRedirectionService timed out.
Currently, CallRedirectionService is unable to know if a call failed due
to timeout. Add new API to notify them and call it when Telecom wait too
long to complete a call redirection request.

Bug: 187346611
Test: CTS test
Change-Id: I65aa0a893b3e35a412851ec969f6cdec74af8fab
2021-08-10 15:37:27 +00:00
Grace Jia
3ad3cb75af Protect TelecomManager#getPhoneAccount with necessary permissions.
Bug: 183407956
Test: make, CTS test
Change-Id: I0ff68f29865c0bb2b316b3fc73d2c5adc37e4a36
(cherry picked from commit b13eb2c476fbb403646e48ded69fbc6b26f55606)
2021-06-21 18:37:05 +00:00
Brad Ebinger
a8366aeae4 Enforce READ_PHONE_STATE for APIs involving call state
For API version 31+, ensure that READ_PHONE_STATE is checked on
APIs that retrieve/notify the call state of the device.

Bug: 157233955
Test: atest CtsTelecomTestCases2 CtsTelephony2TestCases
Change-Id: I9f8674a3075d3e0f75ee4f41eefce328c0fa6b91
2021-03-25 15:11:00 -07:00
Tyler Gunn
0a1c6d1bb4 Propagate call quality reports from Telephony to CallDiagnosticService.
Complete plumbing for call quality reports to get to the CDS.

Test: Manual network testing.
Test: Modify CTS tests to cover these cases.
Bug: 163085177
Change-Id: I2bb68d29c4ad11cc8738c26cd69404fde4348843
2021-03-19 16:39:11 +00:00
Tyler Gunn
bc9ecbcfbe Propagate Telephony disconnect cause to Telecom.
Propagate telephony disconnect causes and imsreasoninfo to Telecom for
propagation to CAllDiagnosticService.

Plumb through disconnect message override in CallDiagnosticService.

Test: Added new CTS test coverage for these APIs.
Test: Manual test with telecom test app; verify the disconnect message is
overridden.
Bug: 163085177

Change-Id: I0c6938f2d0a46d535ae201364193ef58e07ec488
2021-03-10 19:02:38 -08:00
Tyler Gunn
4b033d7316 Merge "CallDiagnosticService API" am: c90335033b am: 9882ff4bf8 am: d3bf1aa209
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1607109

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie91efc29698d27946f83b751bef2fe89d612c9a2
2021-03-03 00:16:56 +00:00
Tyler Gunn
c90335033b Merge "CallDiagnosticService API" 2021-03-02 21:33:02 +00:00
Tyler Gunn
d582184178 CallDiagnosticService API
The CallDiagnosticService API is an OEM-backed API which allows an OEM
provided app to monitor the state of ongoing telephony calls on the
device and to help the user navigate connectivity or audio issues
related to these calls.  It also provides a means for the app to send
and receive device to device messages between devices during an ongoing
call (where supported) in order to facilitate a better calling experience.

Test: Added new CTS test suite for API.
Test: Manual test of CDS behavior using telecom command line option to
override the active CDS to the telecom test app implementation.
Bug: 163085177

Change-Id: I1f37408d2aa6c630f0f9e3d6b6eb8a390d804d7e
2021-02-25 23:08:29 +00:00
Shuo Qian
93273fd60d Companion InCallService API review
Test: atest; make docs
Bug: 179116441
Change-Id: Id75e727f6c3fc42132a80f7258bf790be79acf19
Merged-In: Id75e727f6c3fc42132a80f7258bf790be79acf19
2021-02-25 22:01:27 +00:00
sqian
7a2b711b00 Companion InCallService API review
Test: atest; make docs
Bug: 179116441
Change-Id: Id75e727f6c3fc42132a80f7258bf790be79acf19
Merged-In: Id75e727f6c3fc42132a80f7258bf790be79acf19
(cherry picked from commit d30bd60beb6e098b279ccb4a839c7ad89a1b6c64)
2021-02-25 20:40:12 +00:00
Hall Liu
7390314002 User arg object in onCallFilteringCompleted
In Connection#onCallFilteringCompleted, use a single data class argument
instead of making a hodgepodge of args.

Fixes: 180616846
Test: atest CtsTelecomTestCases
Change-Id: I33e80e3f59418c5d87799661c0764da029cc9f62
2021-02-18 18:52:07 -08:00
Hall Liu
5efe997539 Refactor CallScreeningService's internal structure
Use a single AIDL method and perform logic in Telecom instead of slicing
up the call response on the client side.

Also pass through the call response to the connection service.

Bug: 179412110
Test: atest ConnectionServiceTest CallScreeningServiceTest
Change-Id: I878c0ce34142da104dc0e2795487b03a6bdacb5f
2021-02-12 14:04:10 -08:00
Hall Liu
589b00177c Add Telecom command to reset car mode
Add a command to do a system-wide clobber of car mode in order to
prevent cascading CTS failures.

Fixes: 179264757
Test: manually fail one of the car mode CTS tests and observe
Change-Id: Id363e04d212c5f4d01be23e818b5c5fd1d91eac5
2021-02-03 12:32:17 -08:00
Grace Jia
4e8dc10871 Add relative APIs for InCallService that can support self-managed
connections that want to expose itself.

Add PhoneAccount#EXTRA_ADD_SELF_MANAGED_CALLS_TO_INCALLSERVICE and
Connection#onInCallServiceTrackingChanged.

Bug: 161144815
Test: CtsTelecomTestCases
Change-Id: I0a42ea79a1cd46aa9df3399c4fa2e9396321778a
Merged-In: I0a42ea79a1cd46aa9df3399c4fa2e9396321778a
2021-02-01 14:51:31 +00:00
Grace Jia
e99fde9678 Add relative APIs for InCallService that can support self-managed
connections that want to expose itself.

Add PhoneAccount#EXTRA_ADD_SELF_MANAGED_CALLS_TO_INCALLSERVICE and
Connection#onInCallServiceTrackingChanged.

Bug: 161144815
Test: CtsTelecomTestCases
Change-Id: I0a42ea79a1cd46aa9df3399c4fa2e9396321778a
2021-01-19 15:04:09 -08:00
Hall Liu
49cabccc17 Add API to inform Telephony that call filtering is complete
Add an API that gets called once call filtering finishes. Meant to
trigger download of call composer images.

Bug: 177613111
Test: atest ConnectionServiceTest

Change-Id: I4e06f19c859022ddb933f697dde13e459a3d354e
2021-01-15 17:52:37 -08:00
sqian
dfb7ca01a8 Introduce hasCompanionInCallServiceAccess API
It retruns whether the caller has InCallService access for the companion
 apps. A companion app is an app associated with a physical wearable
 device via the {@link android.companion.CompanionDeviceManager} API.

Test: cts
Bug: 169595473
Change-Id: Id659bfae8556e965d3c31613848bde808f28a858
Merged-In: Id659bfae8556e965d3c31613848bde808f28a858
(cherry picked from commit 4d0652699a88ad60c2dfdbf7b59065ee684df6d6)
2020-11-11 22:51:49 +00:00
Mathew Inwood
5d123b6775 Add maxTargetSdk restriction to unused APIs.
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.

Bug: 170729553
Test: Treehugger
Merged-In: I626caf7c1fe46c5ab1f39c2895b42a34319f771a
Change-Id: I54e5ecd11e76ca1de3c5893e3a98b0108e735413
2020-11-04 09:45:53 +00:00
Mathew Inwood
8e742f928e Add maxTargetSdk restriction to unused APIs.
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.

This is a resubmit of ag/12929664 with some APIs excluded that caused
test failures; see bugs 171886397, 171888296, 171864568.

APIs excluded:
Landroid/bluetooth/le/ScanRecord;->parseFromBytes([B)Landroid/bluetooth/le/ScanRecord;
Landroid/os/Process;->myPpid()I
Landroid/os/SharedMemory;->getFd()I
Landroid/hardware/input/InputManager;->INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH:I

Bug: 170729553
Test: Treehugger
Change-Id: I8285daa8530260251ecad6f3f38f98e263629ca7
2020-10-29 11:51:12 +00:00
Hongwei Wang
286c33a5c5 Merge "Revert "Add maxTargetSdk restriction to unused APIs."" 2020-10-28 23:58:21 +00:00
Hongwei Wang
050275cd83 Revert "Add maxTargetSdk restriction to unused APIs."
This reverts commit 72f07d6a8a32db4a0dedd7682a0b3385be2b9cd6.

Reason for revert: Droidcop-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?testMethod=testAppZygotePreload&testClass=android.app.cts.ServiceTest&atpConfigName=suite%2Ftest-mapping-presubmit-retry_cloud-tf&testModule=CtsAppTestCases&fkbb=6936597&lkbb=6936969&lkgb=6936551&testResults=true&branch=git_master&target=cf_x86_phone-userdebug>, bug b/171886397

Bug: 171886397
Change-Id: Ibe0f0430a3451477c1ee8ef56a596e91ea1e7672
2020-10-28 20:16:22 +00:00
Mathew Inwood
ee5d369323 Merge "Add maxTargetSdk restriction to unused APIs." 2020-10-28 09:39:20 +00:00
Mathew Inwood
72f07d6a8a Add maxTargetSdk restriction to unused APIs.
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.

Bug: 170729553
Test: Treehugger
Change-Id: I4c8fd0006f950de9955242e93968fb0996ceb372
2020-10-27 15:46:07 +00:00
Shuo Qian
4d0652699a Introduce hasCompanionInCallServiceAccess API
It retruns whether the caller has InCallService access for the companion
 apps. A companion app is an app associated with a physical wearable
 device via the {@link android.companion.CompanionDeviceManager} API.

Test: cts
Bug: 169595473
Change-Id: Id659bfae8556e965d3c31613848bde808f28a858
2020-10-26 16:57:38 -07:00
Brad Ebinger
ee4eca707c Modify the TelecomLoaderService to provide LocalServices to Telecom
We need access to the DeviceIdleController, which is not currently
accessible via the PowerWhitelistManager due to restrictions with
components in the same SYSTEM process accessing public APIs (see
context#enforceCallingPermission).

To get around this, we need to wrap services only available as
LocalServices using Binder to pass these services to the Telecom
code. This is all in-process (no IPC allowed), so there should be
little to no impact.

Bug: 160724034
Test: miss call and verify `adb shell cmd deviceidle tempwhitelist` contains
default dialer.
Test: atest TelecomUnitTests; atest CtsTelecomTestCases

Change-Id: I6275b550d19743e576b93f5fcd2bd3aa9ea4e1a8
Merged-In: I3d71331cbc8f01f764cc0b9704416821007feeb5
2020-10-22 21:43:02 +00:00
Brad Ebinger
4cead2c3e8 Merge "Modify the TelecomLoaderService to provide LocalServices to Telecom" into rvc-qpr-dev am: ebef1b923b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12522284

Change-Id: I3d71331cbc8f01f764cc0b9704416821007feeb5
2020-09-09 17:42:32 +00:00
Brad Ebinger
cfa3045a5b Modify the TelecomLoaderService to provide LocalServices to Telecom
We need access to the DeviceIdleController, which is not currently
accessible via the PowerWhitelistManager due to restrictions with
components in the same SYSTEM process accessing public APIs (see
context#enforceCallingPermission).

To get around this, we need to wrap services only available as
LocalServices using Binder to pass these services to the Telecom
code. This is all in-process (no IPC allowed), so there should be
little to no impact.

Bug: 160724034
Test: miss call and verify `adb shell cmd deviceidle tempwhitelist` contains
default dialer.
Test: atest TelecomUnitTests; atest CtsTelecomTestCases

Change-Id: I6275b550d19743e576b93f5fcd2bd3aa9ea4e1a8
2020-09-03 22:36:54 +00:00
Xin Li
628590d7ec Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27
Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2
2020-08-31 21:21:38 -07:00
Hall Liu
a125ea21f2 Merge "Run CtsTelecomTestCases in presubmit" am: 1b2995ca3f am: 0022d0dc37
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1334115

Change-Id: I3c242b6e16e6176f398f14f4aca58a7be0b42eae
2020-07-28 21:16:18 +00:00
Hall Liu
b5d4decf24 Add telecom command to stop block suppression
Add a Telecom command to stop the number blocking suppression that
happens after an emergency call.

Bug: 158798240
Fixes: 160667708
Test: atest CtsTelecomTestCases
Change-Id: I122de1962fb6aa48a3092c2aa323dcbdcbb8f42e
2020-07-08 11:09:26 -07:00
Hall Liu
de99d04289 Run CtsTelecomTestCases in presubmit
Run Telecom CTS in presubmit, and include a few fixes to prevent
flakiness in said presubmit.

Fixes: 158798240
Test: presubmit
Change-Id: I9b9e2f2604615e93301bc83be7c3545c6f80cb9c
2020-07-01 14:51:59 -07:00
Treehugger Robot
8c5ed53fad Merge "Add telecom command to stop block suppression" am: afe114c2f5 am: 533a19175c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1350781

Change-Id: I4cface851f70245a7efc4063e54c2943f2d0e362
2020-06-26 23:11:08 +00:00
Hall Liu
efe7351c7c Add telecom command to stop block suppression
Add a Telecom command to stop the number blocking suppression that
happens after an emergency call.

Bug: 158798240
Test: atest CtsTelecomTestCases
Change-Id: I122de1962fb6aa48a3092c2aa323dcbdcbb8f42e
2020-06-26 13:38:50 -07:00
Brad Ebinger
e0c12f4b88 Add new @hide API to pass call direction changes through Telecom
Bug: 153277327
Fixes: 154245581
Test: atest TelecomUnitTests
Merged-In: Icad12c4144bf185c24ee80bcbdd1aec29550bf4e
Change-Id: Icad12c4144bf185c24ee80bcbdd1aec29550bf4e
2020-04-20 12:14:33 -07:00
Brad Ebinger
31774ae752 Add new @hide API to pass call direction changes through Telecom
Bug: 153277327
Test: atest TelecomUnitTests
Change-Id: Icad12c4144bf185c24ee80bcbdd1aec29550bf4e
2020-04-08 17:08:10 -07:00
Automerger Merge Worker
0a04056d35 Merge "IMS: Add support for IMS Explicit call transfer" am: 12f7f43ec8 am: 4c0cd62311 am: f65d00890f
Change-Id: Ic8231acd8330c91998f0cb479a7a6fbe3ea5bda1
2020-02-19 23:19:00 +00:00
Ravi Paluri
f4b38e7ff1 IMS: Add support for IMS Explicit call transfer
Test: Manual
Bug: 62170207
Change-Id: I06a256adb0e1910d40809c91bcdd42c56a142842
2020-02-14 11:02:09 +05:30
Automerger Merge Worker
f8e30a1172 Merge changes from topic "add_participant" am: fdfc58fcd9 am: ac4f7edbd3 am: 0997ab95ae
Change-Id: I82f5641c95547646bf41a21c6ee4d4e0c4cc9aef
2020-02-13 18:50:54 +00:00
Ravi Paluri
404babbb98 Ims: Add support to add participants to existing call
Supports initiation of a conference call
by directly adding participants to existing call

Test: Manual
Bug: 62151032
Change-Id: I4e60efafab4761ae65a460fdc6c4cacc3e233220
2020-02-11 13:30:38 -08:00
Automerger Merge Worker
7a44aaf14a Merge "Add support for rejecting Telecom call with a specified reason." am: 2c12c74b33 am: d7d382e0ed am: 2505d60319
Change-Id: I3429875d187cf424917d152d13fef2a4a9c3befa
2020-01-27 18:42:14 +00:00
Tyler Gunn
facfdee122 Add support for rejecting Telecom call with a specified reason.
Adding a new Call API which supports passing a user-specified call
rejection reason down to the lower layers for reporting to the network.
Part of the VERSTAT spec involves support for this type of signaling, so
it makes sense to also support it here as well.
There are two potential types of reject reason:
declined - user declined the call because they want it to go to voicemail
or don't want to talk to the caller right now.
unwanted - this is a nuisance call and the user never wanted to receive it.

Bug: 135929421
Test: Added new CTS test to validate API pathways.
Test: Ran existing telecom and telephony unit tests.
Test: Modified test dialer app to use the new reject API and verified that
the reject reason signals down to the modem and translates to the correct
reject cause.

Change-Id: I6f25fafa2b2620e2839e5d3a9fb986f1130fa165
2020-01-23 13:10:37 -08:00
Automerger Merge Worker
cf66c12e8b Merge "Ims: Add support for Adhoc Conference calls" am: 0ab00030a2 am: cac198c770 am: a6d033fa37
Change-Id: I866deb01383fdc648822ef60304f4ca54c36b699
2020-01-22 21:49:47 +00:00
Ravi Paluri
80aa2140e3 Ims: Add support for Adhoc Conference calls
Add support for Adhoc Conference calls

Test: Manual
Bug: 62151032
Change-Id: Id50d235595d2133f867848ffdebdfe11e2f1c896
2020-01-22 03:22:58 +00:00
Philip P. Moltmann
00cf9fbf5d Send featureId to Telecomm noteOps
Bug: 136595429
Test: built
Change-Id: I23a12cd4453096e39dfd22ba556e3f3bc9d19319
2020-01-09 07:03:09 -08:00
Fan Zhang
2b2458e094 Introduce telecom api to launch emeregency dialer.
Test: manual
Bug: 136194151
Change-Id: I5c9732062e5123539343843fb9a9ae3ca7111890
Merged-In: I5c9732062e5123539343843fb9a9ae3ca7111890
2019-12-19 20:50:31 +00:00
Tyler Gunn
bf7be6def1 Merge "Car mode InCallService changes." am: 1d4fcf1703 am: 920d3e0fbf
am: bed4e9789c

Change-Id: I10f1de2db0dfc6657c7aece1e31f35da5c07a37c
2019-12-04 14:46:55 -08:00
Tyler Gunn
f701f7a765 Car mode InCallService changes.
1. Grant ENTER_CAR_MODE and CONTROL_INCALL_EXPERIENCE permissions to the
shell identity for use within CTS tests.
2. Remove un-needed Telecom shell command.

Test: unit tests, telecom CTS tests, manual testing
Bug: 144345414
Change-Id: I54a2e723d6ef9552117e6cadf4ab7c449dd5e3cb
2019-11-26 13:43:53 -08:00
Tyler Gunn
00d737bd17 More telephony updates for mainline.
Add new TelecomManager#getDefaultDialerPackage which is multiuse aware;
this is used when showing the voicemail notification.
Remove some @hide methods from Conference; push these inline.
Move ConferenceParticipantConnection into frameworks/opt/net/ims since
it is just an IMS implementation detail.

Bug: 141576016
Test: Manual smoke test.
Test: Run unit tests.
Test: Run CTS tests.
Change-Id: I39b6955cb14cc1ca68b05c620c3d09a2cdfe30c9
2019-11-11 08:28:38 -08:00
Tyler Gunn
5567d7408c More telephony updates for mainline.
Add new TelecomManager#getDefaultDialerPackage which is multiuse aware;
this is used when showing the voicemail notification.
Remove some @hide methods from Conference; push these inline.
Move ConferenceParticipantConnection into frameworks/opt/net/ims since
it is just an IMS implementation detail.

Bug: 141576016
Test: Manual smoke test.
Test: Run unit tests.
Test: Run CTS tests.
Change-Id: I39b6955cb14cc1ca68b05c620c3d09a2cdfe30c9
Merged-In: I39b6955cb14cc1ca68b05c620c3d09a2cdfe30c9
2019-11-08 21:27:32 +00:00