Commit Graph

224 Commits

Author SHA1 Message Date
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
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
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
Tyler Gunn
dff38f5610 Merge "Cleanup API docs for audio codecs and add intdef." 2020-01-06 23:12:58 +00:00
Tyler Gunn
1c687628e0 Cleanup API docs for audio codecs and add intdef.
- Cleanup the API docs for the audio codec constants.
- Add an IntDef for the constants
- Refer to IntDef in the EXTRA_AUDIO_CODEC definition.
- Cleanup API docs for EXTRA_AUDIO_CODEC to make it more clear that
the codecs mentioned are not the only ones supported.

Fixes: 146563762
Test: Compile/make update-api
Change-Id: If837c640033c76f32dfa25dcf9c7d1d6cb344d7b
2019-12-20 11:08:13 -08:00
Austin Wang
edf7ce4f38 Merge "Revert "Use new UnsupportedAppUsage annotation."" 2019-12-19 10:09:11 +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
satayev
1385dca8f6 Merge "Use new UnsupportedAppUsage annotation." 2019-12-18 15:32:40 +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
ffd2e964c1 Merge "User cannot reject a waiting call after a switch call fails" 2019-12-17 21:09:56 +00:00
Tyler Gunn
4efe689e4c Merge "Add Verstat fields to Telecom call/connection classes." 2019-12-05 23:58:45 +00:00
allenwtsu
2aca989255 Define EXTRA_AUDIO_CODEC_TYPE in Connection
Bug: 143576354
Test: By manual
Change-Id: Ib8e701632676cfbe9993f1de2b58546f59ba580f
2019-12-04 15:21:19 +08: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
Chen Xu
b6d1319d1a telephony annotations part 2
adding missing annotations

Bug: 140908357
Test: Build

Merged-In: I6de632ef7ef01a939971b7d1bacb227ec5ff4048
Change-Id: I6de632ef7ef01a939971b7d1bacb227ec5ff4048
(cherry picked from commit f85cf993d3)
2019-11-20 14:09:16 -08:00
Masaho Nishikawa
cb8fa7440e User cannot reject a waiting call after a switch call fails
Add new connection event to indicate switch failure.

Test: Manual - Verify that incoming call can be rejected after switch
call is failed.
Bug: 143918738

Change-Id: Ib38ceb3cb72ce946c071a8ec9748a1c81ca58808
2019-11-20 09:37:27 +09: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
Tyler Gunn
633e4c3f19 Make Connection.Listener methods package private.
To prevent using these outside of the API surface, making package private
so we don't get tempted to use in the framework.

Bug: 141576016
Test: Manual smoke test.
Test: Run unit tests.
Test: Run CTS tests.
Change-Id: Ife3a82371b018b74efbe10e11015526d7aaeb7a9
2019-10-25 07:24:17 -07:00
Tyler Gunn
c63f9082a6 Telecom API updates for mainline support.
Moving some Telecom APIs into public since they are harmless to expose.
Moving some other Telecom APIs into the System API space since they're
API details specific to the TelephonyConnectionService so don't need to
be exposed in the public API.

Bug: 141576016
Test: Manual smoke test.
Test: Run unit tests.
Test: Run CTS tests.
Change-Id: Iaf75b9d671712d791f501c11536e73436908f7de
Merged-In: Iaf75b9d671712d791f501c11536e73436908f7de
2019-10-17 10:05:44 -07:00
Tyler Gunn
6986a63325 Support indicating call direction on existing connections.
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
2019-06-25 13:48:29 -07:00
Tyler Gunn
ac60f9554e Enhancements to conference for non-conference host scenarios.
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
2019-05-31 12:45:19 -07:00
Hall Liu
f5ba1c6268 Merge "Fix issues associated with hold failure" am: df6e5604f3 am: 9fefce6df5
am: c3557eb639

Change-Id: I82de9a1462a18707a6a9410e78f72b6908d6ee7a
2019-03-13 14:59:32 -07:00
Hall Liu
06ae75bf51 Fix issues associated with hold failure
Add new connection event to indicate hold failure

Fixes: 128275255
Test: manual
Change-Id: I2678cda12d7703eba37d3feca3a8d98b21c050b1
2019-03-11 19:11:35 -07:00
Shi Lu
528eb5b06d API Review: SIP INVITE fields on a MT call
Bug: 123927153
Change-Id: I163aaa2b0cc2cd9dd36d1c63cd54bfca43a0d932
2019-02-13 22:12:20 +00:00
Youming Ye
d6de26ea61 Add connect time to conference participant.
Bug: 78176188
Test: Manual
Change-Id: Ifb7f061ddcc69356a21d08c9c446edeb38a6674c
2019-02-04 10:14:49 -08:00
Wileen Chiu
f2ec298d7d IMS: Propagate media profile changed message
- RTT Voice information will be passed to the UI via
  media profile changed message

- The RTT voice information - SPEECH/SILENCE, will be conveyed
  via the ImsStreamMediaProfile.hasRttAudioSpeech

- A connection event will be sent from frameworks to the UI -
  EVENT_RTT_AUDIO_INDICATION_CHANGED

- Add listeners, connection event and extras to propagate
  media profile changed to the UI

Test: Manual
Bug: 110976450
Change-Id: I34d2dd612915d65f5047986dabece968c78f0abe
2019-01-11 11:58:31 -08:00
shilu
b7ec9a0c9a Propagate some SIP INVITE header fields on a MT call
These fields can be used for Spoof call detection in the Dialer

