102 Commits

Author SHA1 Message Date
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
Nancy Chen
551056ec0f Merge "Hide AIDL for RemoteServiceCallback in telecomm" into lmp-dev 2014-08-29 17:14:54 +00:00
Nancy Chen
da227c7fdd Hide AIDL for RemoteServiceCallback in telecomm
Hide raw AIDL for public API

Bug: 17320748
Change-Id: I79926f9a527e8916b235186559c01cf00ded2f12
2014-08-28 17:30:23 -07:00
Nancy Chen
0eb1e402c7 API review PhoneManager -> TelecommManager. Rename methods (6/6)
PhoneManager
- handlePinMMI docs should explain what a Pin is and what MMI is
- rename isInAPhoneCall to isInCall
- rename showCallScreen to showInCallScreen
- merge this class into TelecommManager, we don't need both

Bug: 16960458

Change-Id: I7d573e27ed093f2ddb7849703cc62f9916835393
2014-08-25 10:50:44 -07:00
Ihab Awad
6107bab041 ConnectionService API has only one completed callback (1/3)
Refactor ConnectionService API so it has only one "completed"
callback, and connection state and failure codes indicates what
happened. Previous design where we had separate callbacks for failure,
cancellation and success was error prone because it was easy to forget
to implement one of them.

Bug: 16993846
Bug: 17070939

Change-Id: I84bf5d041cf78193ccf80db201b08db3b7014830
2014-08-19 10:51:00 -07:00
Santos Cordon
823fd3c79d Update conference call APIs.
Clean up conference call APIs to use a distinct type separate from
Connection.  Also allow the addition of Conference calls at any point
using addConference() API method.

Bug:16844332
Bug:16449372
Change-Id: I34e45fde1aa43559f5f4e29b990929c188b16875
2014-08-18 17:30:58 +00:00
Ihab Awad
b19a0bcdd8 Final structural tweaks to Telecomm API (1/8)
Bug: 16416927
Bug: 16494880
Change-Id: I45fbe287c410cbb5e1b985f320b862d732811f43
2014-08-13 11:16:46 -07:00
Ihab Awad
8aecfedb7b Fix incorrect connection ID for remote connection service
Also cleans up incidental issues including:
* Remote connection service disconnects from the service it
  represents if it is not currently handling any connections;
  hope to avert excessive service pinning in the future.
* Fix destroyed connection handling.

Bug: 16828152
Change-Id: Id4555f91ddac5e9c1a12ce00bfd1ee0d6d2cb1d9
2014-08-12 03:27:12 +00:00
Andrew Lee
752217bfc6 Aidl changes related to VideoCallProvider in Ims.
+ Added a getVideoCallProvider function in IImsCallSession
+ Added IImsVideoCallProvider aidl. This is used for communication
between Telephony and the ImsService. It is redundant with
IVideoCallProvider on some level, but see associated bug and comments
in the class for more detail.
+ Added IImsVideoCallCallback. This is used for communicationing
callback invocations from ImsService to Telephony. It is redundant
with IVideoCallCallback for same reason in bugs/comments.
+ Some minor formatting changes.

Bug: 16886403
Change-Id: I03de12d4432f837e0930bc077307509b645493e0
2014-08-08 12:09:54 -07:00
Santos Cordon
7c7bc7f691 Add setConferenceable() API from ConnectionService to incall. (1/4)
Change-Id: I64fdca08d35f893d755e3b154543a261b1418343
2014-08-06 03:36:09 -07:00
Ihab Awad
f8b69887b4 Connection creation and service wiring for WiFi call managers (1/3)
Bug: 16469413
Change-Id: I019922f76f54d2fa376513a6284d6322959a8235
2014-07-29 15:14:33 -07:00
Yorke Lee
0d6ea71bcf Add new proximity sensors in Telecomm (1/3)
Add the following two APIs in Telecomm and use them in InCallUI
setProximitySensorOn
setProximitySensorOff(boolean turnScreenOnImmediately)

Bug: 16573954
Change-Id: I8219e9c659f4ea4493f5cd5c8bcaa95a98d180e2
2014-07-29 09:27:31 -07:00
Andrew Lee
50aca23bd7 Add VideoCall and VideoCall.Listener as an inner classes of Call.
Bug: 16494880
Bug: 16495203
Change-Id: Ife3b6723374ea5fbbff4927c4f9168d075be21e1
2014-07-25 08:58:10 -07:00
Santos Cordon
e8dc4bef00 Sent initial data to telecomm on connection creation. (1/3)
Telecomm was not sending the initial state for new connections forcing
the connection services to postpone when they set data on the connection
which resulted in hacky code.  This CL makes use of a
ParcelableConnection to send the intial connection data.

