126 Commits

Author SHA1 Message Date
Tyler Gunn
4538216a31 Change sendSessionModifyRequest VideoProvider API signature.
Including a fromProfile in addition to the requestedProfile.

- Changed VideoCallImpl to generate the fromVideoProfile based on the
call's current videoState.  This ensures the InCall UI only needs to
pass in the new video profile; the VideoCall Impl already has enough
knowledge to generate the fromProfile.
  - Changed VideoCallImpl to track the current videoQuality, which forms
a part of the fromVideoProfile.

Bug: 20704229
Change-Id: I89f293f03a2b13fc8c1dcfd8a07ab8640d3950e0
2015-05-06 08:52:27 -07:00
Prerepa Viswanadham
b6f9da0b7f Merge commit '17455a3' into master_merge 2015-05-01 10:12:11 -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
Anthony Lee
17455a3d39 Add plumbing for merge failures and renable button. (3/4)
The merge failure is not plumbed up through any layer that
can trap the callback and act on it.  The first part of this
fix is to create that plumbing.  Then we need to reenable the
merge button. At this point in time, we leverage the fact
that forcing the call to reassess its capabilities will poke
the InCallUI to reenable the merge button. In the future, we
should plumb the merge failure all the way to InCallUI and
not only handle the button but display UI to the user. The UI
is currently being displayed by CallNotifier which is the wrong
place. See b/20530631 for more details.

Bug: 20229905
Change-Id: I0355ada46b484c6db4bee656c77386dd61be5e1f
2015-04-28 07:13:34 -07:00
Etan Cohen
cd895cdf4d Merge changes from topic 'mwd-merge-042415'
* changes:
  Rename removeVideoCallListener to unregisterCallback
  Bluetooth document fix: remove reference from open API to hidden entities
  Fix build due to merge of 7595842 and renaming due to 8eb87f0
  Merge commit '052a0da' into merge2
  Merge commit 'db1dbb8' into merge2
  Merge commit '7e5e791' into merge2
  Merge commit '170102d' into merge2
  Merge commit '4cb5d80' into merge2
  Merge commit '83cda00' into merge2
  Merge commit 'c91bc62' into merge2
  Merge commit 'cffc360' into merge2
  Merge commit '7f61051' into merge2
  Merge commit '167c3a7' into merge2
  Merge commit '4467b98' into merge2
  Merge commit '25a217c' into merge2
  Merge commit '04b18ec' into merge2
  Merge commit '7595842' into merge2
  Merge commit '2bbd2b6' into merge2
  Merge commit '4890351' into merge2
  Merge commit 'cd405fe' into merge2
  Merge commit '6ddbb5e' into merge2
  Merge commit 'de93575' into merge2
  Merge commit '9561e74' into merge2
2015-04-25 00:51:47 +00:00
Etan Cohen
d7b4b81274 Merge commit '7595842' into merge2
Change-Id: I7e11e98e6d59562374195a8761d64a79dc0268e8
2015-04-24 13:56:35 -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
Jay Shrauner
6f20a6a2b4 DO NOT MERGE Remove connection substate
Bug:20300433
Change-Id: Ifefc08b5165de3e0b6ce92007e5f612879dcc4d9
2015-04-16 15:05:05 -07:00
Jay Shrauner
8f98843924 Remove connection substate
Bug:20300433
Change-Id: Ifefc08b5165de3e0b6ce92007e5f612879dcc4d9
2015-04-16 14:42:39 -07:00
Yorke Lee
167c3a717f DO NOT MERGE Change hasVoicemailNumber to getVoicemailNumber
Bug: 20223485
Change-Id: I293572bb6c32c5084fe684e7cfe7bd2bbfb5443b
2015-04-16 12:40:23 -07:00
Tyler Gunn
75958420f2 Support for multiple VideoCall.Listeners for a VideoCall.
The current code assumes that only a single instance of VideoCall will be
provided to the default system InCall UI.  Ideally multiple
InCallService implementations should be able to use the VideoCall APIs.
Note: it only really makes sense for a single InCallService to get/set
the video surfaces.

