425 Commits

Author SHA1 Message Date
Santos Cordon
619b3c0d09 Fix NPE in onDestroy.
NPE can happen when calls are canceled immediately before incallservice
has a chance to respond.

Bug:17362107
Change-Id: I6bf318f5f7d89731b686a1523678a26764fa9bf3
2014-09-02 17:19:03 -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
Nancy Chen
0156867544 Remove onConnectionAdded/Removed() from ConnectionService API
These methods are redundant because there are already other methods
listening to the connection adding and removing.

Bug: 17262026
Change-Id: I1c87af539932673a11e5ceee62755c2aec6aa43f
2014-08-29 15:53:29 -07: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
Sailesh Nepal
8fd8124911 Merge "Make PhoneAccount.Builder constructor public" into lmp-dev 2014-08-29 20:01:59 +00: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
Sailesh Nepal
38f480993f Make PhoneAccount.Builder constructor public
Bug: 17321110

Change-Id: I61209f70c4719bbc77a310310c456b253032bedc
2014-08-29 09:04:28 -07: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
Andrew Lee
81289efcae Merge "Add CallProperties class, and use to on ParcelableCall." into lmp-dev 2014-08-28 18:39:16 +00:00
Andrew Lee
223ad1455a Add CallProperties class, and use to on ParcelableCall.
Bug: 17304243
Change-Id: I3ef6862391a9b96c70f4b12412160116e094ed34
2014-08-28 10:42:01 -07:00
Santos Cordon
f30d7e9a8e Call onPhoneDestroyed when the service is unbound.
Bug: 17253031
Change-Id: I1a74e0f2fe1ec9172268638dba531c17d22dee99
2014-08-27 17:29:29 -07:00
Jay Shrauner
7746a94fd6 Fix NPE when have no phone accounts
Return empty List instead of null so calling functions don't throw NPE
when dereferencing return value.

Bug:17282683
Bug:17262485
Change-Id: Ica4952b11a8af28787a4a0b6a991ab888386aa7b
2014-08-26 21:01:18 +00:00
Ihab Awad
b8e85c74e5 Support Conferences in Remote Connections
Bug: 16957997

Change-Id: I598854b43aad2f10b5322439741588f5326b74c2
2014-08-25 21:51:19 -07:00
Nancy Chen
e4b1d57dfd Merge "API review PhoneManager -> TelecommManager. Rename methods (6/6)" into lmp-dev 2014-08-25 22:24:09 +00: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
Tyler Gunn
9edf297055 Merge "Hiding missed Video telephony related APIs." into lmp-dev 2014-08-22 19:20:00 +00:00
Tyler Gunn
75537ae00d Hiding missed Video telephony related APIs.
Bug: 17188135
Change-Id: I9b569936bff285463d32df878efb26041917c51b
2014-08-22 11:33:13 -07:00
Tyler Gunn
705e9879fc Merge "Hiding Video telephony related APIs." into lmp-dev 2014-08-22 17:12:57 +00:00
Santos Cordon
0159ac0cfe Additional changes for Conference.
1) Connection.setConference() checked to see if the conference was valid
before setting it.  This prevented us from populating child connections
on a new conference until it was added.  Now we allow it but dont sent
the update unless the conference has already been sent.
2) removed unnecessary ArrayList<>() wrappers on CopyOnWriteLists.
3) Updated disconnect/hold/unhold so that they are sent to Conference
objects as well as Connection objects.
4) Added support for separating a child conference call.
5) Additional Logging

Bug: 15621105
Bug: 17136172
Change-Id: I939c36bc9694b9d81f0ff582e2fbe335006aa485
2014-08-21 23:40:35 +00:00
Tyler Gunn
27d1e257f3 Hiding Video telephony related APIs.
Bug: 17188135
Change-Id: I2d4111dbad2430968a458f8f3bf4f2ca1becbbdd
2014-08-21 16:38:40 -07:00
Yorke Lee
38dd601d0a Merge "Make AudioState modes static constants" into lmp-dev 2014-08-19 02:43:23 +00:00
Yorke Lee
1426048bd3 Make AudioState modes static constants
This enables the ability to use them in switch statements

Bug: 17161247
Change-Id: Iee3da676f2cd52a09d36b58da4ba4640bd8998c5
2014-08-20 16:38:45 -07:00
Santos Cordon
80030f90b6 Merge "Made all classes required for an InCallService @SystemApi" into lmp-dev 2014-08-20 12:26:29 +00:00
Gabriel Peal
b95f169a74 Made all classes required for an InCallService @SystemApi
Bug: 17153048
Change-Id: I6b46969e976a47fd814022939a99b823fcb7b2bd
2014-08-20 16:08:53 +00:00
Sailesh Nepal
163a80538e Merge "Clean up and fix bugs in ConnectionService.createConnection" into lmp-dev 2014-08-20 21:39:11 +00:00
Sailesh Nepal
cf7020b7e8 Clean up and fix bugs in ConnectionService.createConnection
This CL fixes serveral issues with the createConnection code:
  - it uses failureCode/failureMessage which were never set.
    Renamed to disconnectCode and disconnectMessage and set
    those fields in Connection.setDisconnected
  - Connection.CANCELED_CONNECTION was static and it caused
    lots of log spew which was confusing. Changed to create
    a new connection every time, same as failure
  - moved sNullConnection from Connection to ConnectionService
  - made FailureSignalingConnection private and removed type
    checks for it. Using disconnect code is better, this is
    already what ConnectionServiceWrapper does

