296 Commits

Author SHA1 Message Date
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
Sailesh Nepal
d5bcb68cb7 Use thread safe set for RemoteConnection.mListeners
Switch from HashSet to set backed by a ConcurrentHashMap to prevent
ConcurrentModificationExceptions.

Bug: 16901565
Change-Id: I7666ef61e94994963b2c2634a9a250365e753888
2014-08-09 16:36:35 -07:00
Tyler Gunn
c4d63d705c Merge "Adding camera failure/ready session events." into lmp-dev 2014-08-09 00:40:15 +00:00
Tyler Gunn
7edbe283be Adding camera failure/ready session events.
The VT provider can use these to inform In-Call of a camera failure and
the camera becoming ready again after recovery.

Bug: 16900653
Change-Id: I279176860b30d02f55732b327ac3385eff8d19a8
2014-08-08 15:22:40 -07:00
Jay Shrauner
b0c0e36faf Use thread safe set for adapter set
Switch from HashSet to set backed by a ConcurrentHashMap to prevent
ConcurrentModificationExceptions.

Bug:16898286
Change-Id: I5d94b403469e98c5f5431fc1d0ad020985100cfd
2014-08-08 17:08:53 -07:00
Nancy Chen
a602082fbd Merge "Better comments for the CONNECTING state." into lmp-dev 2014-08-07 15:31:24 +00:00
Nancy Chen
e9b7a8ed8c Better comments for the CONNECTING state.
More readable for developers.

Bug: 16396523
Change-Id: I8db0949fcd62eb4d76db978a1633fbf6004035a6
2014-08-08 14:36:40 -07: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
Nancy Chen
e20930fc56 Add "CONNECTING" state for before outgoing call broadcast returns
Immediately add a call to Telecomm before the outgoing call broadcast
intent returns, this will reduce the latency for the InCallUI by
allowing the InCallActivity to start before Telecomm has responded.

Bug: 16396523
Change-Id: Iada2a6bdb803794a765b81edb2dfb0953445ae43
2014-08-07 16:39:04 -07:00
Santos Cordon
8abea42490 Remove ldaps from AOSP code.
Bug: 16327484
Change-Id: I1fbeed8e1642e8228310cf0e7b95c4809b50901b
2014-08-07 11:37:52 -07:00
Andrew Lee
1f6bbd2920 "Implement" formerly abstract methods VideoCallProvider.
Provide null-op methods so there is greater flexibility for classes
which extend this base class, but might not support all its methods.
In the future, if we add more methods to the *.aidl interface, this
class can work with binaries which extend this class but don't
implement all the methods since the superclass now implements those
methods.

Left onSetPreviewSurface and onSetDisplaySurface as abstract.

Bug: 16842159
Change-Id: Ie7fea6ef5d473e3924ef370392f380603a568800
2014-08-06 14:37:06 -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
5d0410fa7c Finalize implementation of Remote Connection Service (1/4)
Change-Id: I3788c9ab03a979f22ab628637adf6d520038cb6e
2014-08-05 18:21:26 -07:00
Santos Cordon
d34e5713c9 Revert "Make Connection threadsafe"
This reverts commit 53488bf3d152eb0ecacca5716c763e8cd7ab28ae.

Change-Id: Ia13c510279e600e8bd1445fd63e2cd6503f4077e
2014-08-05 18:54:03 +00:00
Evan Charlton
b09c2b5dad Make Connection threadsafe
Punt all modification calls to the UI thread to avoid concurrency
issues. This also makes all callback events (e.g., onAbort()) be
called on the same thread.

Bug: 16731451
Change-Id: I4dfd7493538724b3249780272411e61d956b146a
2014-08-01 21:34:16 +00:00
Tyler Gunn
5d231e1343 Adding video width/height to camera capabilities.
Bug: 16602621
Bug: 16573836
Change-Id: Idaca4b6d889bf7910fcc37bee7ef478e2fbe3af3
2014-07-30 00:07:46 +00: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
Andrew Lee
48332d622b Convert VideoState into an inner class.
- Add helper functions to make it easier to figure out properties of a
particular video state, to make things more convenient.
- Update references and documentation.

Bug: 16629892
Change-Id: I621532e8cab080afd56e5db739b9edbee6261f74
2014-07-29 13:35:59 -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
Sailesh Nepal
ed28d406ee Merge "Fix WTF when creating a lazily initialized connection" into lmp-dev 2014-07-24 16:56:49 +00:00
Sailesh Nepal
b2d41f4c4c Fix WTF when creating a lazily initialized connection
Change-Id: I16af7e99d07f83b17f111acbf0a3285d09cee13e
2014-07-28 20:33:07 -07:00
Sailesh Nepal
4e7ec71e64 Handle synchronous failed connection
Change-Id: I406ccbdd1f70c85456b6e0d689332cf40a756707
2014-07-29 01:46:57 +00:00
Andrew Lee
1418576521 Move VideoCallProvider into ConnectionService.
Bug: 16494880
Change-Id: I0778197d06fcd219db4a1e1fa065e69026254a99
2014-07-28 10:41:37 -07:00
Evan Charlton
17a3814ac6 Merge "Make creating the Connection synchronous" into lmp-dev 2014-07-24 15:36:21 +00:00
Evan Charlton
bf11f98deb Make creating the Connection synchronous
Get rid of CreateConnectionResponse and have the ConnectionService
return the built connection instead.

Change-Id: Ibbf896e5b188b98eb386d6624d3a5d5cacf49922
2014-07-25 11:07:50 -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
Tyler Gunn
6c11189beb Adding missing break statement in VideoCallProvider.
Related to cl/510948

Bug: 16494880
Bug: 16495203
Change-Id: I4de0dccb886efbd119bd75b1285fdc84210c94fb
2014-07-25 13:04:31 -07:00
Nancy Chen
6080118beb Hide multiple-account information if there is only a single account
Adding an API method to telecomm to determine whether there is a single
account.

Bug: 16483795
Change-Id: If30d3a53458b4c784995f3f9e471c8163a8175a4
2014-07-23 16:41:10 -07:00
Santos Cordon
541a06e777 Merge "Change display Strings to CharSequence (1/3)" into lmp-dev 2014-07-22 22:02:55 +00:00
Andrew Lee
8a57efb7eb Don't throw RemoteException in public RemoteCallVideoClient APIs.
- Hide constructor.
- No longer implements IBinder.DeathRecipient.
- Catch RemoteExceptions instead of throwing RemoteExceptions.

Change-Id: Iaa049cab9e24120d3ea732e1ede78cc6fcd0ad71
2014-07-22 15:47:56 -07:00