- Fixed bug in ParcelableCall which would cause a new instance of
VideoCallImpl to be created every time a call is updated from Telecom.
Added a flag to ParcelableCall to indicate whether the parcel includes a
change to the video provider information, which is used when unparceling
to determine whether to set/create the video call impl.
- Renamed "setVideoCallback" to "addVideocallback".
- Modified Connection.VideoProvider code to keep a list of Video callbacks
and fire off all of them when Video Provider changes occur.

Bug: 20092420
Change-Id: Ic16b6afe1b7532cc64d006c133adbae57946d97d
2015-04-16 16:37:25 +00:00
Yorke Lee
49e2d46812 Change hasVoicemailNumber to getVoicemailNumber
Bug: 20223485

Change-Id: I67eb12e2030ec8f73326ade4eb750b0c2f6e52ad
2015-04-16 09:30:57 -07:00
Rekha Kumar
07366813cd IMS-VT: Upgrade/Downgrade change
-Add isVideo API to VideoProfile.VideoState

IMS-VT: Fix propagation of device orientation.
Orientation received at VT Service is incorrect.
Fixed propagation of device orientation to VT service.

IMS-VT: Upgrade fix
-Add session modify call timed out constant

Notify listeners of video quality changed event
- Propagate the video quality changed message to the UI.

IMS: Add support for video quality
- Add Config interface to get/set video quality

IMS-VT: Multitasking feature
-Support for video multitasking

IMS-VT: Modification of data usage aidl
Change data usage aidl interface to take parameter type long
instead of int

Change-Id: I7cda2a689edb86d025dfe8efc8f573918c4bd6bc

Propagate the call substate changed message to the UI

IMS-VT: Add call modifiable capability

PhoneCapababilities call type modifiable constant added

IMS-VT: Add a bit mask CALL_SUBSTATE_ALL with all call substate bits set

IMS-VT: Enable Video conferencing.

Enable Video conferencing.

Change-Id: I4240aa6f32c75d6eea8a41da3c87bca651f0901b

IMS-VT: Add hide for setVideoProvider API
Observed compilation error for SDK generation due to setVideoProvider
API. Marking setVideoProvider as hide inorder to resolve the
compilation error.

IMS-VT: Add persist.radio.ims.audio.output for VT calls
-- Add persist.radio.ims.audio.output to set the default speaker
   for VT calls.
-- Add required constants

IMS-VT: Add additional error codes for upgrade downgrade
-Add support to send additional error codes to UI during
 upgrade downgrade.

Change-Id: Id452d225098fe3bccdcd37d242985c5c761144c1
2015-04-01 21:40:45 +00: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
27d1c2d148 Pass onPostDialChar call back from Telephony to Telecom.
Add plumbing to alert Telecom every time a character is processed after
the post dial wait state (the processing happens in Telephony).

Bug: 18644688
Change-Id: I487d76aa9c959ca528c6377374aa35c2d0b4a803
2014-12-16 12:53:04 -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
Ihab Awad
5c9c86ec0f Telecom API updates (1/6)
Bug: 18292176

Change-Id: I060366234a5a60510c385dc837f2b7e79596eaf5
2014-11-28 15:54:35 -08:00
Santos Cordon
6c912b7d05 Make add-call a global property of telecom. (1/4)
ADD_CALL didn't make sense as a property of Connection or Call.
This changes it to be a global property instead.

Bug: 18285352
Change-Id: I658e7a6977a848600272cde2914612c8691bb801
2014-11-10 19:19:35 +00: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
Tyler Gunn
4a57b9b59b Creating connections for conference event package participants.
- Add "addExistingConnection" method to connection service which provides
a way for a connection service to notify telecom of a pre-existing
connection (connections are normally created through telecom).
- Modify TelephonyConferenceController to retrieve its state from a
multiparty connection in the conference (in the case of IMS calls, this
would be the ImsCall that manages the conference) instead of just taking
the first one.

Bug: 18057361
Change-Id: I26993aec54ecb0ce90ae6983fd3eed9d8d0a5773
2014-10-30 14:27:48 -07:00
Nancy Chen
36c62f3e3c Add an option to set the selected phone account as the default. (1/3)
Modify the phoneAccountSelected method to support the option to set the
selected phone account as the default for outgoing phone calls.