Note, the current code still expects connections to be cancelled
or failed in synchronously. This bug is being tracked separately.

Bug: 17156304
Change-Id: I0b13a78b738c4bf37a69de9fd5dcd17be0c45c14
2014-08-20 10:45:08 -07:00
Ihab Awad
9e4329ea0b Merge "ConnectionService API has only one completed callback (1/3)" into lmp-dev 2014-08-19 15:47:37 +00: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
Tyler Gunn
50cddeca1f Merge "Exposing in-call API to other implementing classes. (1/4)" into lmp-dev 2014-08-16 03:51:48 +00:00
Tyler Gunn
2ac401093e Exposing in-call API to other implementing classes. (1/4)
- Adding service_interface constant to InCallService.

Bug: 16133960
Change-Id: I4ace89bc3300428d2c56ed43e47ccd12a9f9748a
2014-08-18 16:23:10 -07:00
Sailesh Nepal
7257bd8b51 Merge "Make AudioState constructors public" into lmp-dev 2014-08-16 04:01:11 +00: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
Sailesh Nepal
1d04c0f394 Make AudioState constructors public
This is needed for unit tests.

Bug: 17073934
Change-Id: I04659faa54ba03247519237450b0a26f66958e8c
2014-08-17 18:39:13 -07:00
Tyler Gunn
7d18ceb59f Removing permission check in ConnectionService.
This breaks RemoteConnectionServices, such as hangouts.

Bug: 16171070
Change-Id: I9b53fefe9c3246abb1e9e11109957fb2f8502de8
2014-08-15 17:01:19 -07:00
Tyler Gunn
a2897ea9d8 Merge "Add BIND_CONNECTION_SERVICE permission." into lmp-dev 2014-08-15 18:56:10 +00:00
Tyler Gunn
0dae9a4cfa Add BIND_CONNECTION_SERVICE permission.
- Added system permission.
- Added enforcement in ConnectionService API class.

Bug: 16171070
Change-Id: Idbd26a31e8f6bb59d3e881a1e5885a44026f2fbd
2014-08-15 15:55:20 -07:00
Ihab Awad
78fc9220d4 Merge "Fix problems with wiring of initializing calls (1/2)" into lmp-dev 2014-08-15 19:10:34 +00:00
Jay Shrauner
229e3820dc Prevent ConcurrentModificationExceptions
Use sets backed by ConcurrentHashMaps instead of HashSets, and
CopyOnWriteArrayLists instead of ArrayLists, to prevent concurrent
exceptions if listeners try to remove themselves in callbacks while
iterating over the listeners.

Bug:16325026
Change-Id: I55e081eda6ba19fa466bbf019c648bbdaf833c33
2014-08-15 13:41:53 -07:00
Ihab Awad
621cd325d5 Fix problems with wiring of initializing calls (1/2)
Bug: 16993846
Change-Id: I3ed4dd30559511f51b3650bf99bd704ae73d2165
2014-08-14 15:01:02 -07:00
Sailesh Nepal
f4669dffd5 Use thread safe set for RemoteConnection.mListeners
Switch from HashSet to set backed by a ConcurrentHashMap to prevent
ConcurrentModificationExceptions.

(Relanding ag/521178. This got reveretd in ag/520450).

Bug: 16901565
Change-Id: I997898ed94f305d9b8c57eead04e0dfe6c04a884
2014-08-15 01:39:45 +00:00
Sailesh Nepal
8b9d3ca941 Include more state in ParcelableConnection
This fixes a bug where setting status hints wouldn't
work.

Bug: 17044602
Change-Id: Ife85b2d53ead38f54dac350adc09b8c9d052fda4
2014-08-15 01:39:07 +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
Nancy Chen
5f52e8ce42 Merge "Add extras for outgoing call" into lmp-dev 2014-08-12 23:14:33 +00:00
Nancy Chen
10798dcaff Add extras for outgoing call
To be able to pass information from dialer to incallui,
telecomm.Call needs to hold extra information. Add this extra bundle to
the intent.

Bug: 15284651
Change-Id: Ie462c35ece41647c7104c657cc1de947ff284729
2014-08-14 11:59:43 -07:00
Alan Viverette
03d30a573b Make sure we're obtaining themed drawables correctly
Change-Id: I446a3492f7bf5a897c5d698e61327af4b7840d85
2014-08-14 19:59:50 +00:00
Sailesh Nepal
f20b9166ee Override StatusHints.equals
Bug: 16979621
Change-Id: I858a4718a8815be18214400d3bc1d9054b99434e
2014-08-12 11:53:32 -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
Sailesh Nepal
ea201b31a3 Merge "Use thread safe set for RemoteConnection.mListeners" into lmp-dev 2014-08-09 00:40:15 +00:00