1664 Commits

Author SHA1 Message Date
Anton Hansson
ee8c25823d Remove @TestApi from @SystemApi symbols
I ran these commands:
    cd frameworks/base
    grep -rl '@TestApi' --include '*.java' | xargs perl -i -p0e \
        's/\@SystemApi[\s\n]+(\@\w+[\s\n]+)?\@TestApi/\@SystemApi\1/gs'
    grep -rl '@TestApi' --include '*.java' | xargs perl -i -p0e \
        's/\@TestApi[\s\n]+(\@\w+[\s\n]+)?\@SystemApi/\1\@SystemApi/gs'

Bug: 171179806
Test: m checkapi
Change-Id: I772790b783b0a8730b8bf680c9e569a886b8d789
Merged-In: I772790b783b0a8730b8bf680c9e569a886b8d789
2020-10-19 19:08:26 +01: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
Tyler Gunn
460b7d49a1 Update audio processing API docs.
Updating the audio processing API docs to mention the fact that the app
must indicate in their InCallService and CallScreeningService service
entries that the service type is for "microphone" access, otherwise
background audio access will not be permitted.

Test: Docs only change.
Bug: 156042528
Change-Id: I3576dba445497791e6fa4e0a2fa42cf10eb1df5b
2020-05-15 10:19:32 -07:00
Tyler Gunn
6b0cfc3878 Improve connection manager logging.
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: Ic081237737359aadbec8a8a0b0640c9e31443ef6
2020-05-07 15:33:26 -07:00
Tyler Gunn
6e8a87e0dc Merge "Improve connection manager logging." into rvc-dev 2020-05-06 15:32:10 +00:00
Tyler Gunn
ffbcd89453 Improve connection manager logging.
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
2020-05-05 09:34:07 -07:00
Andrew Sapperstein
8fe35e5f21 Fix broken @see tags in public documentation.
These were previously being suppressed by doclava but with this change,
all failures are fixed and the suppression logic has been removed.

To fix the issues, there were a few possible changes made:
- broken reference to a public API (such as incorrect parameters): fixed
- unnecessary @link inside an @see tag: fixed
- @see referring to an @hide or @SystemApi: reference removed
- broken references to inner class constructors
 - worked around by fully qualifying the constructor

Bug: 6963924
Test: make doc-comment-check-docs
Exempt-From-Owner-Approval: cherry-picked from master
Change-Id: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
Merged-In: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
(cherry picked from commit e0624c7a40baae30cf77e948db5258b78856d0e5)
2020-05-01 18:25:32 +00:00
Fan Zhang
f7c753bc16 Add @TestApi to createLaunchEmergencyDialerIntent
Test: build
Bug: 154867896
Change-Id: Id2eb94b233c6c00a81c51d17c5414b3cce5ebdf5
2020-04-28 03:34:17 +00:00
Tyler Gunn
99b3d74876 Merge "Fix createLaunchEmergencyDialerIntent API behavior when Telecom unavailable." into rvc-dev 2020-04-23 21:28:15 +00:00
Tyler Gunn
753aa1063e Fix createLaunchEmergencyDialerIntent API behavior when Telecom unavailable.
The API contract for createLaunchEmergencyDialerIntent indicates that
the return value is @NonNull, however the code clearly can return a null
value if either:
1. Telecom is unavailable.
2. There is a remote exception.

Since the API just returns a new ACTION_EMERGENCY_DIAL intent with the
package name of the emergency dialer (from Telecom string resources), we
can provide a reasonable fallback behavior by just returning a new
ACTION_EMERGENCY_DIAL intent with no targeted package.  The system will
still launch the emergency dialer in this case, but if there is a scenario
where multiple emergency dialers are installed on a device, the AOSP one
may get launched instead.  This is, however, better than there being NO
emergency dialer launched.

Test: Comment out call to Telecom service and verify the AOSP emergency
dialer still launches.
Fixes: 152187752

Change-Id: I06f8a5bebace5b22822f7bb714e14915126b904f
2020-04-23 10:16:26 -07:00
Tyler Gunn
815576c7d6 Improve remote connection logging.
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
2020-04-17 15:46:29 -07:00
Tyler Gunn
cd5d9b29a1 Merge "Ensure conference state is posted to Telecom for new conferences." into rvc-dev 2020-04-14 23:16:54 +00:00
Tyler Gunn
877f3f63c9 Merge "Fix parceling and unparceling for URIs in Telecom." into rvc-dev 2020-04-14 15:21:20 +00:00
Tyler Gunn
7c61306fa5 Fix parceling and unparceling for URIs in Telecom.
When testing parceling and unparceling of numbers with postdial digits
it appears in parcelling to the dialer there were some cases where
the commas were being URL encoded during parceling.

