65 Commits

Author SHA1 Message Date
Santos Cordon
895d4b8f63 Telecom API council changes.
- adding more javadocs.
- fixing javadoc on isEnabled
- renaming to CONFIGURE_PHONE_ACCOUNT

Bug: 21573551
Change-Id: Ice035b8573a08ea18181a73c9e9a462520a934f1
2015-06-29 16:17:47 -07:00
Santos Cordon
f2600eb5ac InCallService meta-data [2/4]
Bug: 21816241

Change-Id: I9af91a1287f652247ef590878759aa277bd925e5
2015-06-23 15:13:39 -07:00
Santos Cordon
7a060d5e2b Additional javadoc.
Change-Id: Iba7f9315521314d066a166ba884ac71c3a9c2496
2015-06-22 10:38:30 -07:00
Santos Cordon
2c27b9a9fa Clean up SIM CallManager APIs.
Bug: 21499476
Change-Id: Iaded74c6b885b0745dfa85d0b7733bdad75d615a
2015-06-18 16:13:54 -07:00
Yorke Lee
107c4ce2ac Send broadcast when default dialer changes
Add hidden TelecomManager.setDefaultDialer for system apps
to set the default dialer and trigger the broadcast

Bug: 21846308
Change-Id: Ifdd30cd1323ab0157edf7fd966173b6c52df6ba0
2015-06-15 12:36:09 -07:00
Yorke Lee
02fb5bc52b Rename TelecomManager.EXTRA_INCOMING_CALL_ADDRESS
Bug: 19696065
Change-Id: Ibe253c8cd66938ea1cd560d443008026eb1005d9
2015-06-09 12:28:06 -07:00
Yorke Lee
04ea7d3b7c Add telecom extra to specify handle for incoming call
Bug: 19696065
Change-Id: Ie7c9e3f982808abd4944cfa7bd3c754b93479f84
2015-06-05 16:00:12 -07:00
Yorke Lee
db6da48621 Allow default dialer changes and phone account enable/disable via ADB
Add commands accessible via adb shell that can be used for CTS tests
without the need for adb root
*set-phone-account-enabled
*set-phone-account-disabled
*set-default-dialer
*get-default-dialer

Modify enablePhoneAccount/setDefaultDialer to indicate success.

Remove now unused functionality in ProtectedEnableAccountPreferenceActivity
and ProtectedChangeDefaultDialerActivity.

Bug: 21583012
Change-Id: I542d145cc969334c004b8344fbbb01f278256f9d
2015-06-02 14:23:21 -07:00
Yorke Lee
5cf2dde3f7 Add ability to modify default dialer via ADB
Add hidden action to TelecomManager

Change-Id: I698c0154f438cdaf78926f12a261cbc0eb807cd0
2015-05-29 14:56:32 -07:00
Yorke Lee
656eeb0402 Make ACTION_CONNECTION_SERVICE_CONFIGURE public
Bug: 21499146
Change-Id: I3b931231807eec0aed91832013c7c055005fc9ad
2015-05-28 16:12:46 -07:00
Santos Cordon
d8faf70b80 Add intents for enabling phone accounts.
Bug: 20303449
Change-Id: If0057d42373b6964193c562ae8a8487a0299da76
2015-05-20 16:55:59 -07:00
Santos Cordon
91371dc036 Add enable/disable properties to phone accounts.
Bug: 20303449
Change-Id: Ie6203a284454d43f4dd20917f0f1fda0b36484f8
2015-05-19 13:06:21 -07:00
Santos Cordon
ed769ae5d2 Improve javadoc for PRESENTATION_ constants.
Bug: 21089678
Change-Id: I045fd71a30c75c213dd5c0c64ded983ea5e5d866
2015-05-13 19:09:47 -07:00
Yorke Lee
32f2473160 More video related API fixes
android.telecom.Connection.VideoProvider
* onSetPauseImage takes Uri instead of String
* changeCallDataUsage -> setCallDataUsage
* add quality constants to changeVideoQuality() docs

android.telecom.InCallService.VideoCall
* setPauseImage takes Uri instea dof String