Change-Id: If571414aba19fa1bb282e30632431962b8366cf4
2014-07-21 19:29:39 +00:00
Santos Cordon
88b771d8cd Rename InCallCall to ParcelableCall (1/2)
Bug: 16416927
Change-Id: Iae97d83ce74b4395d6877cc167d7e5057dac201b
2014-07-21 01:15:32 +00:00
Santos Cordon
96efb488af Change incoming call intent to a TelecommManager method. (1/3)
Also moves a few constants from TelecommConstants to TelecommManager.
Bug:16416927

Change-Id: I8e74feb228523ed1c186b2f06784d04cb9141f86
2014-07-20 17:41:08 -07:00
Evan Charlton
8c8a062f52 Rename PhoneAccountMetadata to PhoneAccount
Change-Id: I4597b14110c1cee7f637ec125b839852ef0f34c4
2014-07-20 15:12:16 -07:00
Evan Charlton
6eb262c351 Rename PhoneAccount to PhoneAccountHandle
Change-Id: I2e97b348e6316a8b3ccc39fd81013e7f514a2889
2014-07-20 10:34:59 -07:00
Sailesh Nepal
2ab88cc313 Add Connection.startActivityFromInCall
This CL adds a new public API to allow Connections
to start an activity on top of the in-call UI.

The Connection passes a PendingIntent to Telecomm which
then forwards it on to InCallUI. The Connection can cancel
the operation by calling PendingIntent.cancel().

This allows services like SIP and Hangouts to show dialogs
to the user when making a call.

Change-Id: I65119a89c925a93467d1b27304ffec9b088b172f
2014-07-18 14:59:30 -07:00
Ihab Awad
94cf4bff13 Wire up multi-SIM experience (1/4)
Change-Id: Ib63843267f06b329a675e7ea86167b2cbb554f1b
2014-07-18 10:02:25 -07:00
Tyler Gunn
aa07df84f2 Wiring video state through from Connection
Bug: 16285417
Bug: 16013178
Change-Id: Ia48959248ca22f4569b0ffd01a1716470aa0a711
2014-07-18 01:30:34 +00:00
Andrew Lee
8da4c3c11f Pass through video state when answering a call.
Bug: 16013878
Bug: 16015750
Change-Id: Ia9ba6e5f78fcb64e1089db99f5ce11d0ef858ac9
2014-07-17 12:56:49 -07:00
Nancy Chen
5da0fd5e76 API changes to enable account selection for a call
If an account default is not set, the incall ui will display a dialog to
allow the user to select an account for that particular call.

Bug: 16243703

Change-Id: I8faf2f2ce0b2669a141562832f23e8f3ce88f094
2014-07-17 10:19:20 -07:00
Sailesh Nepal
001bbbb239 TTY: frameworks/base changes
This CL makes the following changes:
  1. New public APIs:
    - TelecommManager.getCurrentTtyMode: This is used to
      get current TTY mode. It's used by Telephony to set
      the phone state before calls are created (which is why
      it can't be a Conneciton API).
    - TelecommConstants.TTY_MODE_*: These are constants
      copied from Phone.java
    - TelecommConstants.ACTION_CURRENT_TTY_MODE_CHANGED: This
      action is fired when the current TTY mode changes.
      Apps can listen to this before and during a call.
      The old version of this was in TtyIntent.java which
      I deleted.

  2. New private API
    - TelecommManager.isTtySupported: This is used by
      Telephony to hide the TTY settings on devices
      that don't support TTY

  3. Various updates to use the constants renamed in this CL

Change-Id: I652b095af30cc2732a06829dc23492e5355660da
2014-07-16 21:14:58 +00:00
Sailesh Nepal
c5b01573a0 Add support for remote incoming calls
This CL allows a incoming call to be handled through the
remote connection API.

All calls, incoming and outgoing, are now routed through
ConnectionService.createConnection.

Change-Id: I5232d062ad3b559f4fe7c8224e7234b2c6bf8431
2014-07-14 20:49:03 -07:00