summaryrefslogtreecommitdiffstats
path: root/telecomm/java/android/telecom/VideoCallImpl.java
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2015-04-15 14:23:42 -0700
committerTyler Gunn <tgunn@google.com>2015-04-16 16:37:25 +0000
commit75958420f2d294ceda517c2782b294002dc2969f (patch)
treeef662346283736623dd1e08a047fbad93600f4e3 /telecomm/java/android/telecom/VideoCallImpl.java
parent2bbd2b683042ea0a20c46b6dfd78b6b65fcc86eb (diff)
downloadframeworks_base-75958420f2d294ceda517c2782b294002dc2969f.zip
frameworks_base-75958420f2d294ceda517c2782b294002dc2969f.tar.gz
frameworks_base-75958420f2d294ceda517c2782b294002dc2969f.tar.bz2
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
Diffstat (limited to 'telecomm/java/android/telecom/VideoCallImpl.java')
-rw-r--r--telecomm/java/android/telecom/VideoCallImpl.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/telecomm/java/android/telecom/VideoCallImpl.java b/telecomm/java/android/telecom/VideoCallImpl.java
index 0445448..fa2dbb1 100644
--- a/telecomm/java/android/telecom/VideoCallImpl.java
+++ b/telecomm/java/android/telecom/VideoCallImpl.java
@@ -166,7 +166,7 @@ public class VideoCallImpl extends VideoCall {
mVideoProvider.asBinder().linkToDeath(mDeathRecipient, 0);
mBinder = new VideoCallListenerBinder();
- mVideoProvider.setVideoCallback(mBinder);
+ mVideoProvider.addVideoCallback(mBinder);
}
/** {@inheritDoc} */
@@ -175,6 +175,15 @@ public class VideoCallImpl extends VideoCall {
}
/** {@inheritDoc} */
+ public void removeVideoCallListener() {
+ mVideoCallListener = null;
+ try {
+ mVideoProvider.removeVideoCallback(mBinder);
+ } catch (RemoteException e) {
+ }
+ }
+
+ /** {@inheritDoc} */
public void setCamera(String cameraId) {
try {
mVideoProvider.setCamera(cameraId);