124 Commits

Author SHA1 Message Date
Sanket Padawe
f0dd39f7d0 Merge "Deprecate TelephonyManager APIs which are present in TelecomManager."
am: a90205492f

Change-Id: I1d15e13cb3ae8fa8caf098e34587e3599b5bc967
2017-09-11 03:40:47 +00:00
Sanket Padawe
5aac2e91db Deprecate TelephonyManager APIs which are present in TelecomManager.
Bug: 62346128
Test: Build
Change-Id: I4c3b4652f5d22215572d64b764bcd42bb7295ebe
Merged-in: I4c3b4652f5d22215572d64b764bcd42bb7295ebe
2017-09-08 05:46:13 -07:00
Tyler Gunn
3af3869054 Add EXTRA_HANDOVER_FROM_PHONE_ACCOUNT.
Used in handovers to tell the account we're handing over to which account
the call is from.

Test: Manual
Bug: 38027075
Change-Id: I9b61a5fce3e4f7344174a1b81f4964ca02b71ccd
2017-06-13 10:34:58 -07:00
Jeff Sharkey
28f6dc9512 Merge "Give Doclava our manifest; more permission docs." into oc-dev am: 65d4cbba37
am: 67cb5f5210

Change-Id: Ic4c30cdb8bbfda5b3703eb3c7c36c1bf8ab3a216
2017-06-06 16:17:39 +00:00
Jeff Sharkey
ec68b46bc8 Merge "Annotate @SystemApi with required permissions." into oc-dev am: c1406978a4
am: 7a2e4a8486

Change-Id: Ib629e25dbf047c110feaf03e4ff744b5c6df9aeb
2017-06-06 15:48:24 +00:00
Jeff Sharkey
bfc4fcde9f Give Doclava our manifest; more permission docs.
We've seen some @SystemApi methods protected with non-system
permissions, so give Doclava the platform AndroidManifest.xml so it
can parse the actual permission protection levels to look for APIs
that are letting in non-system apps.

Also document more @SystemApi permissions.

This is purely a docs change; no logic changes are being made.

Test: make -j32 update-api
Bug: 62263906
Change-Id: Ie0f0a5fb0033817bcc95060f2183a52ae4ae7b06
2017-06-05 17:38:19 -06:00
Jeff Sharkey
d86b8fea43 Annotate @SystemApi with required permissions.
Most @SystemApi methods should be protected with system (or higher)
permissions, so annotate common methods with @RequiresPermission to
make automatic verification easier.

Verification is really only relevant when calling into system
services (where permissions checking can happen on the other side of
a Binder call), so annotate managers with the new @SystemService
annotation, which is now automatically documented.

This is purely a docs change; no logic changes are being made.

Test: make -j32 update-api && make -j32 offline-sdk-docs
Bug: 62263906
Change-Id: I2554227202d84465676aa4ab0dd336b5c45fc651
2017-06-05 13:27:11 -06:00
Tyler Gunn
24067aceff Merge "Further handover support changes." 2017-04-27 16:26:23 +00:00
Tyler Gunn
9f6f04733e Further handover support changes.
Add handover extras key used when initiating handover.
Add handover complete / fail connection events which are sent to the
initiating IncallService when a handover is complete or fails.
Adding PhoneAccount extra to indicate that a self-managed CS should have
its calls logged to the call log.

Test: Manual
Bug: 37102939
Change-Id: Icbb6f1addf913de841a9c48089a7d8311668f3bc
2017-04-26 21:32:01 +00:00
Jeff Sharkey
e01a56bb66 Merge "More auto-doc work." into oc-dev am: 6bc03748a7
am: f25b285706

Change-Id: Ic6b7c359259b6fd809b1a01ba249a7b44e15a29f
2017-04-24 18:37:08 +00:00
Jeff Sharkey
910e081216 More auto-doc work.
Add support for AnyThread, CallSuper, and UiThread.

Another related CL started documenting @RequiresPermission, so remove
duplicated information in existing APIs.

Suppress auto-doc on a handful of classes that are already
well-documented.

Test: make -j32 offline-sdk-docs
Bug: 37526420
Change-Id: I791437dccec0f11d5349a23b982ba098cb551af8
2017-04-21 16:35:08 -06:00
Tyler Gunn
346892ff9f DO NOT MERGE Expose phone account register/unregister intents.
These were previously @SystemApi.  Retaining the existing SystemAPI
behavior which sends the intents to those with a private permission.
Extending to ALSO send these intents to the default dialer app as well
using an explicit intent.
Cherry-pick from aosp-master to resolve merge conflicts.