Bug: 18078232
Change-Id: I2689bc9611366d521dfd3dc2086fd31eb6393876
2014-10-22 13:32:57 -07: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
Nancy Chen
9faf13b474 Merge "Add API method to extract subscription ID from phone account (1/3)" into lmp-sprout-dev 2014-10-15 18:47:03 +00:00
Nancy Chen
b0cad32c3c Add API method to extract subscription ID from phone account (1/3)
Since Telephony uses subscription ids and Telecom uses Phone Accounts,
there should be an easy way to interface between the two. Since the
value of the subscription id and "id" of the phone account should be the
same in the case of a SIM phone account, we just need to check that the
phone account in question is a SIM phone account and convert the string
to a long.
This lays in groundwork for the following bugs:

Bug: 17925501
Bug: 17917937
Change-Id: I926e969b365d9e9878436302117e8786ec5513b8
2014-10-13 14:01:49 -07:00
Yorke Lee
c3cf982d18 Add ability to add sim-initiated MO call to UI (2/4)
Add supporting (hidden) APIs to TelecomManager to add the ability to
add a previous unknown call to Telecom

Bug: 17787391

Change-Id: Ibdfaee81a55e11451c146751cf970980dccad435
2014-10-06 15:09:00 -07:00
Nancy Chen
513c892135 Replace get*PhoneAccounts* public API methods with new method (1/3)
Hide getCallCapablePhoneAccounts and getPhoneAccountsSupportingScheme
because a third party app should not be able to see all phone accounts
registered. Replace instead with getPhoneAccountsForPackage(Context)
which will only return the phone accounts registered by a particular package.

Bug: 17510811
Change-Id: I8465ef4f13b62fe83f51835cfffe1656298041a8
2014-09-17 18:34:13 -07:00
Nancy Chen
ebc69cd19e Merge "Remove ability to enable/disable phoneaccounts (1/6)" into lmp-dev 2014-09-17 03:23:04 +00:00
Andrew Lee
7f3d41fd12 Add new DisconnectCause class to telecomm.
+ Add a hidden "UNKNOWN" default type to ToneGenerator.
- Hide the Telephony DisconnectCause from the public API.
+ Add a Telecomm DisconnectCause. This is parcelable, and contains
information (code, user facing message, non-user facing reason,
and tone) to help describe the disconnect state and what behaviors
an application can implement for the user experience. This reduces
the causes for a disconnect to a more generic set.
+ Lots of work to pipe this through. DisconnectCause replaces the
code and message which were formerly passed around.

Bug: 17241433
Bug: 17329632
Change-Id: I9d337e478a8784bcc0ade02267c2df52cac9bf17
2014-09-16 12:07:41 -07:00
Nancy Chen
210ef039fb Remove ability to enable/disable phoneaccounts (1/6)
Enabling/disabling of phone accounts was only used for SIP accounts and
is no longer necessary for the purpose it was put in.
- Remove all references to enabling/disabling phone accounts
+ Rename getEnabledPhoneAccounts -> getCallCapablePhoneAccounts

Bug: 17510811

Change-Id: Id805daae3cc698c75f5e747b6a6107ab0bd3afa0
2014-09-16 10:52:48 -07:00
Yorke Lee
2ae312e306 Pipe TelephonyManager.getCallState through TelecommManager
* Add TelecommManager.getCallState (hidden API)
* Make TelephonyManager.getCallState call through to
TelecommManager, to be consistent with
TelephonyManager.ACTION_PHONE_STATE_CHANGED broadcasts for
overall call state. Telephony continues to manage call states for
individual subscriptions.

Bug: 17378767
Change-Id: Ia5e8b21df801ed3af4f6e14c110a72c92f077f88
2014-09-14 09:54:23 -07:00
Tyler Gunn
ef9f6f957d Renaming Telecomm to Telecom.
- Changing package from android.telecomm to android.telecom
- Changing package from com.android.telecomm to
com.android.server.telecomm.
- Renaming TelecommManager to TelecomManager.