Elsewhere in the platform the Uri.writeToParcel and
Uri.CREATOR.createFromParcel methods are used.  Switching to those methods
ensured that the parceling did not uri-encode on parcel/unparcel.
GatewayInfo already used the right method to unparcel.

Test: Unit/CTS tests.
Fixes: 152172598
Change-Id: I32b7d049107cb3901fd934dc609541d1d2622a5a
2020-04-13 17:19:24 -07:00
Tyler Gunn
79110a9fd7 Ensure conference state is posted to Telecom for new conferences.
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
2020-04-10 15:27:27 -07:00
Brad Ebinger
08ca469222 Merge "Add a new call direction parameter to conferences for multiparty" into rvc-dev 2020-04-10 17:14:01 +00:00
Brad Ebinger
43e026594e Add a new call direction parameter to conferences for multiparty
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
2020-04-09 16:46:11 -07:00
Michael Groover
f4cd234bcb Merge "Update permission requirements for TelecomManager#getLine1Number" into rvc-dev 2020-04-09 17:21:42 +00: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
Tyler Gunn
f7643e91ae Merge "Document that some Telecom broadcast and extra keys are dead-ends." into rvc-dev 2020-03-27 22:57:49 +00:00
Tyler Gunn
78f77f67eb Document that some Telecom broadcast and extra keys are dead-ends.
Too late to @deprecate, but we can still at least indicate that the
broadcasts are dead-ends and help the developer know the right way to
go.

Test: make -j offline-sdk-docs; confirm docs look good.
Fixes: 148268693
Change-Id: I88b03a62c812232cf0d5bbeb693cdaf3c2eed3e1
2020-03-27 12:55:58 -07:00
Michael Groover
08490f1dc7 Update permission requirements for TelecomManager#getLine1Number
To move READ_PHONE_STATE from a runtime permission to a normal
permission all sensitive APIs guarded by READ_PHONE_STATE must be
moved to another permission. This commit updates the TelecomManager
getLine1Number docs to reflect the new permission requirements;
these requirements are the same as TelephonyManager getLine1Number.

Bug: 136160623
Test: atest TelecomUnitTests:TelecomServiceImplTest
Change-Id: Ibb8e5d1cf16a05e95c2cc2fb68af35dc4bdb0f02
2020-03-25 16:44:55 -07:00
Tyler Gunn
703dd182fd Hide adhoc conference APIs.
Most of this was previously hidden; these last stragglers were missed.

Test: make update-api ; verify hidden
Fixes: 152394802
Change-Id: I41bda5b8ad368e1c88e4dd9e45d978a111a22e53
2020-03-25 08:50:48 -07:00
Hall Liu
dd4859d17d Hide CALL_SOURCE constants in TelecomManager
Fixes: 151184696
Test: build
Change-Id: Ie1886d7cd1bac22da41c942b6507b24bc4238c10
(cherry picked from commit 1b78c5327d892e4519791651ade3909934b0719b)
2020-03-20 22:49:28 +00:00
Philip P. Moltmann
12ac3f406f Rename featureId -> attributionTag
In the core functionality this changes everything including aidl's and
field names:
- Context
- ContentProvider
- AppOps*
- Package parsing

For the rest, this is a shallow change to only change to the changed
APIs. This keeps the change small-ish

Exempt-From-Owner-Approval: Rename
Fixes: 148792795
Test: TH
Change-Id: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
Merged-In: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
2020-03-12 19:26:10 +00:00
Shuo Qian
9378eb9362 Fix CallRedirectionService Doc issue
Bug: 149210664
Test: Treehugger; No function change
Change-Id: Ib8afac47d4a3237d7ce829a18566ca212fee8420
Merged-In: Ib8afac47d4a3237d7ce829a18566ca212fee8420
(cherry picked from commit e212f0d7cfd881390802e1ea74aa8d24b6aebe56)
2020-03-12 03:45:08 +00:00
Hall Liu
97363dce3c Merge "Hide APIs introduced in earlier commit" into rvc-dev 2020-03-12 01:31:41 +00:00
Hall Liu
dbb17f1754 Hide APIs introduced in earlier commit
Fixes: 151184696
Test: NA
Change-Id: I5ad3229158a140c4d27cb3bd9b608e7dc165a044
2020-03-10 18:35:04 -07:00
Tyler Gunn
81ea3ffa50 Fix Telecom ConnectionTest.
A recent Telephony change was made to support missed calls reported
over SMS; this change made FailureSignalingConnection fully mutable
which failed some CTS.
Given that its only the setAddress method which would fail the mutability
check, re-added immutability in the FailureSignalingConnection since
ultimately we do want to protect these from state changes, but removed
the mutability check in the setAddress method since its reasonable to
want to report an address in this case.