Test: Manual
Bug: 37106957
Merged-In: Ifb72870105be5ba024af196a8c3165a9afb397ab
Change-Id: Ifb72870105be5ba024af196a8c3165a9afb397ab
(cherry picked from commit d9da6ce9938b4222cfb409f172cacfe4cf1593e6)
2017-04-17 17:39:22 +00:00
Tyler Gunn
d9da6ce993 Expose phone account register/unregister intents.
These were previously @SystemApi.  Retaining the existing SystemAPI
behavior which sends the intents to those with a private permission.
Extending to ALSO send these intents to the default dialer app as well
using an explicit intent.
Cherry-pick from aosp-master to resolve merge conflicts.

Test: Manual
Bug: 37106957
Change-Id: Ifb72870105be5ba024af196a8c3165a9afb397ab
2017-04-14 18:41:32 -07:00
Tyler Gunn
727c6bd755 Remove handover token.
Removing handover token and cleaning up the references to it in the docs.
This was supposed to go into the original CL but it looks like the upload
failed.

Test: Manual
Bug: 37102939
Change-Id: I98f392119258d059669ca68b50184b8bdadbcf0f
2017-04-11 09:51:40 -07:00
Tyler Gunn
8bf7657357 Add connection handover APIs.
Add new call/connection event keys for handover.
Add TelecomManager extra keys used for handover.
Add PhoneAccount extra keys used to control availability of handover.

Test: Test app/harness.
Bug: 37102939
Change-Id: Icc5db7209362f04c4e3be397fee692bbf4a6a473
2017-04-10 22:12:45 +00:00
Tyler Gunn
4774fb36d0 Add getSelfManagedPhoneAccounts() TelecomManager API.
This is consistent with the existing getCallCapablePhoneAccounts API
which is used to get the phone accounts capable of placing phone calls.

Test: CTS
Bug: 34159263
Merged-In: I1396c63a6882947cd66721528e53b6964a9091e0
Change-Id: I1396c63a6882947cd66721528e53b6964a9091e0
(cherry picked from commit 8931707058c2680878aacc5e6b4150a9aedc0f4d)
2017-04-10 20:20:47 +00:00
Tyler Gunn
8931707058 Add getSelfManagedPhoneAccounts() TelecomManager API.
This is consistent with the existing getCallCapablePhoneAccounts API
which is used to get the phone accounts capable of placing phone calls.

Test: CTS
Bug: 34159263
Change-Id: I1396c63a6882947cd66721528e53b6964a9091e0
2017-04-10 08:54:10 -07:00
Tyler Gunn
4c4405c19d Merge "Self Managed CS Implementation" am: 98fad21a8a am: 9fab4ad9b3
am: 72cb924f07

Change-Id: Ia16c6125567ceac4edfff095e737751c46fde7bf
2017-03-31 04:38:18 +00:00
Tyler Gunn
dd8756d514 Self Managed CS Implementation
- Add API guide for developers giving an overview of what they need
to implement.
- Add @hide setLabel method in PhoneAccount; used when registering a
self-managed CS's phone account; we override it with their app label to
ensure they don't try to give themselves another name.

Test: Unit
Bug: 34159263
Merged-In: I0c890dc2feeb3ee438a80ed425db2aaf1f4c1fdd
Change-Id: I0c890dc2feeb3ee438a80ed425db2aaf1f4c1fdd
2017-03-30 21:28:19 -07:00
Tyler Gunn
3765356699 Self Managed CS Implementation
- Add API guide for developers giving an overview of what they need
to implement.
- Add @hide setLabel method in PhoneAccount; used when registering a
self-managed CS's phone account; we override it with their app label to
ensure they don't try to give themselves another name.

Test: Unit
Bug: 34159263
Change-Id: I0c890dc2feeb3ee438a80ed425db2aaf1f4c1fdd
2017-03-30 19:00:41 -07:00
Tyler Gunn
bf8d2a2bf4 Merge "Support for showing self-managed calls in IncallService." am: 5a33057092 am: 8c7d28f163
am: fd0e1a9d93

Change-Id: I88170e214ca6c142e0445a814ad0e76064e72ba7
2017-03-01 23:40:53 +00:00
Tyler Gunn
5a33057092 Merge "Support for showing self-managed calls in IncallService." 2017-03-01 20:32:56 +00:00
Eugene Susla
cae3d3e59e Introduce ANSWER_PHONE_CALLS permission
This exposes an API to answer a ringing call, as well as a corresponding
runtime permission and appop

Test: Grant the permission and ensure the call gets answered.
Deny the permission, and ensure that the API call throws an exception.
Bug: 30932767
Change-Id: I4c33fcea6b95a30469fa6c0c37090be32b0ad52e
2017-02-24 20:28:46 -08:00
Hall Liu
95d5587d0a Introduce APIs for RTT calls (part 1)
Add signaling methods and data pipes for handling real-time text during
a call.

