Commit Graph

22 Commits

Author SHA1 Message Date
Anton Hansson
dd7d52f963 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 16:41:01 +01:00
Tyler Gunn
467acc47a3 CallScreeningService API docs cleanup.
Cleanups for call screening service APIs and to provide more clarity for
the lifecycle of the service.

Fixes: 170286897
Test: make docs ; preview docs genreated.
Change-Id: I487b438e39abb83cee1bd050889a6bce164247d7
2020-10-07 15:54:43 -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
Hall Liu
ff4a125d6e Add CAPTURE_AUDIO_OUTPUT permission requirement
Add the CAPTURE_AUDIO_OUTPUT permission requirement annotation to
setShouldScreenCallViaAudioProcessing -- this permission is needed to do
call screening once the call has been placed into the special state.

Fixes: 146563331
Test: atest BackgroundCallAudioTest
Change-Id: I8eec1e19c6512d54f39cd9ad63347a2ac0ec2a98
2020-01-01 16:27:14 -08:00
Hall Liu
cebf791676 Merge "Change name of setShouldScreenCallFurther" 2019-12-04 00:28:48 +00:00
Hall Liu
69554cff8d Change name of setShouldScreenCallFurther
Change the name of the method to setShouldScreenCallViaAudioProcessing
Also remove some commented out lines

Fixes: 143564665
Test: CTS
Change-Id: Ib163e3dad49ad2301238256339be9bb3ba5fec3a
2019-11-11 17:44:09 -08:00
Grace Jia
90b38041e8 Add response to notify that an outgoing call is screened.
Test: CTS
Bug: 135929421
Change-Id: Ied5076e1ac0dc4aca2e5709b2e817f6a6895c58b
2019-11-06 14:17:50 -08:00
Hall Liu
31de23da21 Add SDK compatibility code for new call states
Add code that translates the new call states to old call states for
in-call UIs that don't yet support background call screening.

Test: CTS
Bug: 140317205
Change-Id: I104f5f7ab3e3dc075e1d9ed5c64fcd924f9a977b
2019-10-11 17:59:42 -07:00
Hall Liu
360428c44a Merge "Add APIs to support background call screening" 2019-10-02 18:34:54 +00:00
Hall Liu
6dfa249c88 Add APIs to support background call screening
Add Telecom APIs and AIDL code.

Test: CTS
Bug: 140317205
Change-Id: I99970f5ce12442f307a656db76cb26f5101e6c7f
2019-10-01 17:40:32 -07:00
Grace Jia
2d21e95e61 CallScreeningService API changed.
Test: manual
Merged-In: Idf44886158dcebf96e8bdffd98be3621f496deaa
Change-Id: Idf44886158dcebf96e8bdffd98be3621f496deaa
2019-09-26 14:37:19 -07:00
Tyler Gunn
a842e76231 Remove call identification APIs.
Removing the CallIdentification API surface.

Test: Build, run tests.
Bug: 129531123
Change-Id: I5f1451ffba04ee438df739a17472c028c44f19b2
2019-04-01 17:27:12 -07:00
Usman Abdullah
47b392db45 Add silence support to CallScreeningService/Call API
Test: CTS
Test: Unit Tests
Test: Manual
Bug: 126590377
Bug: 122671585

Change-Id: I4e7c67784198678eef1926759ec1d8afb98438f4
2019-03-14 14:02:23 -07:00
Hai Zhang
b0146d7f22 Add missing parts for renaming of the call redirection role.
Also drops the _APP suffix in role names, to be consistent with other
roles.

Test: manual
Change-Id: Iee3566b353fdf49a916067dfffebcf3d5b87c326
2019-02-07 16:29:46 -08:00
Tyler Gunn
1965bb1cc2 Add nuisance call reporting API to Telecom.
Adding new nuisance call reporting API to Telecom. Dialer will use this
to report to Telecom when the user marks a call as nuisance or not
nuisance.  We relay this to the CallScreeningService the user has chosen
to fill the call screening role, along with some basic information about
the call type (missed, rejected, incoming) and a the coarse call duration
bucket.  These values can be used by the CallScreeningService to train
the nuisance detection model it employs.

Test: Manual tested using test app.
Test: Added new CTS test coverage.
Test: Added unit tests to Telecom
Bug: 63966743
Change-Id: I389617491f640afd9ca28ec3f247912365e6cc53
2019-01-22 19:15:24 -08:00
Tyler Gunn
9e76fd19bc Call Screening / Caller ID API Changes
- Fix bug in call identification parcelable; was reversing the app name
and package name.
- Add @hide RoleManager consts for the Telecom roles; this will be
replaced by values in the library for public consumption as a later
date.
- Add new call direction attribute to the Call.Details class; this is
needed so that a CallScreeningService can know if a call is incoming
or outgoing.  This way it knows whether it needs to perform call blocking
or just caller ID.
- Update CallScreeningService API docs to explain how to request the
call screening role.
- Update InCallService API docs to explain the 3 roles related to this
service and how you declare an appropriate IncallService to fill each of
them.

Bug: 63966743
Test: Manual, CTS
Change-Id: Ic4547b8ead791690305f7be58e43272c4155b7fb
2019-01-08 15:01:19 -08:00
Tyler Gunn
7e45b7241b Add CallerIdentification to CallScreeningService API.
Updating the CallScreeningService to support passing call identification
information for incoming/outgoing calls.
Updating call log to log call identification information.

Bug: 63966743
Test: Manual with test app.
Change-Id: Ie6c172c09007eb5f4853d36ae0a99b782bfb5ddb
2018-12-12 15:12:31 -08:00
Tyler Gunn
e0caec7afb Update CallScreeningService API docs.
Cleanup some formatting issues.
Update the docs to more clearly indicate what data will be passed
to the CallScreeningService about a call.
Update the docs to clearly indicate the new behavior for setSkipCallLog
with respect to logging of calls.

Bug: 63966743
Test: API doc only change; build.
Change-Id: I5daeea32f6cfbef1b94105a826925a878ac98596
2018-12-03 08:31:59 -08:00
tonyzhu
9e1d4f86ba [Call Screening]Logging of calls blocked by call blocking feature, call screening app.
Add three call log entries, ALL_SCREENING_COMPONENT_NAME, CALL_SCREENING_APP_NAME,
BLOCK_REASON, and call block reasons. Add new parameter to get the
package name and component name of the implementation of CallScreenService.java.

Bug: 113243596
Test: Build pass
Change-Id: I63debd80d7f4a92278fdbb84b64ff1199591349c
2018-11-08 17:28:34 +08:00
Sailesh Nepal
f44607142f Make CallScreening.CallResponse static
A small mistake in my previous CL. The response object
needs to be static.

Change-Id: Idf9bca7a7076275f53475c2531090f406daecab9
2016-01-27 16:53:15 -08:00
Sailesh Nepal
1bef339b88 Add new public API to allow call screening
This CL adds a new service that the default dialer can implement to
screen incoming calls.

If the service is implemented then Telecom uses it to decide if a call
should be shown to the user or rejected.

Note, I initially tried to simply extend InCallService instead of
creating a whole new service. The problem with this approach is that:
  - this breaks some in call services which show UI as soon as they are
    bound to
  - the in call service lifecycle is tightly coupled to adding and
    removing calls. Call screening happens before a call is added which
    makes it a bad fit to in call service
  - call screening is a function of only the default dialer's in call
    service but the existing code also binds to "controller" call
    services

For these reasons it seemed simpler to just create a new optional
service.

BUG: 22857261
Change-Id: I53f2ef93360e0af19b6ce45af21026be6cf3a7f3
2016-01-27 13:54:12 -08:00