Test: cts-tradefed run cts-dev -m CtsTelecomTestCases -t android.telecom.cts.ConnectionTest
Fixes: 150811816
Change-Id: I7f37daf9ac65ff70eec7692410fa299cb30fdc38
2020-03-06 11:36:21 -08:00
Hall Liu
5508591b92 Update docs for getGenericConferenceActiveChildCall
Update the documentation for getGenericConferenceActiveChildCall to make
it more clear what a generic conference is and which call the method
will actually return.

Fixes: 148515394
Test: none, docs only change
Change-Id: Idfee3fc23c7f6035f7b980fbb4dfe68c2834c388
2020-02-27 18:35:14 -08:00
Jack Yu
1e1ff94bdb Added missed incoming call SMS support
Provided a way for carrier to notify their users
about missed incoming call via special SMS.

Bug: 144068181
Test: MissedIncomingCallSmsFilterTest
Merged-In: Iacf1ce5b2a79761536e2b31a0ea5644622b4913c
Change-Id: Iacf1ce5b2a79761536e2b31a0ea5644622b4913c
(cherry picked from commit 0630b6c358506da8e21978c6d5bad3389763b72c)
2020-02-24 11:58:30 -08:00
Automerger Merge Worker
b183da57f4 Merge "Make get/setCallerNumberVerificationStatus final." am: 4cbb288657 am: 329d286b88 am: 83d8de2f15
Change-Id: I209101a92935f377b3e562f65b9692113a6d9b03
2020-02-20 04:28:13 +00: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
Tyler Gunn
4cbb288657 Merge "Make get/setCallerNumberVerificationStatus final." 2020-02-19 22:03:52 +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
Tyler Gunn
a131d6ee5f Make get/setCallerNumberVerificationStatus final.
Make new APIs final.

Test: make -j update-api
Test: run unit tests
Bug: 149316218
Change-Id: Ib3d4ceacff451ac646a504ab02f0242852228a32
2020-02-13 14:53:28 -08:00
Automerger Merge Worker
ec47b48311 Merge "Update InCallService API docs." am: 11e7b55ea9 am: 040db280fa am: 01bb7cef0e
Change-Id: Ie50b8f5173a16f34d9a9674a081ce62a45687656
2020-02-13 19:48:37 +00:00
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
Tyler Gunn
11e7b55ea9 Merge "Update InCallService API docs." 2020-02-13 18:48:00 +00:00
Tyler Gunn
f2a5615087 Merge "API Review cleanups." 2020-02-13 18:16:25 +00:00
Tyler Gunn
c9503d6ea6 API Review cleanups.
- 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
2020-02-13 16:53:42 +00:00
Tyler Gunn
8d95abab29 Merge "API Review cleanups." 2020-02-13 16:05:53 +00:00
Tyler Gunn
754493b82f API Review cleanups.
- 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
2020-02-12 20:44:27 -08:00
Tyler Gunn
0c62ef09bb Mark adhoc conference call APIs as @hide.
Test: make -j update-api
Test: Run unit tests
Bug: 62151032
Change-Id: I8fe9c4d2c9a8861deea3a0def82c432762cd1222
2020-02-11 14:39:43 -08: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
d5a624df59 Merge "Hide Adhoc conference call API." am: 32c29d1ee6 am: 4ccffaef5f am: 042f26589d
Change-Id: Iaadaeb323f2299a0c544a282727e981353a7c9ab
2020-02-11 02:30:27 +00:00
Tyler Gunn
a967af5514 Hide Adhoc conference call API.
Marking the adhoc conference call API as @hide.

Test: make -j update-api
Bug: 148165780
Change-Id: I447ec317c66f0c1b4e7a828635b5dcf8b144e32a
2020-02-10 15:19:07 -08:00
Tyler Gunn
4057d4cda2 Update InCallService API docs.
Update the InCallService API docs to more clearly indicate what it means
to be a dialer app, and to document the behavior when an InCallService
fails.
Also add a link from the dialer role in RoleManager to InCallService API.

Bug: 148692337
Test: make -j offline-sdk-docs; verify the docs render correctly.
Change-Id: Ibf06bb85e37236a65c60c86ae0385d5a21bb6e4b
2020-01-31 15:17:47 -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
Hall Liu
880983bc0a Merge "Expose various Telecom constants" 2020-01-24 22:46:43 +00:00