Commit Graph

145 Commits

Author SHA1 Message Date
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
Treehugger Robot
0ab00030a2 Merge "Ims: Add support for Adhoc Conference calls" 2020-01-22 21:16:19 +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
Hall Liu
ef98bf8300 Add additional APIs in Call for Bluetooth
Add additional APIs in android.telecom.Call for consumption by Bluetooth
as they move to using an InCallService.

Also refactor ParcelableCall to use a builder pattern

Fixes: 147445725
Fixes: 147445603
Test: atest CallDetailsTest ConferenceTest
Change-Id: I12241b4ceadaa840f6e577bcfa8521375aedcb6a
2020-01-15 11:17:18 -08:00
Artur Satayev
53ada2ab28 Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv \
      git diff HEAD^ HEAD | grep '^[+-][^+-]' | grep -v '.import'
Merged-In: I853372f3c6fef905553bb31be4f1bb48df735f7a
Change-Id: I853372f3c6fef905553bb31be4f1bb48df735f7a
2020-01-14 15:54:55 +00:00
Austin Wang
a63a2c0130 Revert "Use new UnsupportedAppUsage annotation."
This reverts commit a5264903e2.

Reason for revert: Droidcop-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_master&target=sdk_phone_armv7-sdk&lkgb=6083299&lkbb=6085371&fkbb=6083313, bug b/146533269

Change-Id: Ie5b031d7b277cf0e09b0a9776b26bf74f5f69e70
2019-12-19 06:38:19 +00:00
Artur Satayev
a5264903e2 Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv \
      git diff HEAD^ HEAD | grep '^[+-][^+-]' | grep -v '.import'
Change-Id: I087bb1cecbe59f1cf0c2e770c735d7a433722c6f
2019-12-18 12:07:36 +00:00
Tyler Gunn
4efe689e4c Merge "Add Verstat fields to Telecom call/connection classes." 2019-12-05 23:58:45 +00:00
Hall Liu
cebf791676 Merge "Change name of setShouldScreenCallFurther" 2019-12-04 00:28:48 +00:00
Tyler Gunn
d57d76c371 Add Verstat fields to Telecom call/connection classes.
Test: Added new CTS tests to verify operation.
Bug: 135929421
Change-Id: I42360dad677060e03ecec865f31145b1760cf46a
2019-12-02 13:59:17 -08:00
Tyler Gunn
398794c0a6 Merge "Cleanup video provider binder code." 2019-11-12 20:47:38 +00:00
Tyler Gunn
d1fdf3a85b Cleanup video provider binder code.
1. Ensure we always unlink for death from the VideoCallImpl.
2. Ensure we compare the binders in the Call instance properly so that
we are not always replacing the VideoCallImpl used.
3. Ensure we cleanup the VideoCallImpl when its being removed.

Test: Manual testing of video calls for regressions.
Bug: 121156974
Change-Id: I440e8fb4ab9a5051ee02358933c495de736e2bd0
2019-11-12 10:43:09 -08:00
Hall Liu
69554cff8d Change name of setShouldScreenCallFurther
Change the name of the method to setShouldScreenCallViaAudioProcessing
Also remove some commented out lines

Fixes: 143564665
Test: CTS
Change-Id: Ib163e3dad49ad2301238256339be9bb3ba5fec3a
2019-11-11 17:44:09 -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
Hall Liu
e87b7156c9 Merge "Add logging values for new call states" 2019-10-22 23:10:58 +00:00
Hall Liu
4e35b64bc3 Add logging values for new call states
Add the string values for the new call states so we don't get warnings
about unknown states in the logs.

Bug: 140317205
Test: manual
Change-Id: Ia6a27179639748287436a0785a03201985d8ab50
2019-10-14 17:50:45 -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
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
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
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
94f8f11342 Call Screening / Caller ID API Changes
- Fix bug in call identification parcelable; was reversing the app name
and package name.
- Add @hide RoleManager consts for the Telecom roles; this will be
replaced by values in the library for public consumption as a later
date.
- Add new call direction attribute to the Call.Details class; this is
needed so that a CallScreeningService can know if a call is incoming
or outgoing.  This way it knows whether it needs to perform call blocking
or just caller ID.
- Update CallScreeningService API docs to explain how to request the
call screening role.
- Update InCallService API docs to explain the 3 roles related to this
service and how you declare an appropriate IncallService to fill each of
them.

