Merge commit '7595842' into merge2

Change-Id: I7e11e98e6d59562374195a8761d64a79dc0268e8
This commit is contained in:
Etan Cohen
2015-04-24 13:56:35 -07:00
8 changed files with 121 additions and 32 deletions

View File

@@ -46,6 +46,7 @@ public final class ParcelableCall implements Parcelable {
private final int mCallerDisplayNamePresentation;
private final GatewayInfo mGatewayInfo;
private final PhoneAccountHandle mAccountHandle;
private final boolean mIsVideoCallProviderChanged;
private final IVideoProvider mVideoCallProvider;
private InCallService.VideoCall mVideoCall;
private final String mParentCallId;
@@ -69,6 +70,7 @@ public final class ParcelableCall implements Parcelable {
int callerDisplayNamePresentation,
GatewayInfo gatewayInfo,
PhoneAccountHandle accountHandle,
boolean isVideoCallProviderChanged,
IVideoProvider videoCallProvider,
String parentCallId,
List<String> childCallIds,
@@ -89,6 +91,7 @@ public final class ParcelableCall implements Parcelable {
mCallerDisplayNamePresentation = callerDisplayNamePresentation;
mGatewayInfo = gatewayInfo;
mAccountHandle = accountHandle;
mIsVideoCallProviderChanged = isVideoCallProviderChanged;
mVideoCallProvider = videoCallProvider;
mParentCallId = parentCallId;
mChildCallIds = childCallIds;
@@ -232,6 +235,18 @@ public final class ParcelableCall implements Parcelable {
return mExtras;
}
/**
* Indicates to the receiver of the {@link ParcelableCall} whether a change has occurred in the
* {@link android.telecom.InCallService.VideoCall} associated with this call. Since
* {@link #getVideoCall()} creates a new {@link VideoCallImpl}, it is useful to know whether
* the provider has changed (which can influence whether it is accessed).
*
* @return {@code true} if the video call changed, {@code false} otherwise.
*/
public boolean isVideoCallProviderChanged() {
return mIsVideoCallProviderChanged;
}
/** Responsible for creating ParcelableCall objects for deserialized Parcels. */
public static final Parcelable.Creator<ParcelableCall> CREATOR =
new Parcelable.Creator<ParcelableCall> () {
@@ -252,6 +267,7 @@ public final class ParcelableCall implements Parcelable {
int callerDisplayNamePresentation = source.readInt();
GatewayInfo gatewayInfo = source.readParcelable(classLoader);
PhoneAccountHandle accountHandle = source.readParcelable(classLoader);
boolean isVideoCallProviderChanged = source.readByte() == 1;
IVideoProvider videoCallProvider =
IVideoProvider.Stub.asInterface(source.readStrongBinder());
String parentCallId = source.readString();
@@ -276,6 +292,7 @@ public final class ParcelableCall implements Parcelable {
callerDisplayNamePresentation,
gatewayInfo,
accountHandle,
isVideoCallProviderChanged,
videoCallProvider,
parentCallId,
childCallIds,
@@ -313,6 +330,7 @@ public final class ParcelableCall implements Parcelable {
destination.writeInt(mCallerDisplayNamePresentation);
destination.writeParcelable(mGatewayInfo, 0);
destination.writeParcelable(mAccountHandle, 0);
destination.writeByte((byte) (mIsVideoCallProviderChanged ? 1 : 0));
destination.writeStrongBinder(
mVideoCallProvider != null ? mVideoCallProvider.asBinder() : null);
destination.writeString(mParentCallId);