android.telecom.VideoProfile.VideoState
* Move constants to VideoProfile, prefix with STATE_

Bug: 21040387
Bug: 21066505
Change-Id: I764e72aced9d1e2d30d6d0cf0862100860d47c79
2015-05-12 16:45:14 -07:00
Yorke Lee
a5d5c1d084 Fix potential NPE in TelecomManager.placeCall
Don't pass null parameters

Change-Id: Icf8f4eb3e96a51a5c091322c83ae163e366c21de
2015-05-05 16:36:22 -07:00
Yorke Lee
f1a349bda3 Add default dialer checks to Telecom/Telephony
Check for the default dialer or the modify phone state permission
for various TelecomManager/TelephonyManager methods.

Make sure to check the user-selected default rather than the
hardcoded package name.

Exercise this code in TestDialerActivity.

Bug: 20304458
Change-Id: Ic04cd8f2ba98e1d54c39549ae89d3e11cd5cdafb
2015-04-29 16:21:00 -07:00
Yorke Lee
1011f4870c Add APIs to getDefaultDialerPackage and getSystemDialerPackage
getDefaultDialerPackage is a public API and will be used by
apps to determine if they are the default dialer.

getSystemDialerPackage is a hidden API and is only used by
system components.

Also add new public string constants to allow apps to show
a dialog requesting that the user change the current default
dialer.

Bug: 20304458
Change-Id: I121d36741474c1fe171c372fb766a6c128228c9c
2015-04-24 11:12:34 -07:00
Yorke Lee
3e56ba14cc Add TelecomManager.placeCall
Places a new outgoing call using the system telecom service
with the specified parameters.

Making emergency calls using this method requires that the
method-caller is either the user-selected default dialer app
or preloaded system dialer app.