Bug: 63966743
Test: Manual, CTS
Merged-In: Ic4547b8ead791690305f7be58e43272c4155b7fb
Change-Id: Ic4547b8ead791690305f7be58e43272c4155b7fb
2019-01-29 14:45:55 -08:00
Tyler Gunn
d081f04bbe Add CallerIdentification to CallScreeningService API.
Updating the CallScreeningService to support passing call identification
information for incoming/outgoing calls.
Updating call log to log call identification information.

Bug: 63966743
Test: Manual with test app.
Merged-In: Ie6c172c09007eb5f4853d36ae0a99b782bfb5ddb
Change-Id: Ie6c172c09007eb5f4853d36ae0a99b782bfb5ddb
2019-01-11 11:26:48 -08:00
Tyler Gunn
c3275b673c Merge "Update CallScreeningService API docs." 2018-12-14 15:06:53 +00:00
Hall Liu
34d9e24008 Add docs and more annotations
Add docs to some constants in PhoneAccountSuggestion and add @TestApi
annotations to enable CTS testing for the new APIs.

Test: compiles
Bug: 111455117

Change-Id: I2b55a411ff4f0da37eefa0996f7316ea53bca41d
2018-12-10 18:41:01 -08:00
Tyler Gunn
3cd820f66d Update CallScreeningService API docs.
Cleanup some formatting issues.
Update the docs to more clearly indicate what data will be passed
to the CallScreeningService about a call.
Update the docs to clearly indicate the new behavior for setSkipCallLog
with respect to logging of calls.

Bug: 63966743
Test: API doc only change; build.
Merged-In: I5daeea32f6cfbef1b94105a826925a878ac98596
Change-Id: I5daeea32f6cfbef1b94105a826925a878ac98596
2018-12-07 21:42:01 +00:00
Tyler Gunn
6e3ecc40f8 Unsupported app usage API cleanup
This CL includes a number of cleanups related to unsupported app usage
tags.

TelecomManager#EXTRA_IS_HANDOVER - public APIS exist for this usecase;
updated docs and limit to P with maxtarget sdk.
TelecomManager#getSimCallManager(int userId) - marked as max target P;
there is a public API available which can be used to accomplish the same
thing.  Nobody should be calling this.
TelecomManager#getCallCapablePhoneAccounts(boolean) - marked as max
target P; callers should use the version without the boolean parameter.

Deprecate CAPABILITY_CAN_UPGRADE_TO_VIDEO; its redundant.

New public API:
Promote TelecomManager#getSystemDialerPackage() to public API; its a
benign API and doesn't expose anything which can't be inferred other ways.

New system APIs:
TelecomManager#getCurrentTtyMode() - used by settings app.
TelecomManager#setDefaultDialer() - used by useful for settings app.
TelecomManager#TTY_MODE* constants - used by getCurrentTtyMode API.

Test: Compile / run unit tests
Bug: 119305590
Change-Id: I67d6213e6c689fb545fc9ceae4a359831f97c32f
2018-11-12 11:30:56 -08:00
Tyler Gunn
80a5e1e940 Add PROPERTY_VOIP_AUDIO_MODE to android.telecom.Call.
This property is used to report the voip audio mode requested by the
underlying connection.  This is useful for ringing calls and held calls
where the current system audio mode will not necessarily match what the
Connection would use.

Test: Added and ran new CTS tests.
Bug: 110540796
Change-Id: I8c26db4b35de4d40d7b76b3c1adc93223afa104b
2018-10-31 15:09:17 -07:00
Tyler Gunn
6b6ae55f72 Update PROPERTY_HIGH_DEF_AUDIO API docs.
Make it more clear that the intention of the property is to convey whether
a call is high definition on the UI or not, and NOT to report the actual
audio codec in use.

Test: Build
Bug: 78550833
Change-Id: Id002cd1c9cc1d5aea6f8d9ab4e3d99956b7c42b2
2018-10-11 10:42:10 -07:00
Tyler Gunn
5604cc2516 Merge "Mark event-based handover constants as deprecated." 2018-09-26 04:18:35 +00:00
Tyler Gunn
5bd90853a5 Add support for network identified emergency calls.
Add support for the IMS call profile to indicate that a call is an
emergency call.
Add supporting connection and call properties so that this can be
propagated to Telecom and ultimately the Dialer app.
Add System API to determine if the device is in a network IDed or dialed
emergency call (used in Telephony).

