Merge "Add ICallVideoProvider binder to the InCallCall object."
This commit is contained in:
@@ -27581,11 +27581,6 @@ package android.telecomm {
|
||||
method public abstract void setZoom(float);
|
||||
}
|
||||
|
||||
public class CallVideoProviderWrapper implements android.os.IBinder.DeathRecipient {
|
||||
method public void binderDied();
|
||||
method public void setCamera(java.lang.String) throws android.os.RemoteException;
|
||||
}
|
||||
|
||||
public abstract class Connection {
|
||||
ctor protected Connection();
|
||||
method public final android.telecomm.CallAudioState getCallAudioState();
|
||||
@@ -27732,6 +27727,7 @@ package android.telecomm {
|
||||
|
||||
public final class InCallCall implements android.os.Parcelable {
|
||||
method public int describeContents();
|
||||
method public android.telecomm.RemoteCallVideoProvider getCallVideoProvider() throws android.os.RemoteException;
|
||||
method public java.util.List<java.lang.String> getCannedSmsResponses();
|
||||
method public int getCapabilities();
|
||||
method public long getConnectTimeMillis();
|
||||
@@ -27761,6 +27757,11 @@ package android.telecomm {
|
||||
method protected abstract void updateCall(android.telecomm.InCallCall);
|
||||
}
|
||||
|
||||
public class RemoteCallVideoProvider implements android.os.IBinder.DeathRecipient {
|
||||
method public void binderDied();
|
||||
method public void setCamera(java.lang.String) throws android.os.RemoteException;
|
||||
}
|
||||
|
||||
public final class RemoteConnection {
|
||||
method public void addListener(android.telecomm.RemoteConnection.Listener);
|
||||
method public void answer();
|
||||
|
||||
@@ -19,8 +19,11 @@ package android.telecomm;
|
||||
import android.net.Uri;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.os.RemoteException;
|
||||
import android.telephony.DisconnectCause;
|
||||
|
||||
import com.android.internal.telecomm.ICallVideoProvider;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
@@ -41,29 +44,11 @@ public final class InCallCall implements Parcelable {
|
||||
private final Subscription mSubscription;
|
||||
private final CallServiceDescriptor mCurrentCallServiceDescriptor;
|
||||
private final CallServiceDescriptor mHandoffCallServiceDescriptor;
|
||||
private final ICallVideoProvider mCallVideoProvider;
|
||||
private RemoteCallVideoProvider mRemoteCallVideoProvider;
|
||||
private final String mParentCallId;
|
||||
private final List<String> mChildCallIds;
|
||||
|
||||
/** @hide */
|
||||
@SuppressWarnings("unchecked")
|
||||
public InCallCall(
|
||||
String id,
|
||||
CallState state,
|
||||
int disconnectCauseCode,
|
||||
String disconnectCauseMsg,
|
||||
List<String> cannedSmsResponses,
|
||||
int capabilities,
|
||||
long connectTimeMillis,
|
||||
Uri handle,
|
||||
GatewayInfo gatewayInfo,
|
||||
Subscription subscription,
|
||||
CallServiceDescriptor descriptor,
|
||||
CallServiceDescriptor handoffDescriptor) {
|
||||
this(id, state, disconnectCauseCode, disconnectCauseMsg, cannedSmsResponses,
|
||||
capabilities, connectTimeMillis, handle, gatewayInfo, subscription, descriptor,
|
||||
handoffDescriptor, null, Collections.EMPTY_LIST);
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public InCallCall(
|
||||
String id,
|
||||
@@ -78,6 +63,7 @@ public final class InCallCall implements Parcelable {
|
||||
Subscription subscription,
|
||||
CallServiceDescriptor descriptor,
|
||||
CallServiceDescriptor handoffDescriptor,
|
||||
ICallVideoProvider callVideoProvider,
|
||||
String parentCallId,
|
||||
List<String> childCallIds) {
|
||||
mId = id;
|
||||
@@ -92,6 +78,7 @@ public final class InCallCall implements Parcelable {
|
||||
mSubscription = subscription;
|
||||
mCurrentCallServiceDescriptor = descriptor;
|
||||
mHandoffCallServiceDescriptor = handoffDescriptor;
|
||||
mCallVideoProvider = callVideoProvider;
|
||||
mParentCallId = parentCallId;
|
||||
mChildCallIds = childCallIds;
|
||||
}
|
||||
@@ -167,6 +154,22 @@ public final class InCallCall implements Parcelable {
|
||||
return mHandoffCallServiceDescriptor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an object for remotely communicating through the call video provider's binder.
|
||||
* @return The call video provider.
|
||||
*/
|
||||
public RemoteCallVideoProvider getCallVideoProvider() throws RemoteException {
|
||||
if (mRemoteCallVideoProvider == null) {
|
||||
try {
|
||||
mRemoteCallVideoProvider = new RemoteCallVideoProvider(mCallVideoProvider);
|
||||
} catch (RemoteException ignored) {
|
||||
// Ignore RemoteException.
|
||||
}
|
||||
}
|
||||
|
||||
return mRemoteCallVideoProvider;
|
||||
}
|
||||
|
||||
/**
|
||||
* The conference call to which this call is conferenced. Null if not conferenced.
|
||||
* @hide
|
||||
@@ -203,12 +206,15 @@ public final class InCallCall implements Parcelable {
|
||||
Subscription subscription = source.readParcelable(classLoader);
|
||||
CallServiceDescriptor descriptor = source.readParcelable(classLoader);
|
||||
CallServiceDescriptor handoffDescriptor = source.readParcelable(classLoader);
|
||||
ICallVideoProvider callVideoProvider =
|
||||
ICallVideoProvider.Stub.asInterface(source.readStrongBinder());
|
||||
String parentCallId = source.readString();
|
||||
List<String> childCallIds = new ArrayList<>();
|
||||
source.readList(childCallIds, classLoader);
|
||||
return new InCallCall(id, state, disconnectCauseCode, disconnectCauseMsg,
|
||||
cannedSmsResponses, capabilities, connectTimeMillis, handle, gatewayInfo,
|
||||
subscription, descriptor, handoffDescriptor, parentCallId, childCallIds);
|
||||
subscription, descriptor, handoffDescriptor, callVideoProvider, parentCallId,
|
||||
childCallIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -238,6 +244,7 @@ public final class InCallCall implements Parcelable {
|
||||
destination.writeParcelable(mSubscription, 0);
|
||||
destination.writeParcelable(mCurrentCallServiceDescriptor, 0);
|
||||
destination.writeParcelable(mHandoffCallServiceDescriptor, 0);
|
||||
destination.writeStrongBinder(mCallVideoProvider.asBinder());
|
||||
destination.writeString(mParentCallId);
|
||||
destination.writeList(mChildCallIds);
|
||||
}
|
||||
|
||||
@@ -22,10 +22,10 @@ import android.os.RemoteException;
|
||||
import com.android.internal.telecomm.ICallVideoProvider;
|
||||
|
||||
|
||||
public class CallVideoProviderWrapper implements IBinder.DeathRecipient {
|
||||
public class RemoteCallVideoProvider implements IBinder.DeathRecipient {
|
||||
private final ICallVideoProvider mCallVideoProvider;
|
||||
|
||||
CallVideoProviderWrapper(ICallVideoProvider callVideoProvider) throws RemoteException {
|
||||
RemoteCallVideoProvider(ICallVideoProvider callVideoProvider) throws RemoteException {
|
||||
mCallVideoProvider = callVideoProvider;
|
||||
mCallVideoProvider.asBinder().linkToDeath(this, 0);
|
||||
}
|
||||
Reference in New Issue
Block a user