Requires that the caller have the
{@link android.Manifest.permission#CALL_PHONE} permission.

Bug: 20348183
Change-Id: Ieedb5628e8c6be25137944e7c3639dc1d9bc61df
2015-04-23 16:48:52 -07:00
Svet Ganov
16a1689950 Add OP_READ_PHONE_STATE app op - framework
The READ_PHONE_STATE permission protects PII information and
is in the Phone group. This change is adding the corrseponding
app op for gating access to the API guarded by READ_POHNE state
which will be used instead as an access control for legacy apps.

Change-Id: I2ff895a5a0e529f26ec0ad706266a30d829268ba
2015-04-17 20:43:56 +00:00
Yorke Lee
49e2d46812 Change hasVoicemailNumber to getVoicemailNumber
Bug: 20223485

Change-Id: I67eb12e2030ec8f73326ade4eb750b0c2f6e52ad
2015-04-16 09:30:57 -07:00
Jay Shrauner
225ccadc03 Hide getUserSelectedOutgoingPhoneAccount
Bug:20224972
Change-Id: I21528788e38817f77fc68b56e26a33ac726d39e2
2015-04-15 15:51:15 -07:00
Yorke Lee
f5d5840b66 Make defaultOutgoingPhoneAccount public
Bug: 20224972
Change-Id: I8bbf92258461d522ec57cfe610ca4c969bec75be
2015-04-15 12:53:53 -07:00
Jay Shrauner
55b97525f0 Make Telecom/InCallUI APIs public
Bug:20260870
Change-Id: Ie3a2db0685664f2f1ceea8f40b1249d01e9385b8
2015-04-15 12:03:48 -07:00
Yorke Lee
0604427a25 Changes for TelecomManager API review
* clearAccounts -> clearPhoneAccounts
* handleMMi(PhoneAccountHandle, String) -> handleMMi(String, PhoneAccountHandle)
* hasMultipleCallCapableAccounts -> removed
Bug: 20160799

Change-Id: Ifcd26474f04b71aa725299b6016004151b76bc31
2015-04-14 15:16:59 -07:00
Vinit Deshpande
4cd92835be Fixing build after merge from mirror-m-wireless-internal-release
There have been few breaking changes

1. TelecomManager.getCallCapablePhoneAccounts is not hidden anymore
2. CAPABILITY_VIDEO_CALLING is not hidden anymore
3. mPhoneStateListener doesn't exist anymore, so it is commented out

Change-Id: I22221eda73a20c745e316d9d56f914ab17b83533
2015-03-15 14:04:19 -07:00
Santos Cordon
c66f3baa42 Hide calllog entries for unregistered phone accounts
Change-Id: If1f873dd41c973442fa7a24020e56d13b7b5ad2c
2015-03-03 00:33:35 +00:00
Andrew Lee
873cfbf185 Add intent for call accessibility settings.
Preparatory work for adding a new Accessibility settigns activity
in Telephony, which we will need an intent to be able to launch.

Bug: 19372734
Change-Id: Ibf72ffe21da3ba2819eb165dda9bde30204bab68
2015-02-26 15:32:16 -08:00
Andrew Lee
866080f28a Add intent for configuring RespondViaSms.
Bug: 19372734
Change-Id: I8dcead3281b42d38c2b2f40aa70ad8fbf5b2d8fb
2015-02-19 12:05:33 -08:00
Brian Attwell
ad147f4b59 Unhide telecom APIs needed by Contacts
* Removed @SystemApi and @hide from some telecom classes
  and APIs
* Stopped using explicit @link's to ConnectionService, so
  that I didn't need to unhide ConnectionService
* Added @SystemApi to hidden methods inside classes that
  I removed @SystemApi from.
* Ran update-api. This picked up unrelated Math changes
  from b/11388705.

Unbundling

Bug: 18777272
Bug: 11388705
Change-Id: I218e0c3c0ae515d3deb2d3b67657db45a0bad999
2015-02-04 18:04:17 -08:00
Nancy Chen
5cf27847b0 Add method in TelecomManager to return line1Number for a PhoneAccount.
Since we do not want to expose SubIds in the app layer, we need a
wrapper to extra the subId from a PhoneAccount and return the
value of TelephonyManager#line1Number.
Also update error strings to be more consistent.

Bug: 19087382
Change-Id: Ie5a474d45336921d1007b36a4d26cd4da68f8b91
2015-01-24 23:32:02 -08:00
Nancy Chen
8c066f7cc3 Use TelecomManager to call TelephonyManager#getVoicemailNumber (1/2)
Since we don't want the phone app to call TelephonyManager methods
directly, create a method in TelecomManager to mimic the behavior. The
reason we don't return the voicemail number directly is because once
TelecomManager becomes public, we don't want any old app to be able to
get the SIM's voicemail number.

Bug: 18233678

Change-Id: I620af409788aea7b58169b72a563baeed8115080
2014-12-04 14:28:21 -08:00
Sailesh Nepal
7a4e3871e7 Add system API to get registered connection managers
This API is used to check if we're in the simplified
version of the call assistant settings UI or the version
that displays a full list.

Bug: 18473946
Change-Id: I7dca50ada80b2203bd8d646bb510418646382df8
2014-11-21 11:01:40 -08:00
Evan Charlton
0e094d926c Apply @hide / @SystemApi to android.telecom.*
Move the android.telecom.* namespace back to @hide, and also mark it
with @SystemApi so that system-privileged apps can use them.

Bug: 18302450
Change-Id: I33ae1b9b0dfdb1c5eff51ca3c829196bcfc9411c
2014-11-10 11:52:31 -08:00
Sailesh Nepal
3fdf2a84c0 Make APIs to get system phone accounts public
This is used by Wi-Fi calling to handoff and incoming
call to a cellular call.

For example, when doing an handoff we can look through
the outgoing phone accounts and find the one that the user
has verified with their google account. We can then
handoff to that phone account.

Bug: 17686424
Change-Id: I06d42aa8f4a36d11e5293ed6f7c62b796226f5c1
2014-11-06 12:20:56 -08:00
Nancy Chen
b2299c1303 Adn queries for multi-SIM. (2/3)
Define a method in Telecom to take in a subscription account and return
the URI for an ADN query for that account.

Bug: 17917937
Change-Id: Ic50a4add7fe44a5164271dc9c9e5a58e45e72336
2014-11-03 11:11:56 -08:00
Nancy Chen
e1678ddf7a Merge "Handle MMI for multi-SIM (1/3)" into lmp-mr1-dev 2014-10-31 22:06:28 +00:00
Nancy Chen
95e8a67933 Handle MMI for multi-SIM (1/3)
+ Add Telecomm and Telephony methods for handlePinMMIForSubscriber
+ Add Select Account dialog in Dialer for MMI

Bug: 17917937

Change-Id: I26fdc68a07ca0483bf7a052598fe31b1461fd486
2014-10-31 11:26:38 -07:00
Santos Cordon
c1c86151b0 Merge "More updates to javadocs for Telecom APIs." into lmp-mr1-dev 2014-10-30 20:01:40 +00:00
Santos Cordon
d9e614fd56 More updates to javadocs for Telecom APIs.
Change-Id: I8f8389f521c0d654c9bfdc3ad9670be0d118f480
2014-10-29 14:13:00 -07:00
Anthony Lee
6727926a96 Added a function to clear accounts for a specified package.
Right now, clearAcounts() only clears the accounts
for the calling package. This new function will allow a class like
PhoneAccoutBroadcastReceiver to clear accounts for any package.

Bug: 17689845
Change-Id: I24db104268535e7e0e33e093e8fab63765df0b08
2014-10-28 22:39:58 -07:00
Yorke Lee
7c72c2d3c2 Add comment to TelecomManager.getCallState
Explain why READ_PHONE_STATE permission is not required so that
people don't try to add it in the future. Requiring the permission
causes stability crashes with legacy apps and system components
that don't have the permission.

Change-Id: Idf8766aa409d4a2c4ed3d6f81a398f4a0eb24615
2014-10-28 14:12:02 -07:00
Tyler Gunn
b31868df32 Merge "Remove TODO in TelecomManager." into lmp-mr1-dev 2014-10-23 23:09:16 +00:00
Santos Cordon
db7fc1e833 Merge "Remove SystemApi annotations." into lmp-mr1-dev 2014-10-23 22:58:29 +00:00
Santos Cordon
6c4ce40206 Remove SystemApi annotations.
SystemApi only makes sense for hidden APIs.

Bug: 18097290
Change-Id: I76af5f54321c4010334ef419bb7e066663ec784c
2014-10-23 10:20:12 -07:00
Tyler Gunn
a94ae5e7e3 Remove TODO in TelecomManager.
Bug: 18095076
Change-Id: I6509d295e9e25973040e06be96cf1046edc619ff
2014-10-23 09:04:19 -07:00
Nancy Chen
df385fffe8 am a6a1c52f: Merge "Use Telecom API for checking if a number is voicemail (1/2)" into lmp-sprout-dev
* commit 'a6a1c52f58f24194de2665bb922577a9d7f6dccf':
  Use Telecom API for checking if a number is voicemail (1/2)
2014-10-17 00:05:36 +00:00
Nancy Chen
6f0c3f1a9a am c913c2de: Merge "Revert "Add API method to extract subscription ID from phone account (1/3)"" into lmp-sprout-dev
* commit 'c913c2dec18519ae5b989f65b207c7b3fec2d0ef':
  Revert "Add API method to extract subscription ID from phone account (1/3)"
2014-10-17 00:05:14 +00:00
Nancy Chen
443e501c46 Use Telecom API for checking if a number is voicemail (1/2)
Since we don't want to communicate directly with Telephony in dialer, call
PhoneNumberUtils.isVoiceMailNumber (a Telephony method) through the
Telecom API. Add a method in TelecomManager to do this.

Bug: 17925501

Change-Id: Iecea82a0e5f0b106eaf105e9026d606110acf122
2014-10-16 14:48:09 -07:00
Nancy Chen
c913c2dec1 Merge "Revert "Add API method to extract subscription ID from phone account (1/3)"" into lmp-sprout-dev 2014-10-16 21:17:03 +00:00
Nancy Chen
af6732ef6f Revert "Add API method to extract subscription ID from phone account (1/3)"
This reverts commit b0cad32c3cadd0387f6dcd82aade629e6f2f6bee.

Change-Id: I54b6373ba0fc7d1ecc64c6ceedc7b371c7017cd8
2014-10-16 21:08:39 +00:00