Test: Manual test using test intents and ecclist property.
Test: Added new telecom unit tests.
Bug: 77565333
Change-Id: I769e7b5000b10662c08fe53c91ef99edc685d2b1
2018-09-21 09:37:07 -07:00
Tyler Gunn
1a505fa8c8 Mark event-based handover constants as deprecated.
With the introduction of supported APIs in P, these event-based prototype
constants are no longer needed.

Test: Manual testing with test app
Bug: 110846969
Change-Id: Ic453923f57eb30d9ae7e1ee3c8ff07420e79f597
2018-09-14 13:36:38 -07:00
Mathew Inwood
42346d1dd2 Add @UnsupportedAppUsage annotations
For packages:
  android.telecom.Logging
  android.telecom

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I540cb034b933c0d1417a138747ed347fcf0748d7
Merged-In: I04a94d7555be608dc3958787554a3d33b72158ec
2018-08-01 11:33:05 +01:00
Tyler Gunn
5c60d71efb Rename handover failure constant per API review comments.
Expanding EMERG to EMERGENCY.

Test: Build code
Bug: 74831393
Change-Id: Ib7e6bea84e25b1e1a2ddb154c7ed62f1084a7596
2018-03-16 12:38:43 -07:00
Treehugger Robot
8882c55b21 Merge "API Documentation and Constant cleanup." 2018-03-07 19:33:52 +00:00
Tyler Gunn
9d12773b51 API Documentation and Constant cleanup.
1. Update handover API docs for clarity.
2. Added an unknown value per API review comments.
3. Renamed HANDOVER_FAILURE_DEST_USER_REJECTED to
HANDOVER_FAILURE_USER_REJECTED
3. Removed the HANDOVER_FAILURE_DEST_INVALID_PERM constant since it isn't
used (methods which deal with permissions throw security exceptions).

Test: Make doc and verify documentation.
Change-Id: Id21d6b4c83d5c773ab38d78eb6b1886a1ac4dadf
Fixes: 73751004
Fixes: 73750515
Fixes: 73750817
2018-03-02 15:45:51 -08:00
Hall Liu
e9041241de RTT bugfixes, part 5
* Add a new API to allow Telecom to inform ConnectionServices when the
RTT text stream changes
* No longer set the RTT property from ConnectionService. Client apps
should be setting properties themselves.
* Add Dialer-side RTT property in order to remove the dependence on
checking the RTT streams, which have a complex lifecycle

Bug: 72951201
Bug: 72648661
Test: manual, with real RTT calls and Dialer's SimulatorConnection, also
cts
Change-Id: Ic4c7d883d2dc6baf8e8c0eaa4df58d7de8762b9e
Merged-In: Ic4c7d883d2dc6baf8e8c0eaa4df58d7de8762b9e
2018-02-22 03:19:19 +00:00
Pooja Jain
d34698def5 IMS: Add support in frameworks for call deflection feature
Call deflection feature is useful to deflect MT call to another
number.

Test: Manual

Bug: 62170348
Change-Id: Idfbcc175a856aa0bb9476f8c73d7a614a3af0700
2018-02-07 12:29:16 +05:30
Tyler Gunn
858bfaf79c Add handover permission, fill in some missing API gaps.
Adding the ACCEPT_HANDOVER runtime permission which an app must have in
order to accept handovers (this is per design).

Adding missing onHandoverComplete method in the android.telecom.Connection
API (per design).

Finishing plumbing for android.telecom.Call#onHandoverComplete API.

Fix issue where the new handover API methods would never get called; the
legacy handover extra was being used in this case when it should not have
been.

Bug: 65415068
Test: Verified using new CTS tests
Change-Id: If1558f6a23911862c02ac5b18fb62d86911ed7e2
Merged-In: If1558f6a23911862c02ac5b18fb62d86911ed7e2
2018-01-25 16:20:03 -08:00
Sanket Padawe
f6a9e5b6e0 Add permission check for old call handover apis.
Bug: 65415068
Test: manual
Change-Id: I4784debf1be255de24c341fe5474fc529bc1cebe
2018-01-12 10:17:42 -08:00
Sanket Padawe
85291f63c9 Implement Call handover initiation side APIs.
Bug: 65415068
Test: Manual

