Commit Graph

174 Commits

Author SHA1 Message Date
Youming Ye
dcd62ad6c3 Merge "Enable Telecom to bind third party InCallServices." 2018-12-12 21:18:35 +00:00
Adrian Roos
66f859135b API: Clean up redundant and ineffective usages of SystemApi and TestApi
Everything that is marked SystemApi or TestApi, but not @hide is still
part of the public SDK, it is therefore not sound to have that combination.

In the future, specifing such a combination will be considered an error
to prevent inadvertently exposing SystemApi and TestApi as public API.

Bug: 115333477
Change-Id: Ibd5d6a22862fdbc1e20a1cb3925280f5a682edea
Test: METALAVA_PREPEND_ARGS="--error UnhiddenSystemApi" m checkapi
Exempt-From-Owner-Approval: API cleanup
2018-12-11 20:38:02 +01:00
Youming Ye
8ded93ac94 Enable Telecom to bind third party InCallServices.
Changes for Telecom to bind third party companion apps or
automotive ui installed from Play Store. Add new permissions and
settings for the third party InCallService APIs.

Bug: 78174835
Test: Manual
Change-Id: I1b4eff28b9dfd61f1c951d14b6c82395b51fe769
2018-12-11 18:25:38 +00: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
tonyzhu
ff60f5ec27 [Call Screening]Programmatically changing the default call screening app.
Increase three methods in TelecomManager.java, modify
ITelecomService.aidl to make sure framworks can comunicate with service.

Bug: 113302920
Test: atest TelecomServiceImplTest.
Test: simulate third party call screening application to use methods in
TelecomManager.java, and triggle the activity to show the dialog of
setting default call screeening application.

Change-Id: I1e34061acd575813e92403c137731e618abb88d5
2018-10-30 15:50:49 +00:00
Chen Xu
4c0b06d1d1 Revert "Revert "Telephony light grey list clean up for Q""
This reverts commit bab59cb9db.

Reason for revert: Put maxTargetSdk=P now will move APIs onto light greylist
because per-SDK versioned dark greylist is not yet supported by ART. We can
keep doing annotation work without breaking existing apps targeting on P.

Bug:117934933
Bug:112477300

Change-Id: I5e0e693dde49fac3044cd73fd6360c4485f312ec
Merged-in: I5e0e693dde49fac3044cd73fd6360c4485f312ec
2018-10-26 23:31:40 +00:00
Chen Xu
bab59cb9db Revert "Telephony light grey list clean up for Q"
This reverts commit 253bdb7175.

Reason for revert: This CL caused MMS break because Bugle is using the
hidden API in Q's darkgrey list. The proper fix should either come from
Bugle team if their apk moved to Q, or compat team to explore why this
caused issue for app target on P.

Change-Id: Icc6c190cde79c10d9045183c0b80cdf008e95578

Bug: 117899984
2018-10-19 18:05:32 +00:00
chen xu
253bdb7175 Telephony light grey list clean up for Q
Bug: 112477300
Test: Telehony unit test
Change-Id: I5229224fe9a65b3647a42070f287e23f67084bda
Merged-in: I5229224fe9a65b3647a42070f287e23f67084bda
2018-10-15 10:19:43 -07:00
Tyler Gunn
c37445cb4e Add handleCallIntent method in TelecomManager.
This is an @hide method usable only from within Telecom itself in order to
trampoline an ACTION_CALL intent from the UserCallActivity to
Telecom's system service.

Bug: 116719392
Test: Verify that calls initiated via CALL intent no longer get rebroadcast
and are instead sent directly to Telecom.

Change-Id: Ie765631bef8329a8ed12723d9c037a44b4f80882
2018-09-28 16:16:20 -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
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
Shaotang Li
8cec25c346 Add new telecom metrics for emergency dialer
These includes,
1. The source where user initiated the call.
2. The duration between START_CONNECTION and REQUEST_DISCONNECT.

Bug: 111818008
Test: manual and check the result of
'adb shell dumpsys telecom' for metrics data
Change-Id: Iddc7f256362abe9fe252bd12cead05a7d77d329e
2018-09-06 12:38:18 +08:00
Mathew Inwood
ec3f7c80ce Merge "Add @UnsupportedAppUsage annotations"
am: 44091cdb47

Change-Id: I1dfae6f3d8ba8d5ff63f378c71f9670199a3adc3
2018-08-06 09:47:13 -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
Tyler Gunn
f858a0e8d2 Make TelecomManager#endCall a public API.
A broad category of apps such as wearable companion apps and call blocking
apps rely on the ability to reject a ringing call.
Previously this was achieved using a broken TelephonyManager API which
lacked permission checks.
To support these applications, removing the @hide attribute on the existing
TelecomManager#endCall API so that apps with the existing
ANSWER_PHONE_CALLS permission can reject ringing calls and end ongoing
calls.  Logically if an app has permission to answer a call, it should be
able to end it.