Bug: 115537553
Test: compile and test on device
Change-Id: Ib92043536e0fc43e40efc53189a28c4e58064ddc
2019-01-10 15:59:06 -08: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
190a8121c2 Merge "Mark event-based handover constants as deprecated."
am: 5604cc2516

Change-Id: I25b81274e0825e94133d21b976c8a20c4faff83d
2018-09-26 06:02:39 -07:00
Tyler Gunn
5604cc2516 Merge "Mark event-based handover constants as deprecated." 2018-09-26 04:18:35 +00:00
Tyler Gunn
6d400c7352 Merge "Add support for network identified emergency calls."
am: 108349f8d6

Change-Id: I21ffa931cba06086ca8fd970a0172c282af03b3a
2018-09-24 16:14:14 -07:00
Tyler Gunn
108349f8d6 Merge "Add support for network identified emergency calls." 2018-09-24 22:50:50 +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
Hall Liu
8a456bad23 Merge "Propagates voice call radio technology to connection"
am: 5405d09204

Change-Id: I244839f759f40066565111dae91bbe07692e3ebf
2018-09-20 23:13:14 -07:00
Wei Huang
7f7f72e451 Propagates voice call radio technology to connection
This patch mainly takes below changes:
 1) Add new extra to indicates the call network technology.
 2) Provides basic function to set/get call radio technology.

Bug: 67856372
Test: Manual
Change-Id: I1a12382fdb589ce823fe7af025832db4cdc152c2
2018-09-19 18:51:52 +09: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
9eb284c658 Merge "Add @UnsupportedAppUsage annotations" am: 44091cdb47
am: ec3f7c80ce

Change-Id: I50594b690a776145e4b0278e1e0685c5ebc53832
2018-08-06 12:25:51 -07:00
Mathew Inwood
ec3f7c80ce Merge "Add @UnsupportedAppUsage annotations"
am: 44091cdb47

Change-Id: I1dfae6f3d8ba8d5ff63f378c71f9670199a3adc3
2018-08-06 09:47:13 -07:00
Treehugger Robot
44091cdb47 Merge "Add @UnsupportedAppUsage annotations" 2018-08-06 12:23:09 +00:00
Hall Liu
a4c0632746 Merge "Telecom: Reset the duration after the CDMA call is accepted" am: 2cbf44dc2f
am: e784d5e5ca

Change-Id: I3ce3d19c460f3e95bdbdd4c983d53657c06443d3
2018-08-01 16:46:15 -07:00
Hall Liu
e784d5e5ca Merge "Telecom: Reset the duration after the CDMA call is accepted"
am: 2cbf44dc2f

Change-Id: I823efd5765b77fcf55f4c38a6091d980530abae8
2018-08-01 16:09:51 -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
Mengjun Leng
2570774338 Telecom: Reset the duration after the CDMA call is accepted
In android original design, the duration of CDMA MO call is started from
the dial command sent, so it is not the real duration of the active time.

In this patch, a new message is registered to listen the event of the call
accepted, and then reset the duration when the event happens.

Change-Id: Icc447012030ae243f200ec2c83b7d5210af9b31c
2018-07-31 14:14:22 +08:00
Tyler Gunn
9aca012ab5 Merge "Make Connection#onSilence a public API." am: cbe3737f13
am: 01ab0b90bf

Change-Id: I8c011d4a495d5240ebec83b07bc0b8f57a3c40ac
2018-07-13 12:45:28 -07:00
Tyler Gunn
01ab0b90bf Merge "Make Connection#onSilence a public API."
am: cbe3737f13

Change-Id: I4ab192ca160219770d7384e88c8e0025137b42bd
2018-07-13 12:15:45 -07:00
Tyler Gunn
06f0616f6d Make Connection#onSilence a public API.
Connection#onSilence is generally applicable to apps implementing the
self-managed ConnectionService API.
Also updated the docs to make it more clear where that API is to be used
and how the developer can silence the ringtone.

Test: CTS test, manual test.
Bug: 110348674
Change-Id: I1c1791c101827780949fd633c531ed83037e7b4e
2018-07-11 09:04:43 -07:00
Hall Liu
17eb1bd6e4 Fix readImmediately for CTS
The readImmediately API (only used by CTS so far) was broken by a
previous change that unknowingly changed the semantics of ready().
Fixing this so that CTS tests work again.

Change-Id: I6970713eae2a01dd07e30778ca8ee0d9bc7dfeb9
Fixes: 111125833
Test: CTS
2018-07-03 15:17:41 -07:00
Hall Liu
730a25995e Make RttTextStream's read interruptible
Wrap the FileInputStream in a java.nio.Channel so that sending a
Thread.interrupt() to the thread blocked on the read will actually do
something.

Change-Id: Icc11ba69167f448e2b33d9a1a13a1dfa5e5d0d58
Fixes: 110570772
Test: manual (follow repro steps in bug, but type really fast),treehugger
2018-06-25 19:48:33 -07:00
Hall Liu
2a74e5798d Merge "Change signature of requestBluetoothAudio" am: 545e20389d
am: 442575f4f1

Change-Id: Ic10b762e04d74635663fa97f5879072ebe00eca9
2018-04-02 18:46:50 -07:00