summaryrefslogtreecommitdiff
path: root/telecomm/java/android/telecom/ConnectionService.java
Commit message (Collapse)AuthorAgeFilesLines
* [API Review] onCreateUnknownConnectionEtienne Ruffieux2022-03-081-1/+6
| | | | | | | | | | | Cherry-picked onCreateUnknownConnection made system API from internal master, added precision on SystemAPI annotation for client modules libraries as per API review. Bug: 219820274 Tag: #feature Test: manual Change-Id: I1479201705a3ecce6fe69c2e78d30ce0b31cc3d8
* API changes requires for Bluetooth apk inside the apex to build.Roopa Sattiraju2022-01-281-6/+19
| | | | | | Bug: 216731966 Test: Compile and Test Change-Id: Ia9c09fb9ca83141419c9f41ef5c248385fb5a9c0
* Add unit test init method.Tyler Gunn2021-04-061-0/+9
| | | | | | | | | | | When trying to write some connectionservice unit tests, it became clear that the mAreAccountsInitialized precondition adds a LOT of overhead and test scaffolding. It was easier to just be able to bypass that in the unit tests. Test: Added as part of unit test. Bug: 178649879 Change-Id: Ibed3e69215dad59b252193f701508c18f43b59a2
* Merge "Annotation and doc improvement for adhoc conference APIs." am: ↵Grace Jia2021-03-121-16/+20
|\ | | | | | | | | | | | | | | | | | | 0251d617a5 am: e4bc4e9ca5 am: 3e96c1328c Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1412812 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ie849bba0805a1a43a841ae204337c12d3f5d9791
| * Merge "Annotation and doc improvement for adhoc conference APIs."Grace Jia2021-03-111-16/+20
| |\
| | * Annotation and doc improvement for adhoc conference APIs.Grace Jia2021-01-201-16/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Annotate Conference#onAnswer with @VideoState Mark parameters of adhoc conference APIs with @NonNull. Document the distinction between returning null and returning a failed conference. Bug: 165801368 Test: make Change-Id: Ic0bd1a1e431ca0dec52afc8a28996929684236ba
* | | Merge "Add onBindClient for testing" am: 53252b14e5 am: 40a22b24b0 am: ↵Hall Liu2021-03-101-0/+9
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8c022a831a Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1625243 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I2e05f57f4ec6b01082c0e1eac97a2a23ce677cbd
| * | Add onBindClient for testingHall Liu2021-03-091-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add an overrideable method in ConnectionService that gets called when telecom binds, since onBind is final and it's unsafe to make not-final. Bug: 181057509 Test: atest CtsTelecomTestCases Change-Id: I80088185402789fec499b8659ca8b74bcec05748
* | | User arg object in onCallFilteringCompletedHall Liu2021-02-181-24/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | In Connection#onCallFilteringCompleted, use a single data class argument instead of making a hodgepodge of args. Fixes: 180616846 Test: atest CtsTelecomTestCases Change-Id: I33e80e3f59418c5d87799661c0764da029cc9f62
* | | Merge changes from topics "call-screening-refactor", ↵Hall Liu2021-02-171-6/+19
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | "composer-call-screening" into sc-dev * changes: Add APIs to support call composer filtering Refactor CallScreeningService's internal structure
| * | | Refactor CallScreeningService's internal structureHall Liu2021-02-121-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Merge "Set default value of EXTRA_ADD_SELF_MANAGED_CALLS_TO_INCALLSERVICE ↵Grace Jia2021-02-111-1/+1
|\ \ \ \ | |/ / / |/| / / | |/ / | | | | | | | | | | | | | | | | | | true." am: f67a99fe60 am: a8cafc65ff am: b609dab7b7 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1571460 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I5cb615dd3bceee20b3fb43977a6792abc14302b4
| * | Set default value of EXTRA_ADD_SELF_MANAGED_CALLS_TO_INCALLSERVICEGrace Jia2021-02-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | true. Self-managed connections need to bind to special in-call service in order to expose itself to bluetooth stack. Bug: 178679937 Test: Manually use duo to make self-managed calls and make sure it's audible on BT Change-Id: I7c3c56e9c65d43f598645aee5842e97fd73d300e
| * | Add relative APIs for InCallService that can support self-managedGrace Jia2021-02-011-4/+85
| |/ | | | | | | | | | | | | | | | | | | | | | | 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
* | Fix faulty log statementHall Liu2021-02-021-1/+1
| | | | | | | | | | | | Bug: 177613111 Test: manual Change-Id: I95830d4af1542671e6a06596e2661d41f124838e
* | Add relative APIs for InCallService that can support self-managedGrace Jia2021-01-191-4/+84
| | | | | | | | | | | | | | | | | | | | | | 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
* | Add API to inform Telephony that call filtering is completeHall Liu2021-01-151-0/+41
|/ | | | | | | | | | 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
* Use phoneAccountHandle based on connectionSungjae2020-10-191-2/+4
| | | | | | | | | | | | | | After triggering dial, phoneAccountHandle can be changed. In this case, the stack to which dial is requested and the stack to be displayed on the UI can be different. So, modified to use phoneAccountHandle which base on connection, not request. Bug: 168681491 Test: manual Signed-off-by: Sungjae <sung_jae.kim@samsung.com> Change-Id: I56ac5b2d4f1b5e8d78741a43a332b025af7e4d54
* Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)Xin Li2020-08-311-29/+29
|\ | | | | | | | | | | Bug: 166295507 Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27 Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2
| * Improve connection manager logging.Tyler Gunn2020-05-051-29/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. In ConnectionService, upping the incoming log level to info from debug; this ensures we can better trace whether methods are actually called. 2. Added the ability in the logging class to get a new external session which supplies the owner info which will be passed in to the recipient of the external session. This allows Telecom or a connection manager to pass in a package abbreviation which will form the calling owner info when the receiver continues the external session. 3. Add owner info to the Session.Info class so it can be passed about. 4. Ensure owner info is copied when getting Session.Info; subsessions were not showing the owner info in the past; this corrects that. 5. When retrieving the external session info, creating a "package call stack" with the owner info. This lets us see the hierarchy of where calls originated. Example: cad/cast/ccme Shows that com.android.dialer send a message to com.android.server.telecom which relayed a message to com.connection.manager.example. 6. Start sessions in RemoteConnection API methods and pass along external session info. This bridges session tracing across a connection manager so we can now trace a method call all the way from dialer, through telecom, through the connection manager, and finally into telephony. Test: Manual call testing with connection manager to verify log behavior. Bug: 153899641 Change-Id: I4518a50550203818374b4e0b52eccb84ffd561dc
| * Improve remote connection logging.Tyler Gunn2020-04-171-2/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL improves traceability of calls initiated via a remote connection service. For regular incoming/outgoing calls, when initiating a request to create a remote connection in RemoteConnectionService, we set EXTRA_REQUESTING_PACKAGE_NAME in the parcelled request to the package name of the connection manager. In ConnectionService this serves as an indicator that the incoming request is via a connection manager and is used to trigger setting of EXTRA_REMOTE_PHONE_ACCOUNT_HANDLE with the phone account handle the remote connection service uses to place the call. For conferences and existing connections, the initial request is from the remote connection service to the connection manager so we can just set the EXTRA_REMOTE_PHONE_ACCOUNT handle there directly. Also cleaned up logging in the telecom session logging to remove the assumption that the ownerInfo is an incall service. Test: Manual testing with connection manager to verify logging. Fixes: 154353494 Change-Id: Iee1b5cfd3334a5de08d7b04022b7c6d5af6a4b04
| * Merge "Ensure conference state is posted to Telecom for new conferences." ↵Tyler Gunn2020-04-141-0/+5
| |\ | | | | | | | | | into rvc-dev
| | * Ensure conference state is posted to Telecom for new conferences.Tyler Gunn2020-04-101-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is an edge-case where an IMS conference fails to merge two participants into a conference, AND the conference event package comes in before the ImsCall indicates it is multiparty. In this case, the CEP will have a single participant which means we'll treat the call as a standalone call. ImsConference correctly sets the conference state, but this was previously just passed along the ConnectionService adapter to Telecom. In this case the conference isn't even added to Telecom so the method call in effect does nothing. Changed to cache the conference state and ensure when adding the conference to Telecom that we call the setConferenceState method (yeah, could have put this in the ParcelableConference, but this is an edge case). Test: Wrote unit test to verify property is set. Fixes: 134047008 Change-Id: Ib48437abb1295d147e227727ce4ff2996f28b5de
| * | Add a new call direction parameter to conferences for multipartyBrad Ebinger2020-04-091-36/+36
| |/ | | | | | | | | | | | | | | | | | | 1) Refactor ParcelableConference - too many optional params 2) Add a new call direction parameter for external multiparty call scenarios, where a conference is assigned a direction. Bug: 153595501 Test: atest TelecomUnitTests TeleServiceTests Change-Id: Icb576a07b9a7a81e228babfea53474be83da7593
| * Add new @hide API to pass call direction changes through TelecomBrad Ebinger2020-04-081-0/+8
| | | | | | | | | | | | Bug: 153277327 Test: atest TelecomUnitTests Change-Id: Icad12c4144bf185c24ee80bcbdd1aec29550bf4e
| * Hide adhoc conference APIs.Tyler Gunn2020-03-251-0/+4
| | | | | | | | | | | | | | | | Most of this was previously hidden; these last stragglers were missed. Test: make update-api ; verify hidden Fixes: 152394802 Change-Id: I41bda5b8ad368e1c88e4dd9e45d978a111a22e53
* | Merge "Add adhoc conference APIs to RemoteConnection and ↵Grace Jia2020-08-131-0/+36
|\ \ | | | | | | | | | RemoteConnectionService."
| * | Add adhoc conference APIs to RemoteConnection andGrace Jia2020-08-111-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RemoteConnectionService. Plumb through the adhoc conference APIs via these new APIs. Bug: 159944852 Test: atest CtsTelecomTestCases:RemoteConnectionTest Change-Id: Icfa27e0616dd35ba350f7a491e5c95337a286b9d
* | | Merge "Improve remote connection logging."Tyler Gunn2020-08-121-2/+42
|\ \ \ | |/ / |/| |
| * | Improve remote connection logging.Tyler Gunn2020-08-051-2/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL improves traceability of calls initiated via a remote connection service. For regular incoming/outgoing calls, when initiating a request to create a remote connection in RemoteConnectionService, we set EXTRA_REQUESTING_PACKAGE_NAME in the parcelled request to the package name of the connection manager. In ConnectionService this serves as an indicator that the incoming request is via a connection manager and is used to trigger setting of EXTRA_REMOTE_PHONE_ACCOUNT_HANDLE with the phone account handle the remote connection service uses to place the call. For conferences and existing connections, the initial request is from the remote connection service to the connection manager so we can just set the EXTRA_REMOTE_PHONE_ACCOUNT handle there directly. Also cleaned up logging in the telecom session logging to remove the assumption that the ownerInfo is an incall service. Test: Manual testing with connection manager to verify logging. Bug: 154353494 Fixes: 155097158 Merged-In: I916750e0f558db1eb9e581bab7a9fbc71f781709 Change-Id: Iee1b5cfd3334a5de08d7b04022b7c6d5af6a4b04
* | | Merge "Update language to comply with Android's inclusive language guidance"Tyler Gunn2020-07-301-0/+1
|\ \ \ | |/ / |/| |
| * | Update language to comply with Android's inclusive language guidanceTyler Gunn2020-07-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | See https://source.android.com/setup/contribute/respectful-code for reference Test: Presubmit Bug: 161896447 Change-Id: I4142f4819f5ed3e2ffddf471b90923985e72523a
* | | Expose adhoc conference calling API as public.Grace Jia2020-07-271-9/+7
|/ / | | | | | | | | | | Bug: 159944852 Test: make Change-Id: I2cf39a6fd8a02ca4f2d0c83c484ab12bb13f74c3
* | Ensure conference state is posted to Telecom for new conferences.Tyler Gunn2020-05-111-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is an edge-case where an IMS conference fails to merge two participants into a conference, AND the conference event package comes in before the ImsCall indicates it is multiparty. In this case, the CEP will have a single participant which means we'll treat the call as a standalone call. ImsConference correctly sets the conference state, but this was previously just passed along the ConnectionService adapter to Telecom. In this case the conference isn't even added to Telecom so the method call in effect does nothing. Changed to cache the conference state and ensure when adding the conference to Telecom that we call the setConferenceState method (yeah, could have put this in the ParcelableConference, but this is an edge case). Test: Wrote unit test to verify property is set. Bug: 134047008 Fixes: 155097934 Merged-In: I203880c593f6bac471a06eb9dcbb529d0bb75ba5 Change-Id: Ib48437abb1295d147e227727ce4ff2996f28b5de
* | Merge "Add a new call direction parameter to conferences for multiparty"Brad Ebinger2020-04-231-36/+36
|\ \
| * | Add a new call direction parameter to conferences for multipartyBrad Ebinger2020-04-201-36/+36
| |/ | | | | | | | | | | | | | | | | | | | | | | 1) Refactor ParcelableConference - too many optional params 2) Add a new call direction parameter for external multiparty call scenarios, where a conference is assigned a direction. Bug: 153595501 Fixes: 154246448 Test: atest TelecomUnitTests TeleServiceTests Merged-In: Icb576a07b9a7a81e228babfea53474be83da7593 Change-Id: Icb576a07b9a7a81e228babfea53474be83da7593
* | Merge "Hide adhoc conference APIs."Tyler Gunn2020-04-221-0/+4
|\ \
| * | Hide adhoc conference APIs.Tyler Gunn2020-04-221-0/+4
| |/ | | | | | | | | | | | | | | | | | | Most of this was previously hidden; these last stragglers were missed. Test: make update-api ; verify hidden Bug: 152394802 Fixes: 153376610 Merged-In: I90e05379d3c779bdc6b64e3ff68513bb3f302456 Change-Id: I41bda5b8ad368e1c88e4dd9e45d978a111a22e53
* / Add new @hide API to pass call direction changes through TelecomBrad Ebinger2020-04-201-0/+8
|/ | | | | | | | Bug: 153277327 Fixes: 154245581 Test: atest TelecomUnitTests Merged-In: Icad12c4144bf185c24ee80bcbdd1aec29550bf4e Change-Id: Icad12c4144bf185c24ee80bcbdd1aec29550bf4e
* IMS: Add support for IMS Explicit call transferRavi Paluri2020-02-141-0/+72
| | | | | | Test: Manual Bug: 62170207 Change-Id: I06a256adb0e1910d40809c91bcdd42c56a142842
* Merge "API Review cleanups."Tyler Gunn2020-02-131-5/+4
|\
| * API Review cleanups.Tyler Gunn2020-02-131-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - New @SystemApis on Conference and PhoneAccount were missing the required permissions annotations. - Rename PROPERTY_ASSISTED_DIALING_USED to PROPERTY_ASSISTED_DIALING - Standardize get/setConnectionStartElapsedRealtimeMillis method naming across Connection and Conference classes. - Clarify Conference#sendConferenceEvent API documentation to match the docs present for similar method in Connection; include some examples of valid event/extras combinations. - Update TelecomManager#getDefaultdialerPackage to use UserHandle instead of userId. - Move Conference#getConnectionStartElapsedRealtimeMillis to public API since the setter is already part of the public API. Test: Run Telecom and Telephony CTS tests. Test: Run Telephony unit tests. Test: Perform manual single-party-conference regression test to confirm that conference behavior does not regress. Bug: 147301297 Bug: 148286830 Bug: 148284863 Bug: 148284843 Bug: 148287068 Bug: 148285484 Bug: 148285560 Change-Id: I1f446d81859fa109d74af3661a42a0bd224de5aa Merged-In: I1f446d81859fa109d74af3661a42a0bd224de5aa
* | Ims: Add support to add participants to existing callRavi Paluri2020-02-111-0/+41
|/ | | | | | | | | Supports initiation of a conference call by directly adding participants to existing call Test: Manual Bug: 62151032 Change-Id: I4e60efafab4761ae65a460fdc6c4cacc3e233220
* Add support for rejecting Telecom call with a specified reason.Tyler Gunn2020-01-231-0/+32
| | | | | | | | | | | | | | | | | | | | 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
* Ims: Add support for Adhoc Conference callsRavi Paluri2020-01-221-3/+384
| | | | | | | | Add support for Adhoc Conference calls Test: Manual Bug: 62151032 Change-Id: Id50d235595d2133f867848ffdebdfe11e2f1c896
* Add Verstat fields to Telecom call/connection classes.Tyler Gunn2019-12-021-2/+4
| | | | | | Test: Added new CTS tests to verify operation. Bug: 135929421 Change-Id: I42360dad677060e03ecec865f31145b1760cf46a
* More telephony updates for mainline.Tyler Gunn2019-11-081-3/+13
| | | | | | | | | | | | | | | 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
* Expose ConnectionService Handler to remove flaky testsBrad Ebinger2019-09-171-0/+10
| | | | | Test: atest TelecomUnitTests Change-Id: Ibb80b5739083ad9f85ee06f4d9f0017f4cb605bd
* Support indicating call direction on existing connections.Tyler Gunn2019-06-251-1/+2
| | | | | | | | | | | | | | | | | 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
* Enhancements to conference for non-conference host scenarios.Tyler Gunn2019-05-311-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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