Test: Created test app to verify API permission checks.
Test: Added new CTS tests to cover this API.
Bug: 78290258
Merged-In: Ic6527969793ebe05eb9c5fa8205558ae788ea572
Change-Id: Ic6527969793ebe05eb9c5fa8205558ae788ea572
2018-05-08 11:19:18 -07:00
Tyler Gunn
aae778c669 Merge "Make TelecomManager#endCall a public API." into pi-dev
am: 872a039ab3

Change-Id: Ic52e1705ce497b0a46bb4107ad854a8b939b38b0
2018-05-07 21:11:14 -07:00
Tyler Gunn
e1aa26c744 Make TelecomManager#endCall a public API.
A broad category of apps such as wearable companion apps and call blocking
apps rely on the ability to reject a ringing call.
Previously this was achieved using a broken TelephonyManager API which
lacked permission checks.
To support these applications, removing the @hide attribute on the existing
TelecomManager#endCall API so that apps with the existing
ANSWER_PHONE_CALLS permission can reject ringing calls and end ongoing
calls.  Logically if an app has permission to answer a call, it should be
able to end it.

Test: Created test app to verify API permission checks.
Test: Added new CTS tests to cover this API.
Bug: 78290258
Change-Id: Ic6527969793ebe05eb9c5fa8205558ae788ea572
2018-05-02 13:23:48 -07:00
Tyler Gunn
ac55e9dd01 Merge "Update API docs for Telephony call state reporting." am: c2493ee1ee
am: 1ba28fec3f

Change-Id: I60014a59db60610746841840278adead80963db8
2018-03-14 17:22:06 +00:00
Tyler Gunn
5f7265ec9c Update API docs for Telephony call state reporting.
Update TelephonyManager#getCallState,
PhoneStateListener#onCallStateChanged to make it clear which calls each
method considers in determining call state.
Added intdef for call state (allows auto doc generation of valid
values for parameters).

Test: make docs
Bug: 73245376
Change-Id: I70ebd0f00ae3f0e1370ae275be8f8ef6f008523d
2018-03-13 15:56:37 -07:00
Tyler Gunn
3a09dc185b API Documentation and Constant cleanup.
1. Update handover API docs for clarity.
2. Added an unknown value per API review comments.
3. Renamed HANDOVER_FAILURE_DEST_USER_REJECTED to
HANDOVER_FAILURE_USER_REJECTED
3. Removed the HANDOVER_FAILURE_DEST_INVALID_PERM constant since it isn't
used (methods which deal with permissions throw security exceptions).

Test: Make doc and verify documentation.
Fixes: 73751004
Fixes: 73750515
Fixes: 73750817
Merged-In: I7860fcd813f25adaaccf632f2c61dd4138a0a889
Change-Id: I7860fcd813f25adaaccf632f2c61dd4138a0a889
(cherry picked from commit c7a86b14a8)
2018-03-07 23:17:54 +00:00
Tyler Gunn
168a77237f Merge "API Documentation and Constant cleanup." am: 8882c55b21
am: 8917fc21cc

Change-Id: Ic4a159b838c952594b0860ded69fc07c74180961
2018-03-07 20:56:29 +00:00
Treehugger Robot
8882c55b21 Merge "API Documentation and Constant cleanup." 2018-03-07 19:33:52 +00:00
Tyler Gunn
9d12773b51 API Documentation and Constant cleanup.
1. Update handover API docs for clarity.
2. Added an unknown value per API review comments.
3. Renamed HANDOVER_FAILURE_DEST_USER_REJECTED to
HANDOVER_FAILURE_USER_REJECTED
3. Removed the HANDOVER_FAILURE_DEST_INVALID_PERM constant since it isn't
used (methods which deal with permissions throw security exceptions).

Test: Make doc and verify documentation.
Change-Id: Id21d6b4c83d5c773ab38d78eb6b1886a1ac4dadf
Fixes: 73751004
Fixes: 73750515
Fixes: 73750817
2018-03-02 15:45:51 -08:00
TreeHugger Robot
4993e55242 Merge "Revert "Add deep link to the assisted dialing settings."" 2018-02-26 16:02:34 +00:00
TreeHugger Robot
c73f954cc7 Merge "Revert "Add the assisted dialing carrier config."" 2018-02-26 16:02:34 +00:00
Eric Erfanian
dd2db2f5a3 Revert "Add the assisted dialing carrier config."
This reverts commit af7b8c0a67.