Change-Id: I876827c448252c5f786d7a4919c47891acb03877
Test: manual, through telecom testapps
2017-02-21 15:27:25 -08:00
Hall Liu
8f613fb4d6 Add extra key for app-specified outgoing call timeout
Bug: 34474757
Test: manual
Change-Id: Ia93d68d6a01308b0b93b88977daf983a0ed3a22c
2017-02-14 18:11:11 -08:00
Tyler Gunn
24e1833617 Support for showing self-managed calls in IncallService.
Also added new isInManagedCall TelecomManager API, used to determine if
there are ongoing managed calls only.

Test: Manual, cts
Bug: 34159263
Change-Id: Ib8020617607ccb433c2eee9b9d5a2c929665214b
2017-02-12 19:33:35 -08:00
Tyler Gunn
44e019140e Self managed CS implementation.
Add required AIDL changes to pass along connection fails.

Test: Manual
Bug: 34159263
Merged-In: I0a24ff786b2867aa4e19ac79959df54a04983251
Change-Id: I0a24ff786b2867aa4e19ac79959df54a04983251
2017-02-06 16:20:12 +00:00
Brad Ebinger
d1ab15a1af Merge "Deprecate old TelecomManager actions" 2017-01-23 19:09:12 +00:00
Tyler Gunn
f50354363c Adding self-managed connection service APIs.
1. Adding new APIs for self-managed connection services.
2. Adding Telecom package-level documentation.

Test: Manual (unit, cts pending; this is just scaffolding for now)
Bug: 34159263
Change-Id: Ic226ec8bfcb2fbcc02fe802b47499e47aab17d0a
2017-01-18 14:44:43 -08:00
Brad Ebinger
23b1c6d061 Deprecate old TelecomManager actions
The ACTION_INCOMING_CALL and ACTION_NEW_UNKNOWN_CALL intents are
not used anymore and have been replaced with methods in
TelecomManager. This change marks them as deprecated.

Test: None
Bug: 33783690
Change-Id: I840b0ac202237cc43a0540fe64c832e119b33aa2
2017-01-12 13:10:40 -08:00
Hall Liu
057def534c Add support for Telecom analytics extensions
Add classes for call events and a field for them in
ParcelableCallAnalytics.
Add classes for timing information on user-visible operations.
Add the TelecomAnalytics class as the top-level object for analytics.
Add log session timing information to the TelecomAnalytics class,
independent of individual calls.

Bug: 28623064
Change-Id: Ifee5fdf6b6b341869ff0ff26c4388d357e3d9922
2016-06-14 16:37:10 -07:00
Tyler Gunn
2cbe2b5816 Un-@hide multi-endpoint APIs.
Bug: 28621640
This reverts commit 1bf206b766654ea9c4e9bc7a703a9d5f1d30ab72.
Change-Id: If8c85e4adeb017eec2b7e8199010deae2a920c6a
2016-05-06 03:07:45 +00:00
Sailesh Nepal
b05e4851d0 Merge "[Call Timing] Add constants for call timing extras" into nyc-dev 2016-04-18 22:36:40 +00:00
Tyler Gunn
1bf206b766 Hide multi-endpoint APIs.
Per feature council decision, the multi-endpoint APIs will be @hide for
the N release.

Bug: 28196918
Change-Id: Ia80b089bc754ce87ca208382eb79442b5265844d
2016-04-15 11:28:44 -07:00
Sailesh Nepal
da6bb3883f [Call Timing] Add constants for call timing extras
This CL defines new extras that can be set in a call's intent extras.
These extras track the following:
    CALL_CREATED_TIME_MILLIS - the time when the call was created by
	telephony (or another connection service)
    CALL_TELECOM_ROUTING_START_TIME_MILLIS - the time when telecom
	started processing the call
    CALL_TELECOM_ROUTING_END_TIME_MILLIS - the time when telecom
	finished processing things like call blocking and was ready to
	connect to the UI

These extras can be used by the dialer to track how long it takes for
calls to be shown to the user.

Bug: 28202119
Change-Id: I8fca259d449adedaeb4ff91d35bf59a7409be866
2016-04-15 02:23:59 -07:00
Abhijith Shastry
9bacdabf3e Remove deprecated API launchManageBlockedNumbersActivity
BUG: 27364137
Change-Id: Ie608c3f75d5fe353a1ba127b0da763c421401eb8
2016-04-04 10:46:11 -07:00
Tyler Gunn
876dbfb476 Add API support for multi-endpoint.
This CL includes changes required to support multi-endpoint (see the
design doc linked off the bug).

