Commit Graph

1721 Commits

Author SHA1 Message Date
Grace Jia
1c997e4ead Merge "Add adhoc conference APIs to RemoteConnection and RemoteConnectionService." am: 329c6ff777 am: e40cfa60de am: 6a55cd1644 am: 300b3cce72 am: f98b0c5eb1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1388908

Change-Id: I3fc6ba1492996d41530461452e83759a490adc6d
2020-08-13 19:30:59 +00:00
Grace Jia
6a55cd1644 Merge "Add adhoc conference APIs to RemoteConnection and RemoteConnectionService." am: 329c6ff777 am: e40cfa60de
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1388908

Change-Id: I49034d851b111792fa54b3d2f236d56513bb00f9
2020-08-13 18:46:06 +00:00
Grace Jia
329c6ff777 Merge "Add adhoc conference APIs to RemoteConnection and RemoteConnectionService." 2020-08-13 18:06:19 +00:00
Tyler Gunn
560c97bc25 Merge "Improve remote connection logging." 2020-08-12 18:27:36 +00:00
Tyler Gunn
419c0fa22e Merge "Fix createLaunchEmergencyDialerIntent API behavior when Telecom unavailable." 2020-08-12 18:27:18 +00:00
Grace Jia
9a09c67075 Add adhoc conference APIs to RemoteConnection and
RemoteConnectionService.

Plumb through the adhoc conference APIs via these new APIs.

Bug: 159944852
Test: atest CtsTelecomTestCases:RemoteConnectionTest
Change-Id: Icfa27e0616dd35ba350f7a491e5c95337a286b9d
2020-08-11 19:26:33 +00:00
Grace Jia
0128b3c58c Deprecate TelecomManager#getPhoneAccountsForPackage for security.
Bug: 153995334
Test: make
Change-Id: I66d757139f3b7e25481b302e9378327873c7912c
2020-08-07 00:41:29 +00:00
Tyler Gunn
c59fd0cd80 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.
Bug: 154353494
Fixes: 155097158
Merged-In: I916750e0f558db1eb9e581bab7a9fbc71f781709
Change-Id: Iee1b5cfd3334a5de08d7b04022b7c6d5af6a4b04
2020-08-05 13:45:33 -07:00
Tyler Gunn
893a602e61 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.
Bug: 152187752
Fixes: 155097434
Merged-In: I1665d456dace8e41cc035e792f319d98dd07219c
Change-Id: I06f8a5bebace5b22822f7bb714e14915126b904f
2020-08-05 13:37:27 -07:00
Tyler Gunn
c5ef3b9cae Merge "Update language to comply with Android's inclusive language guidance" am: a005cb30ed am: 3772a5b3fd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1377136

Change-Id: I2f838a951cec8f6e7af82a0cd08d99d6045f3952
2020-07-30 21:25:38 +00:00
Tyler Gunn
a005cb30ed Merge "Update language to comply with Android's inclusive language guidance" 2020-07-30 20:42:55 +00:00
Tyler Gunn
460360d6b8 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: Presubmit
Bug: 161896447
Change-Id: I4142f4819f5ed3e2ffddf471b90923985e72523a
2020-07-29 10:23:07 -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
1b2995ca3f Merge "Run CtsTelecomTestCases in presubmit" 2020-07-28 20:47:36 +00:00
Treehugger Robot
e8a4750ac5 Merge "Expose adhoc conference calling API as public." am: 8ebbe3c038 am: fb8f41f0c2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1368819

Change-Id: Ia5e17f2dbbfbb539f2415348e1ddb960354d3662
2020-07-28 17:41:13 +00:00
Grace Jia
8587ee5cd5 Expose adhoc conference calling API as public.
Bug: 159944852
Test: make
Change-Id: I2cf39a6fd8a02ca4f2d0c83c484ab12bb13f74c3
2020-07-27 11:18:36 -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
Treehugger Robot
afe114c2f5 Merge "Add telecom command to stop block suppression" 2020-06-26 22:45:32 +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
Hall Liu
3293dd1e64 Merge "Mark TelecomManager#isRinging as a TestApi" am: 94091aceaa am: 1ab98f185e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1340753

Change-Id: Ic643ef7b31f62a6771c1f1ba5aa0e4c0a16e7e0c
2020-06-17 01:34:55 +00:00
Hall Liu
ae6a918ba9 Mark TelecomManager#isRinging as a TestApi
Bug: 150320750
Test: atest BackgroundCallAudioTest
Change-Id: I048960feb97cd6cf081056ee649e7ea8dacdc8e3
Merged-In: I048960feb97cd6cf081056ee649e7ea8dacdc8e3
2020-06-16 16:52:24 -07:00
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
d53dc11b1f Merge "Ensure conference state is posted to Telecom for new conferences." am: 2e46eac097
Change-Id: I03b8dbca60d71aaeb03ff700482a45d35e34f6d3
2020-05-12 15:23:01 +00:00
Tyler Gunn
2e46eac097 Merge "Ensure conference state is posted to Telecom for new conferences." 2020-05-12 15:12:53 +00:00
Tyler Gunn
1036237bb5 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.
Bug: 134047008
Fixes: 155097934
Merged-In: I203880c593f6bac471a06eb9dcbb529d0bb75ba5
Change-Id: Ib48437abb1295d147e227727ce4ff2996f28b5de
2020-05-11 14:29:44 -07:00
Tyler Gunn
f94ecdc108 Merge "Fix parceling and unparceling for URIs in Telecom." am: 68a50c1b2f
Change-Id: I9f15005fd017442afd6894b9769df883524fc055
2020-05-11 21:17:55 +00:00
Tyler Gunn
68a50c1b2f Merge "Fix parceling and unparceling for URIs in Telecom." 2020-05-11 21:04:58 +00:00
Tyler Gunn
04e1fd15f6 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.
Bug: 152172598
Fixes: 155098148
Merged-In: I87b881e55a749e0ea46ba3b3c7d297856a744f37
Change-Id: I32b7d049107cb3901fd934dc609541d1d2622a5a
2020-05-11 12:55:29 -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
Andrew Sapperstein
23d5746e06 Fix broken @see tags in public documentation. am: 1f6e22cbd8
Change-Id: I04a78c9ba3770a4d651177aae697890094a52add
2020-05-05 21:12:04 +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 e0624c7a40)
2020-05-01 18:25:32 +00:00
Andrew Sapperstein
1f6e22cbd8 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
Change-Id: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
Merged-In: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
2020-05-01 00:42:22 +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
Brad Ebinger
59d28c921a Merge "Add a new call direction parameter to conferences for multiparty" am: f5ed9171e6
Change-Id: I5777d43fc258651890fe4dbfb15d9dc21dece9b0
2020-04-23 15:57:12 +00:00
Brad Ebinger
f5ed9171e6 Merge "Add a new call direction parameter to conferences for multiparty" 2020-04-23 15:35:35 +00:00
Tyler Gunn
0e99c5324b Merge "Hide adhoc conference APIs." am: 988ca64c3d
Change-Id: If33e8de701253f04d6289de370cb1e5c7a3e5a91
2020-04-22 20:00:33 +00:00
Tyler Gunn
988ca64c3d Merge "Hide adhoc conference APIs." 2020-04-22 19:44:50 +00:00
Tyler Gunn
2c1bef9037 Hide adhoc conference APIs.
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
2020-04-22 16:08:28 +00: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