Reason for revert: we're cutting the feature from P

Change-Id: I1ccc2c36b480f64c3a8b3df7eee73f80b7863722
Bug: 73727182
2018-02-21 19:48:50 +00:00
Eric Erfanian
7c96780cb7 Revert "Add deep link to the assisted dialing settings."
This reverts commit 5ff756e6c8.

Reason for revert: we're cutting the feature from P

Change-Id: I74cc929ef1f7fd499feef9c68a95a34a3e15cbec
Bug: 73727182
2018-02-21 19:48:30 +00:00
Tyler Gunn
cfad0bea7e Merge "Pass calling package for invocations of endCall API." am: 44289caa11 am: e05da7e86b
am: 654b7fc322

Change-Id: Id7c74fa539b7e7e26dfdc8b612d9299d8c20c19b
2018-02-09 22:19:49 +00:00
Tyler Gunn
c865881999 Pass calling package for invocations of endCall API.
Pass the calling package for debugging purposes.

Test: Manual
Bug: 73006395
Change-Id: I5ea7f1f0033438de3cdc2c47fc8a03f05d9e4590
2018-02-07 16:08:27 -08:00
Tyler Gunn
858bfaf79c Add handover permission, fill in some missing API gaps.
Adding the ACCEPT_HANDOVER runtime permission which an app must have in
order to accept handovers (this is per design).

Adding missing onHandoverComplete method in the android.telecom.Connection
API (per design).

Finishing plumbing for android.telecom.Call#onHandoverComplete API.

Fix issue where the new handover API methods would never get called; the
legacy handover extra was being used in this case when it should not have
been.

Bug: 65415068
Test: Verified using new CTS tests
Change-Id: If1558f6a23911862c02ac5b18fb62d86911ed7e2
Merged-In: If1558f6a23911862c02ac5b18fb62d86911ed7e2
2018-01-25 16:20:03 -08:00
Tyler Gunn
79bc1ec8a9 Add handover permission, fill in some missing API gaps.
Adding the ACCEPT_HANDOVER runtime permission which an app must have in
order to accept handovers (this is per design).

Adding missing onHandoverComplete method in the android.telecom.Connection
API (per design).

Finishing plumbing for android.telecom.Call#onHandoverComplete API.

Fix issue where the new handover API methods would never get called; the
legacy handover extra was being used in this case when it should not have
been.

Bug: 65415068
Test: Verified using new CTS tests
Change-Id: If1558f6a23911862c02ac5b18fb62d86911ed7e2
2018-01-24 16:11:27 -08:00
Eric Erfanian
5ff756e6c8 Add deep link to the assisted dialing settings.
This enables clients to reference the setting directly.

Test: none
Bug: 72162646
Change-Id: I58ccfa41e2fd4a6260fe4510fbbcd6067cd0d61f
2018-01-24 11:37:52 -08:00
Eric Erfanian
af7b8c0a67 Add the assisted dialing carrier config.
This is used to activate the feature and show the settings.

Remove @hide from the public APIS.

Design doc:
go/assisted-dialing-dd-v1

Test: manual
Bug: 63934304
Change-Id: I09ea52720bf2439537e2f4ad32afb14f5df25f71
2018-01-22 19:23:04 +00:00
Sanket Padawe
4940b647a4 Merge "Add permission check for old call handover apis." am: e8fc3d2399 am: 7a97ee9acd
am: 440bd9cb05

Change-Id: Ibd08720dba54949234376d5a5ca021c722330091
2018-01-13 02:59:49 +00:00
Sanket Padawe
e8fc3d2399 Merge "Add permission check for old call handover apis." 2018-01-12 23:50:40 +00:00
Sanket Padawe
f6a9e5b6e0 Add permission check for old call handover apis.
Bug: 65415068
Test: manual
Change-Id: I4784debf1be255de24c341fe5474fc529bc1cebe
2018-01-12 10:17:42 -08:00
Joseph Pirozzo
d2a9fc7abe Bluetooth in band ring
Prevent the telecom service from generating a ringer if there is already
a ringer generated by a phone connected over bluetooth headset client
service.

Bug: 65673832
Test: runtest telecom-unit -c
com.android.server.telecom.tests.RingerTest