Main changes include:
- support for indicating if a call/connection is "external" to the device.
- support for indicating if an external call can be pulled from the
remote device to the local device.
- API used to initiate a pull of a call external to the current device to
the current device.
- Made the "connection event" API public (was previously @hide); this will
be used to support passing some error events involving pulling calls to
the incall ui.
- Added new InCallService metadata which will be used to determine if an
InCallService wants to be informed of external calls.
- New disconnect causes which will be used to expose the fact that a
multi-endpoint call was answered elsewhere and that a call ended because
it was pulled to another device.
- New call log call types to indicate if calls were answered elsewhere
or pulled to another device.

Bug: 27458894
Change-Id: I423f64ff965b5e50194635a51868c327782db2a1
2016-03-14 23:26:34 +00:00
Abhijith Shastry
ec30d2fd12 Tweak createManageBlockedNumbersIntent API documentation.
BUG: 27364137
Change-Id: I82b9802b3108f4d9d405fc55fefa766dbcddd537
2016-03-04 16:47:23 -08:00
Abhijith Shastry
6701be428c Add deprecated annotation to launchManageBlockedNumbersActivity API.
BUG: 27364137
Change-Id: I0c5c05042e6bc05a605613bde7ba3c579c1858ed
2016-02-29 16:31:12 -08:00
Abhijith Shastry
a26fe99b1e Add new API to create an intent to manage blocked numbers.
This replaces the launchManageBlockedNumbersActivity API.

BUG: 27364137

Change-Id: I5d5a20d25f0dea8b8e0e998b51f80658ff404e2c
2016-02-29 11:53:43 -08:00
Hall Liu
e362e501ee Initialize MD5 in logging in background
Use a background task to call MessageDigest.getInstance in order to
avoid a possible disk read on initialization.

Bug: 26069217
Change-Id: I0091ce012bcd811dfca0e85c21a12c54913ed919
2016-02-11 10:39:40 -08:00
Brad Ebinger
ec0d33490a Update TelecomManager docs regarding PhoneAccounts
Updates the docs for addNewIncomingCall to mention that if the
PhoneAccountHandle representing a PhoneAccount is not registered or not
enabled, a SecurityException will be thrown (as of b/26864502). Also
notifies the user that PhoneAccounts are stored in DE storage
in registerPhoneAccount.

Bug: 26874536
Bug: 26780305
Change-Id: I2dae932cfa3404d7d5060dad840a75227793603e
2016-02-08 19:07:08 +00:00
Abhijith Shastry
1908cb84a5 Add API in TelecomManager to launch the UI to manage blocked numbers.
BUG: 26917087
Change-Id: Ide328d250561577f652e3a1ee093b37ad19084d8
2016-02-02 14:55:15 -08:00
Sailesh Nepal
9c2618b17f Expose a meta-data value to allow dialer ringing
This CL exposes a new meta-data, IN_CALL_SERVICE_RINGING. If this is set
to true then ringing is played by the dialer instead of Telecom.

This CL also adds a new silenceRinger() API to InCallService. This is
needed to implement ringer silence on volume key down.

BUG: 22857261
Change-Id: I498538282eddbb727104f5b879f25adbef4e6cf6
2016-01-26 17:06:06 -08:00
Sailesh Nepal
9c4b82cf95 Merge "Make missed call action public" 2016-01-23 18:28:31 +00:00
Sailesh Nepal
be15ad9b79 Make missed call action public
This CL makes the missed call notification action public. This will be
used by the dialer app to show it's own missed call UI.

See ag/850080 for more info.

BUG: 22857261

Change-Id: Ifae82d3036a278e5619edc8c766a1d0781296e72
2016-01-22 17:33:55 -08:00
Santos Cordon
888815501b Add metadata for car-mode in-call.
Change-Id: Ic2d55889e0ab65195bee549837b51c581ce5076a
2016-01-21 14:09:09 -08:00
Hall Liu
0464b9ba16 Add method to dump Telecom analytics
Add dumpAnalytics in TelecomManager to allow the connectivity stats
service to access Telecom analytics for uploading.

Change-Id: I197d6af340fac7f38b28bb44a476b5e694db4dba
2016-01-15 12:43:27 -08:00
Hall Liu
70ac616b38 Merge "Add extras tag for analytics support" 2015-12-08 21:53:25 +00:00
Tyler Gunn
6676bb5da5 Add "acceptRingingCall()" API which accepts a videoState.
- Added acceptRingingCall API which accepts a videostate to complement the
existing API.

Bug: 20159300
Change-Id: I2a9d53fd4dbbb0be49d95416f7e26d3ec61774cd
2015-11-24 15:43:20 -08:00