1687 Commits

Author SHA1 Message Date
Tyler Gunn
df62e53c72 Merge "Update audio processing API docs." into rvc-dev am: 04e5ed5223
Change-Id: Ie0c28b5904df38f59dc6ca528e0269f95d4e54da
2020-05-15 22:23:45 +00: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
24f2f2e1c6 Merge "Improve connection manager logging." into rvc-dev am: dcbb86a7bd
Change-Id: Ib5ad35b6081246aabbf838bb27a121eaed646bc8
2020-05-10 05:16:05 +00: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
eb01a999da Merge "Improve connection manager logging." into rvc-dev am: 6e8a87e0dc
Change-Id: I489d696d21cf2163cefc6a673bd74d4f100ff21a
2020-05-06 15:47:25 +00: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
f181c2f44b Fix broken @see tags in public documentation. am: 8fe35e5f21
Change-Id: Ic95104f61b736d05f18c7465e77951771f39fcbf
2020-05-02 00:36:07 +00: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
2171cc9535 Merge "Add @TestApi to createLaunchEmergencyDialerIntent" into rvc-dev am: b9c9917810
Change-Id: I9be88f20d3541acb5c76f222c033a2e2f384ed7d
2020-04-28 16:23:56 +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
28ba067389 Merge "Fix createLaunchEmergencyDialerIntent API behavior when Telecom unavailable." into rvc-dev am: 99b3d74876
Change-Id: I1665d456dace8e41cc035e792f319d98dd07219c
2020-04-23 21:32:37 +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
972a6ef338 Merge "Improve remote connection logging." into rvc-dev am: d44de9392f
Change-Id: I916750e0f558db1eb9e581bab7a9fbc71f781709
2020-04-21 15:38:54 +00: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
de47fdda7d Merge "Ensure conference state is posted to Telecom for new conferences." into rvc-dev am: cd5d9b29a1
Change-Id: I203880c593f6bac471a06eb9dcbb529d0bb75ba5
2020-04-14 23:38:45 +00: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
83d6a74cf0 Merge "Fix parceling and unparceling for URIs in Telecom." into rvc-dev am: 877f3f63c9
Change-Id: I87b881e55a749e0ea46ba3b3c7d297856a744f37
2020-04-14 15:30:23 +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
4eaad56d15 Merge "Add a new call direction parameter to conferences for multiparty" into rvc-dev am: 08ca469222
Change-Id: Ia7719f527d96882d2209b93d461033253a2c7cf0
2020-04-10 17:19:31 +00: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
f3d732b0ad Merge "Update permission requirements for TelecomManager#getLine1Number" into rvc-dev am: f4cd234bcb
Change-Id: I870b599d2c6f5d98d9a6eecbdc1c69462c395386
2020-04-09 17:28:14 +00:00
Michael Groover
f4cd234bcb Merge "Update permission requirements for TelecomManager#getLine1Number" into rvc-dev 2020-04-09 17:21:42 +00:00
Brad Ebinger
98fd8ded33 Merge "Add new @hide API to pass call direction changes through Telecom" into rvc-dev am: aa709348ee
Change-Id: Idd144680ac33170289489b537da9080a3fad3c8f
2020-04-09 16:47:41 +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
df77eb4a6e Merge "Document that some Telecom broadcast and extra keys are dead-ends." into rvc-dev am: f7643e91ae
Change-Id: Ia88c8cf977c854edd0c92c903ca0eec4b0735b96
2020-03-27 23:03:09 +00: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
df0941f939 Merge "Hide adhoc conference APIs." into rvc-dev am: f0edfb41f3
Change-Id: I90e05379d3c779bdc6b64e3ff68513bb3f302456
2020-03-25 20:37:34 +00: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
TreeHugger Robot
edf5d17e73 Merge "Hide CALL_SOURCE constants in TelecomManager" into rvc-dev am: 4d2c4a2b86
Change-Id: I01572f2b85a8d4f7240e225890a8bd48fabdcb0f
2020-03-21 01:22:39 +00: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
Philip P. Moltmann
aea50fc06a 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 11:47:51 -07:00
Automerger Merge Worker
7f46318909 Merge "Hide APIs introduced in earlier commit" into rvc-dev am: 97363dce3c
Change-Id: I51162719de79e4158f8bcff9050c9d83b50de04a
2020-03-12 15:51:35 +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
Automerger Merge Worker
2b25119612 Merge "Fix CallRedirectionService Doc issue" am: ed90e72dde am: 6051bfbc91
Change-Id: Idbbd1a6ac8c7836deaab18d6a061aa4efa2b40cc
2020-03-11 20:30:56 +00:00
Treehugger Robot
ed90e72dde Merge "Fix CallRedirectionService Doc issue" 2020-03-11 17:41:04 +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
Automerger Merge Worker
ab9d09ec88 Merge "Fix Telecom ConnectionTest." into rvc-dev am: 0ea5bf3ddf
Change-Id: I7556a175cad8c896fcfa8a9d18e4ad90635277c3
2020-03-07 00:04:21 +00: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
Automerger Merge Worker
10e0a54632 Merge "Add CAPTURE_AUDIO_OUTPUT permission requirement" am: a90348248b am: c878a3cd8a
Change-Id: Id83a6787786803c7883ba4966d4e857b274df8ee
2020-03-06 11:37:29 +00:00
Treehugger Robot
a90348248b Merge "Add CAPTURE_AUDIO_OUTPUT permission requirement" 2020-03-06 11:06:16 +00:00
Shuo Qian
281e683591 Fix CallRedirectionService Doc issue
Bug: 149210664
Test: Treehugger; No function change
Change-Id: Ib8afac47d4a3237d7ce829a18566ca212fee8420
Merged-In: Ib8afac47d4a3237d7ce829a18566ca212fee8420
(cherry picked from commit e212f0d7cfd881390802e1ea74aa8d24b6aebe56)
2020-02-28 12:06:00 -08:00