Design doc:
https://docs.google.com/document/d/1qY3oAzjff_4A1ttYb_CGrE_OwTRmXMG_KGsIuPT1ey8/edit#

Change-Id: I692bb14fba66733154378c2dda525aa85c471a38
Merged-in: I692bb14fba66733154378c2dda525aa85c471a38
2017-12-19 16:32:24 -08:00
Eric Erfanian
ec88187e62 Add assisted dialing properties to the framework.
These properties allow the feature to be propogated from
the outgoing call broadcast, to the connection, to the call,
and finally to the call log as a feature.

Test: no existing unit tests found. could use some pointers
Bug: 35963245
Change-Id: I3ed8ac5ad7300c44f87e2573d9409b3a92b98ab6
Merged-In: I84343fb0cda16514c01997fd71d1e819b5b7eebb
2017-12-12 09:45:01 -08:00
Sanket Padawe
c376ca6bc1 Merge "API declarations for Call Handover."
am: d88abc7b60

Change-Id: I0be6f240073408bf9520766238ecf791c016a40b
2017-11-16 01:45:25 +00:00
Sanket Padawe
a8eddd48c4 API declarations for Call Handover.
Design doc:
https://docs.google.com/document/d/1qY3oAzjff_4A1ttYb_CGrE_OwTRmXMG_KGsIuPT1ey8/edit#

Bug: 65415068
Test: manual.
Change-Id: I0c2f561d92ad6504f858eadde09980fc1ce8727f
2017-11-15 13:41:05 -08:00
Hall Liu
b1c8a77f59 Do not throw IOException from RttCall.read()
Modify the signature of read() to no longer throw an IOException

Change-Id: Ib5a1d8615a4bd66716a54c53865a2d560f33de83
Test: builds
Fixes: 63769529
2017-08-02 16:27:52 -07:00
Tyler Gunn
b22077600a Merge "Define handover event sent when source disconnects prior to handover." into oc-dr1-dev am: 06c32f21fc
am: f141183abe

Change-Id: Ibd0612f738dfa727cb0c110ed801f568fc9c7f65
2017-06-23 21:17:14 +00:00
Tyler Gunn
34a2b31e95 Define handover event sent when source disconnects prior to handover.
Define new event which is sent to the destination call if the source
disconnects prior to the completion of the handover.

Test: Manual using test app
Bug: 62904673
Change-Id: I9fa74e374f78beb801f08ce1fd7260d7d7fe7cac
2017-06-23 08:32:00 -07:00
Jeff Sharkey
9039636535 Revert "Hide APIs not intended to ship in DR."
This reverts commit 0c28d43fe1.
2017-06-12 16:26:53 -06:00
Jeff Sharkey
0c28d43fe1 Hide APIs not intended to ship in DR.
This CL will be reverted once it merges into the next release branch
to re-introduce the proposed APIs.

This CL also makes the following code changes to preserve API
compatibility:

-- It keeps the recently added RemoteViews.clone() synchronized logic
intact, but moves it inside the method to avoid changing the API
signature.

-- It reverts the RttCall.read() behavior to the oc-dev logic, since
we can't throw IOException until we get an API level bump.  (The
original logic returned null instead of throwing.)

Test: builds, boots
Bug: 62427252, 62431886, 62427329
Bug: 62468911, 62431162, 62428935, 62429096
Bug: 37290820, 37359238, 36886243
Bug: 30143923, 35761231, 62192626, 29829689
Change-Id: I83d723f598cb0ee1fe198e65debd86ef7fd0420c
2017-06-12 10:26:01 -06:00
Tyler Gunn
9f6f04733e Further handover support changes.
Add handover extras key used when initiating handover.
Add handover complete / fail connection events which are sent to the
initiating IncallService when a handover is complete or fails.
Adding PhoneAccount extra to indicate that a self-managed CS should have
its calls logged to the call log.

Test: Manual
Bug: 37102939
Change-Id: Icbb6f1addf913de841a9c48089a7d8311668f3bc
2017-04-26 21:32:01 +00:00
Tyler Gunn
8bf7657357 Add connection handover APIs.
Add new call/connection event keys for handover.
Add TelecomManager extra keys used for handover.
Add PhoneAccount extra keys used to control availability of handover.

Test: Test app/harness.
Bug: 37102939
Change-Id: Icc5db7209362f04c4e3be397fee692bbf4a6a473
2017-04-10 22:12:45 +00:00