Change-Id: I40710787cab0215f0456153a3557aa8cf1a50cdf
(cherry picked from commit 40ea5eea41)
2018-01-11 14:07:25 -08:00
Joseph Pirozzo
2bcc515f25 Merge "Bluetooth in band ring" 2018-01-11 17:16:24 +00:00
Brad Ebinger
806ab4220f Merge "Remove hashing for PII in Telecom Logging" am: e77808d936 am: 388aca53f1
am: d8b0a97ce4

Change-Id: I4867c726c391a346510c5579c7987bb868277f69
2018-01-09 21:28:13 +00:00
Joseph Pirozzo
40ea5eea41 Bluetooth in band ring
Prevent the telecom service from generating a ringer if there is already
a ringer generated by a phone connected over bluetooth headset client
service.

Bug: 65673832
Test: runtest telecom-unit -c
com.android.server.telecom.tests.RingerTest

Change-Id: I40710787cab0215f0456153a3557aa8cf1a50cdf
2018-01-09 11:46:31 -08:00
Brad Ebinger
f784b29c9d Remove hashing for PII in Telecom Logging
Replaces the MD5 hash for logging PII in
Telecom with "***" instead.

Test: Manual
Bug: 67823981
Change-Id: Ieb089fe806663062a551ce7b9071e8b8f5fa9af7
2017-12-22 13:45:27 -08:00
Eric Erfanian
ec88187e62 Add assisted dialing properties to the framework.
These properties allow the feature to be propogated from
the outgoing call broadcast, to the connection, to the call,
and finally to the call log as a feature.

Test: no existing unit tests found. could use some pointers
Bug: 35963245
Change-Id: I3ed8ac5ad7300c44f87e2573d9409b3a92b98ab6
Merged-In: I84343fb0cda16514c01997fd71d1e819b5b7eebb
2017-12-12 09:45:01 -08:00
Eric Erfanian
62706c510c Add assisted dialing properties to the framework.
This is a manual merge of the oc-mr1-dev change
I086e761ada9a57dca61c3a412561ee54255d6260

These properties allow the feature to be propogated from
the outgoing call broadcast, to the connection, to the call,
and finally to the call log as a feature.

Test: no existing unit tests found. could use some pointers
Bug: 35963245
Change-Id: I84343fb0cda16514c01997fd71d1e819b5b7eebb
2017-12-07 10:29:17 -08:00
Jeff Sharkey
983df8cc6c Massage APIs for upcoming doclava change.
These changes are needed to ensure that "checkapi" doesn't claim
that we're changing the API after an upcoming doclava change.

Test: manual inspection of API text files
Bug: 69505783
Change-Id: I8292ba80cc65b7dd78f0e9dba4fcc7ffcedfab9c
Merged-In: I8292ba80cc65b7dd78f0e9dba4fcc7ffcedfab9c
2017-12-06 21:55:57 -07:00
Charles He
858f132e0c Enable outgoing emergency calls in LockTask mode.
As part of the LockTask 2.0 work, we allow DPCs to enable the system lock
screen in LockTask mode. When the device is protected by a PIN, pattern, or
password, the lock screen will have an entry point to the emergency dialer
which allows the user to make emergency calls (e.g., 911).

Therefore, we whitelist the activities that are necessary to place this
outgoing emergency call when LOCK_TASK_FEATURE_KEYGUARD is enabled.

Bug: 68750910
Test: bit FrameworksServicesTests:com.android.server.am.LockTaskControllerTest
Test: CTS verifier > CTS verifier > Managed provisioning > Device owner tests
      > LockTask UI
Change-Id: Iaeeec2c462b978d2d201c5660024a3dd7283ae07
2017-12-05 14:46:17 -08:00
Jeff Sharkey
9650a435ed Massage APIs for upcoming doclava change.
These changes are needed to ensure that "checkapi" doesn't claim
that we're changing the API after an upcoming doclava change.

Test: manual inspection of API text files
Bug: 69505783
Change-Id: I8292ba80cc65b7dd78f0e9dba4fcc7ffcedfab9c
2017-11-22 12:28:09 -07:00
Sanket Padawe
6884b5e1f5 Merge "API declarations for Call Handover." am: d88abc7b60 am: c376ca6bc1
am: 41cff321b6

Change-Id: Ia5013e7e0288f037cd94d24c40a72278a60cc50d
2017-11-16 02:08:32 +00:00
Sanket Padawe
a8eddd48c4 API declarations for Call Handover.
Design doc:
https://docs.google.com/document/d/1qY3oAzjff_4A1ttYb_CGrE_OwTRmXMG_KGsIuPT1ey8/edit#

Bug: 65415068
Test: manual.
Change-Id: I0c2f561d92ad6504f858eadde09980fc1ce8727f
2017-11-15 13:41:05 -08:00
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