Bug: 17364651
Change-Id: I192cb5d189f55db012ea72ee82ccc5aedbc21638
2014-09-12 22:16:17 -07:00
Andrew Lee
100e293fa8 API cleanup for RemoteConnection.
+ Rename handle to address.
+ Rename audioModeIsVoip to IsVoipAudioMode.
+ Rename Listener to Callback.
- Delete getParent() and getChildren() methods.
- Delete onChildrenChanged/onParentChanged methods.
+ Rename Listener to Callback.
+ Rename Callback methods to reflect other changes.

Bug: 17329632
Change-Id: Ie466472e995050f578fbb1c4b9de0ae59e488988
2014-09-11 13:30:10 -07:00
Nancy Chen
354b2bd0fe Make changes to Connection in Telecomm API (1/4)
* onPhoneAccountClicked removed
* onSetAudioState -> onAudioStateChanged
* onSetState -> onStateChanged

Bug: 17329632
Change-Id: Icbba67439317bf1d21f758d58da7c83c4373efa6
2014-09-11 11:25:03 -07:00
Tyler Gunn
a1ed7d1094 Allowing enable/disable of phone accounts. (1/3)
- added "hasCapabilities" method on PhoneAccount.
- added CAPABILITY_PLACE_EMERGENCY_CALLS.
- added isEnabled method builder constructor to initialize from an
existing PhoneAccount.

Bug: 17306514
Bug: 17408536

Change-Id: I57de508b4adcf207f3b29cab449bfc634db80153
2014-09-11 17:13:51 +00:00
Ihab Awad
a64627c2d3 Enable (@hidden) video connection support for RemoteConnections
Bug: 16958934

Change-Id: I2c618743a689303f1bec190da53a1ec42d759370
2014-09-08 15:02:04 -07:00
Santos Cordon
a48680427e Updating APIs for CDMA conference call support.
Bug:17316859
Change-Id: Ib80c4dcf99c8599c011496756c363c3e6147c20a
2014-09-05 16:13:19 -07:00
Andrew Lee
d4abbfbcc1 Tweak methods for get/set DefaultOutgoing phone account.
+ Rename setDefaultOutgoing...() to setUserSelected...().
+ Add method for getting the UserSelected outgoing account.

Bug: 17179743
Change-Id: I7ae24601ed670d3571acb7ef4f7ffd114d403a99
2014-09-03 15:48:56 -07:00
Evan Charlton
4d12a03771 Merge "Remove startActivityFromInCall API" into lmp-dev 2014-09-03 20:07:47 +00:00
Evan Charlton
23dc241d5e Remove startActivityFromInCall API
Rip out the startActivityFromInCall API until we can replace it with
something better.

Bug: 16988478
Change-Id: Ib7b0493353262d9e795d78b78a98dd29e7a3f88e
2014-09-03 10:07:03 -07:00
Tyler Gunn
f5b29dc8cb Add supported URI scheme to PhoneAccounts. (1/4)
Modified PhoneAccount and builder to support specifying supported
URI schemes.

Bug: 17140110
Change-Id: Ieef33bb1a6719de6f3897ed10ec38843808a7f85
2014-09-03 09:09:12 -07:00
Tyler Gunn
b730542b75 Merge "Hiding videoState values in telecomm APIs. (1/3)" into lmp-dev 2014-08-30 06:26:04 +00:00
Andrew Lee
68d207ec8c Merge "Add functions for setting/getting phone accounts." into lmp-dev 2014-08-29 22:46:21 +00:00
Tyler Gunn
be74de0978 Hiding videoState values in telecomm APIs. (1/3)
Hiding in Connection, ConnectionRequest, and ConnectionService.
Also @hiding PhoneAccount and PhoneCapabilities attributes related
to VT.

Bug: 17243002
Change-Id: I685305cddb99e1d2eb767982106253894a8d282f
2014-08-29 14:51:48 -07:00
Andrew Lee
59cac3a881 Add functions for setting/getting phone accounts.
Bug: 17179743
Change-Id: I821312ae5903f81a5282987189822e77ac55b7ef
2014-08-29 11:04:08 -07:00