Merge "Add additional APIs in Call for Bluetooth"
This commit is contained in:
@@ -43313,6 +43313,7 @@ package android.telecom {
|
|||||||
method public java.util.List<android.telecom.Call> getChildren();
|
method public java.util.List<android.telecom.Call> getChildren();
|
||||||
method public java.util.List<android.telecom.Call> getConferenceableCalls();
|
method public java.util.List<android.telecom.Call> getConferenceableCalls();
|
||||||
method public android.telecom.Call.Details getDetails();
|
method public android.telecom.Call.Details getDetails();
|
||||||
|
method @Nullable public android.telecom.Call getGenericConferenceActiveChildCall();
|
||||||
method public android.telecom.Call getParent();
|
method public android.telecom.Call getParent();
|
||||||
method public String getRemainingPostDialSequence();
|
method public String getRemainingPostDialSequence();
|
||||||
method @Nullable public android.telecom.Call.RttCall getRttCall();
|
method @Nullable public android.telecom.Call.RttCall getRttCall();
|
||||||
@@ -43396,6 +43397,7 @@ package android.telecom {
|
|||||||
method public int getCallerDisplayNamePresentation();
|
method public int getCallerDisplayNamePresentation();
|
||||||
method public int getCallerNumberVerificationStatus();
|
method public int getCallerNumberVerificationStatus();
|
||||||
method public final long getConnectTimeMillis();
|
method public final long getConnectTimeMillis();
|
||||||
|
method @Nullable public String getContactDisplayName();
|
||||||
method public long getCreationTimeMillis();
|
method public long getCreationTimeMillis();
|
||||||
method public android.telecom.DisconnectCause getDisconnectCause();
|
method public android.telecom.DisconnectCause getDisconnectCause();
|
||||||
method public android.os.Bundle getExtras();
|
method public android.os.Bundle getExtras();
|
||||||
|
|||||||
@@ -568,6 +568,7 @@ public final class Call {
|
|||||||
private final Bundle mExtras;
|
private final Bundle mExtras;
|
||||||
private final Bundle mIntentExtras;
|
private final Bundle mIntentExtras;
|
||||||
private final long mCreationTimeMillis;
|
private final long mCreationTimeMillis;
|
||||||
|
private final String mContactDisplayName;
|
||||||
private final @CallDirection int mCallDirection;
|
private final @CallDirection int mCallDirection;
|
||||||
private final @Connection.VerificationStatus int mCallerNumberVerificationStatus;
|
private final @Connection.VerificationStatus int mCallerNumberVerificationStatus;
|
||||||
|
|
||||||
@@ -871,6 +872,17 @@ public final class Call {
|
|||||||
return mCreationTimeMillis;
|
return mCreationTimeMillis;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the name of the caller on the remote end, as derived from a
|
||||||
|
* {@link android.provider.ContactsContract} lookup of the call's handle.
|
||||||
|
* @return The name of the caller, or {@code null} if the lookup is not yet complete, if
|
||||||
|
* there's no contacts entry for the caller, or if the {@link InCallService} does
|
||||||
|
* not hold the {@link android.Manifest.permission#READ_CONTACTS} permission.
|
||||||
|
*/
|
||||||
|
public @Nullable String getContactDisplayName() {
|
||||||
|
return mContactDisplayName;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether the call is an incoming or outgoing call.
|
* Indicates whether the call is an incoming or outgoing call.
|
||||||
* @return The call's direction.
|
* @return The call's direction.
|
||||||
@@ -909,6 +921,7 @@ public final class Call {
|
|||||||
areBundlesEqual(mExtras, d.mExtras) &&
|
areBundlesEqual(mExtras, d.mExtras) &&
|
||||||
areBundlesEqual(mIntentExtras, d.mIntentExtras) &&
|
areBundlesEqual(mIntentExtras, d.mIntentExtras) &&
|
||||||
Objects.equals(mCreationTimeMillis, d.mCreationTimeMillis) &&
|
Objects.equals(mCreationTimeMillis, d.mCreationTimeMillis) &&
|
||||||
|
Objects.equals(mContactDisplayName, d.mContactDisplayName) &&
|
||||||
Objects.equals(mCallDirection, d.mCallDirection) &&
|
Objects.equals(mCallDirection, d.mCallDirection) &&
|
||||||
Objects.equals(mCallerNumberVerificationStatus,
|
Objects.equals(mCallerNumberVerificationStatus,
|
||||||
d.mCallerNumberVerificationStatus);
|
d.mCallerNumberVerificationStatus);
|
||||||
@@ -933,6 +946,7 @@ public final class Call {
|
|||||||
mExtras,
|
mExtras,
|
||||||
mIntentExtras,
|
mIntentExtras,
|
||||||
mCreationTimeMillis,
|
mCreationTimeMillis,
|
||||||
|
mContactDisplayName,
|
||||||
mCallDirection,
|
mCallDirection,
|
||||||
mCallerNumberVerificationStatus);
|
mCallerNumberVerificationStatus);
|
||||||
}
|
}
|
||||||
@@ -955,6 +969,7 @@ public final class Call {
|
|||||||
Bundle extras,
|
Bundle extras,
|
||||||
Bundle intentExtras,
|
Bundle intentExtras,
|
||||||
long creationTimeMillis,
|
long creationTimeMillis,
|
||||||
|
String contactDisplayName,
|
||||||
int callDirection,
|
int callDirection,
|
||||||
int callerNumberVerificationStatus) {
|
int callerNumberVerificationStatus) {
|
||||||
mTelecomCallId = telecomCallId;
|
mTelecomCallId = telecomCallId;
|
||||||
@@ -973,6 +988,7 @@ public final class Call {
|
|||||||
mExtras = extras;
|
mExtras = extras;
|
||||||
mIntentExtras = intentExtras;
|
mIntentExtras = intentExtras;
|
||||||
mCreationTimeMillis = creationTimeMillis;
|
mCreationTimeMillis = creationTimeMillis;
|
||||||
|
mContactDisplayName = contactDisplayName;
|
||||||
mCallDirection = callDirection;
|
mCallDirection = callDirection;
|
||||||
mCallerNumberVerificationStatus = callerNumberVerificationStatus;
|
mCallerNumberVerificationStatus = callerNumberVerificationStatus;
|
||||||
}
|
}
|
||||||
@@ -996,6 +1012,7 @@ public final class Call {
|
|||||||
parcelableCall.getExtras(),
|
parcelableCall.getExtras(),
|
||||||
parcelableCall.getIntentExtras(),
|
parcelableCall.getIntentExtras(),
|
||||||
parcelableCall.getCreationTimeMillis(),
|
parcelableCall.getCreationTimeMillis(),
|
||||||
|
parcelableCall.getContactDisplayName(),
|
||||||
parcelableCall.getCallDirection(),
|
parcelableCall.getCallDirection(),
|
||||||
parcelableCall.getCallerNumberVerificationStatus());
|
parcelableCall.getCallerNumberVerificationStatus());
|
||||||
}
|
}
|
||||||
@@ -1445,6 +1462,7 @@ public final class Call {
|
|||||||
|
|
||||||
private boolean mChildrenCached;
|
private boolean mChildrenCached;
|
||||||
private String mParentId = null;
|
private String mParentId = null;
|
||||||
|
private String mActiveGenericConferenceChild = null;
|
||||||
private int mState;
|
private int mState;
|
||||||
private List<String> mCannedTextResponses = null;
|
private List<String> mCannedTextResponses = null;
|
||||||
private String mCallingPackage;
|
private String mCallingPackage;
|
||||||
@@ -1942,6 +1960,20 @@ public final class Call {
|
|||||||
return mState;
|
return mState;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the child {@link Call} in a generic conference that is currently active.
|
||||||
|
* For calls that are not generic conferences, or when the generic conference has more than
|
||||||
|
* 2 children, returns {@code null}.
|
||||||
|
* @see Details#PROPERTY_GENERIC_CONFERENCE
|
||||||
|
* @return The active child call.
|
||||||
|
*/
|
||||||
|
public @Nullable Call getGenericConferenceActiveChildCall() {
|
||||||
|
if (mActiveGenericConferenceChild != null) {
|
||||||
|
return mPhone.internalGetCallByTelecomId(mActiveGenericConferenceChild);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Obtains a list of canned, pre-configured message responses to present to the user as
|
* Obtains a list of canned, pre-configured message responses to present to the user as
|
||||||
* ways of rejecting this {@code Call} using via a text message.
|
* ways of rejecting this {@code Call} using via a text message.
|
||||||
@@ -2190,6 +2222,13 @@ public final class Call {
|
|||||||
mChildrenCached = false;
|
mChildrenCached = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String activeChildCallId = parcelableCall.getActiveChildCallId();
|
||||||
|
boolean activeChildChanged = !Objects.equals(activeChildCallId,
|
||||||
|
mActiveGenericConferenceChild);
|
||||||
|
if (activeChildChanged) {
|
||||||
|
mActiveGenericConferenceChild = activeChildCallId;
|
||||||
|
}
|
||||||
|
|
||||||
List<String> conferenceableCallIds = parcelableCall.getConferenceableCallIds();
|
List<String> conferenceableCallIds = parcelableCall.getConferenceableCallIds();
|
||||||
List<Call> conferenceableCalls = new ArrayList<Call>(conferenceableCallIds.size());
|
List<Call> conferenceableCalls = new ArrayList<Call>(conferenceableCallIds.size());
|
||||||
for (String otherId : conferenceableCallIds) {
|
for (String otherId : conferenceableCallIds) {
|
||||||
@@ -2249,7 +2288,7 @@ public final class Call {
|
|||||||
if (parentChanged) {
|
if (parentChanged) {
|
||||||
fireParentChanged(getParent());
|
fireParentChanged(getParent());
|
||||||
}
|
}
|
||||||
if (childrenChanged) {
|
if (childrenChanged || activeChildChanged) {
|
||||||
fireChildrenChanged(getChildren());
|
fireChildrenChanged(getChildren());
|
||||||
}
|
}
|
||||||
if (isRttChanged) {
|
if (isRttChanged) {
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
package android.telecom;
|
package android.telecom;
|
||||||
|
|
||||||
|
import android.annotation.Nullable;
|
||||||
import android.compat.annotation.UnsupportedAppUsage;
|
import android.compat.annotation.UnsupportedAppUsage;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
@@ -36,6 +37,265 @@ import java.util.List;
|
|||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
public final class ParcelableCall implements Parcelable {
|
public final class ParcelableCall implements Parcelable {
|
||||||
|
|
||||||
|
public static class ParcelableCallBuilder {
|
||||||
|
private String mId;
|
||||||
|
private int mState;
|
||||||
|
private DisconnectCause mDisconnectCause;
|
||||||
|
private List<String> mCannedSmsResponses;
|
||||||
|
private int mCapabilities;
|
||||||
|
private int mProperties;
|
||||||
|
private int mSupportedAudioRoutes;
|
||||||
|
private long mConnectTimeMillis;
|
||||||
|
private Uri mHandle;
|
||||||
|
private int mHandlePresentation;
|
||||||
|
private String mCallerDisplayName;
|
||||||
|
private int mCallerDisplayNamePresentation;
|
||||||
|
private GatewayInfo mGatewayInfo;
|
||||||
|
private PhoneAccountHandle mAccountHandle;
|
||||||
|
private boolean mIsVideoCallProviderChanged;
|
||||||
|
private IVideoProvider mVideoCallProvider;
|
||||||
|
private boolean mIsRttCallChanged;
|
||||||
|
private ParcelableRttCall mRttCall;
|
||||||
|
private String mParentCallId;
|
||||||
|
private List<String> mChildCallIds;
|
||||||
|
private StatusHints mStatusHints;
|
||||||
|
private int mVideoState;
|
||||||
|
private List<String> mConferenceableCallIds;
|
||||||
|
private Bundle mIntentExtras;
|
||||||
|
private Bundle mExtras;
|
||||||
|
private long mCreationTimeMillis;
|
||||||
|
private int mCallDirection;
|
||||||
|
private int mCallerNumberVerificationStatus;
|
||||||
|
private String mContactDisplayName;
|
||||||
|
private String mActiveChildCallId;
|
||||||
|
|
||||||
|
public ParcelableCallBuilder setId(String id) {
|
||||||
|
mId = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ParcelableCallBuilder setState(int state) {
|
||||||
|
mState = state;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ParcelableCallBuilder setDisconnectCause(DisconnectCause disconnectCause) {
|
||||||
|
mDisconnectCause = disconnectCause;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ParcelableCallBuilder setCannedSmsResponses(List<String> cannedSmsResponses) {
|
||||||
|
mCannedSmsResponses = cannedSmsResponses;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ParcelableCallBuilder setCapabilities(int capabilities) {
|
||||||
|
mCapabilities = capabilities;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ParcelableCallBuilder setProperties(int properties) {
|
||||||
|
mProperties = properties;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ParcelableCallBuilder setSupportedAudioRoutes(int supportedAudioRoutes) {
|
||||||
|
mSupportedAudioRoutes = supportedAudioRoutes;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ParcelableCallBuilder setConnectTimeMillis(long connectTimeMillis) {
|
||||||
|
mConnectTimeMillis = connectTimeMillis;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ParcelableCallBuilder setHandle(Uri handle) {
|
||||||
|
mHandle = handle;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ParcelableCallBuilder setHandlePresentation(int handlePresentation) {
|
||||||
|
mHandlePresentation = handlePresentation;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ParcelableCallBuilder setCallerDisplayName(String callerDisplayName) {
|
||||||
|
mCallerDisplayName = callerDisplayName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ParcelableCallBuilder setCallerDisplayNamePresentation(
|
||||||
|
int callerDisplayNamePresentation) {
|
||||||
|
mCallerDisplayNamePresentation = callerDisplayNamePresentation;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ParcelableCallBuilder setGatewayInfo(GatewayInfo gatewayInfo) {
|
||||||
|
mGatewayInfo = gatewayInfo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ParcelableCallBuilder setAccountHandle(PhoneAccountHandle accountHandle) {
|
||||||
|
mAccountHandle = accountHandle;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ParcelableCallBuilder setIsVideoCallProviderChanged(
|
||||||
|
boolean isVideoCallProviderChanged) {
|
||||||
|
mIsVideoCallProviderChanged = isVideoCallProviderChanged;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ParcelableCallBuilder setVideoCallProvider(IVideoProvider videoCallProvider) {
|
||||||
|
mVideoCallProvider = videoCallProvider;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ParcelableCallBuilder setIsRttCallChanged(boolean isRttCallChanged) {
|
||||||
|
mIsRttCallChanged = isRttCallChanged;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ParcelableCallBuilder setRttCall(ParcelableRttCall rttCall) {
|
||||||
|
mRttCall = rttCall;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ParcelableCallBuilder setParentCallId(String parentCallId) {
|
||||||
|
mParentCallId = parentCallId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ParcelableCallBuilder setChildCallIds(List<String> childCallIds) {
|
||||||
|
mChildCallIds = childCallIds;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ParcelableCallBuilder setStatusHints(StatusHints statusHints) {
|
||||||
|
mStatusHints = statusHints;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ParcelableCallBuilder setVideoState(int videoState) {
|
||||||
|
mVideoState = videoState;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ParcelableCallBuilder setConferenceableCallIds(
|
||||||
|
List<String> conferenceableCallIds) {
|
||||||
|
mConferenceableCallIds = conferenceableCallIds;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ParcelableCallBuilder setIntentExtras(Bundle intentExtras) {
|
||||||
|
mIntentExtras = intentExtras;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ParcelableCallBuilder setExtras(Bundle extras) {
|
||||||
|
mExtras = extras;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ParcelableCallBuilder setCreationTimeMillis(long creationTimeMillis) {
|
||||||
|
mCreationTimeMillis = creationTimeMillis;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ParcelableCallBuilder setCallDirection(int callDirection) {
|
||||||
|
mCallDirection = callDirection;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ParcelableCallBuilder setCallerNumberVerificationStatus(
|
||||||
|
int callerNumberVerificationStatus) {
|
||||||
|
mCallerNumberVerificationStatus = callerNumberVerificationStatus;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ParcelableCallBuilder setContactDisplayName(String contactDisplayName) {
|
||||||
|
mContactDisplayName = contactDisplayName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ParcelableCallBuilder setActiveChildCallId(String activeChildCallId) {
|
||||||
|
mActiveChildCallId = activeChildCallId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ParcelableCall createParcelableCall() {
|
||||||
|
return new ParcelableCall(
|
||||||
|
mId,
|
||||||
|
mState,
|
||||||
|
mDisconnectCause,
|
||||||
|
mCannedSmsResponses,
|
||||||
|
mCapabilities,
|
||||||
|
mProperties,
|
||||||
|
mSupportedAudioRoutes,
|
||||||
|
mConnectTimeMillis,
|
||||||
|
mHandle,
|
||||||
|
mHandlePresentation,
|
||||||
|
mCallerDisplayName,
|
||||||
|
mCallerDisplayNamePresentation,
|
||||||
|
mGatewayInfo,
|
||||||
|
mAccountHandle,
|
||||||
|
mIsVideoCallProviderChanged,
|
||||||
|
mVideoCallProvider,
|
||||||
|
mIsRttCallChanged,
|
||||||
|
mRttCall,
|
||||||
|
mParentCallId,
|
||||||
|
mChildCallIds,
|
||||||
|
mStatusHints,
|
||||||
|
mVideoState,
|
||||||
|
mConferenceableCallIds,
|
||||||
|
mIntentExtras,
|
||||||
|
mExtras,
|
||||||
|
mCreationTimeMillis,
|
||||||
|
mCallDirection,
|
||||||
|
mCallerNumberVerificationStatus,
|
||||||
|
mContactDisplayName,
|
||||||
|
mActiveChildCallId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ParcelableCallBuilder fromParcelableCall(ParcelableCall parcelableCall) {
|
||||||
|
ParcelableCallBuilder newBuilder = new ParcelableCallBuilder();
|
||||||
|
newBuilder.mId = parcelableCall.mId;
|
||||||
|
newBuilder.mState = parcelableCall.mState;
|
||||||
|
newBuilder.mDisconnectCause = parcelableCall.mDisconnectCause;
|
||||||
|
newBuilder.mCannedSmsResponses = parcelableCall.mCannedSmsResponses;
|
||||||
|
newBuilder.mCapabilities = parcelableCall.mCapabilities;
|
||||||
|
newBuilder.mProperties = parcelableCall.mProperties;
|
||||||
|
newBuilder.mSupportedAudioRoutes = parcelableCall.mSupportedAudioRoutes;
|
||||||
|
newBuilder.mConnectTimeMillis = parcelableCall.mConnectTimeMillis;
|
||||||
|
newBuilder.mHandle = parcelableCall.mHandle;
|
||||||
|
newBuilder.mHandlePresentation = parcelableCall.mHandlePresentation;
|
||||||
|
newBuilder.mCallerDisplayName = parcelableCall.mCallerDisplayName;
|
||||||
|
newBuilder.mCallerDisplayNamePresentation =
|
||||||
|
parcelableCall.mCallerDisplayNamePresentation;
|
||||||
|
newBuilder.mGatewayInfo = parcelableCall.mGatewayInfo;
|
||||||
|
newBuilder.mAccountHandle = parcelableCall.mAccountHandle;
|
||||||
|
newBuilder.mIsVideoCallProviderChanged = parcelableCall.mIsVideoCallProviderChanged;
|
||||||
|
newBuilder.mVideoCallProvider = parcelableCall.mVideoCallProvider;
|
||||||
|
newBuilder.mIsRttCallChanged = parcelableCall.mIsRttCallChanged;
|
||||||
|
newBuilder.mRttCall = parcelableCall.mRttCall;
|
||||||
|
newBuilder.mParentCallId = parcelableCall.mParentCallId;
|
||||||
|
newBuilder.mChildCallIds = parcelableCall.mChildCallIds;
|
||||||
|
newBuilder.mStatusHints = parcelableCall.mStatusHints;
|
||||||
|
newBuilder.mVideoState = parcelableCall.mVideoState;
|
||||||
|
newBuilder.mConferenceableCallIds = parcelableCall.mConferenceableCallIds;
|
||||||
|
newBuilder.mIntentExtras = parcelableCall.mIntentExtras;
|
||||||
|
newBuilder.mExtras = parcelableCall.mExtras;
|
||||||
|
newBuilder.mCreationTimeMillis = parcelableCall.mCreationTimeMillis;
|
||||||
|
newBuilder.mCallDirection = parcelableCall.mCallDirection;
|
||||||
|
newBuilder.mCallerNumberVerificationStatus =
|
||||||
|
parcelableCall.mCallerNumberVerificationStatus;
|
||||||
|
newBuilder.mContactDisplayName = parcelableCall.mContactDisplayName;
|
||||||
|
newBuilder.mActiveChildCallId = parcelableCall.mActiveChildCallId;
|
||||||
|
return newBuilder;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private final String mId;
|
private final String mId;
|
||||||
private final int mState;
|
private final int mState;
|
||||||
private final DisconnectCause mDisconnectCause;
|
private final DisconnectCause mDisconnectCause;
|
||||||
@@ -65,6 +325,8 @@ public final class ParcelableCall implements Parcelable {
|
|||||||
private final long mCreationTimeMillis;
|
private final long mCreationTimeMillis;
|
||||||
private final int mCallDirection;
|
private final int mCallDirection;
|
||||||
private final int mCallerNumberVerificationStatus;
|
private final int mCallerNumberVerificationStatus;
|
||||||
|
private final String mContactDisplayName;
|
||||||
|
private final String mActiveChildCallId; // Only valid for CDMA conferences
|
||||||
|
|
||||||
public ParcelableCall(
|
public ParcelableCall(
|
||||||
String id,
|
String id,
|
||||||
@@ -94,7 +356,10 @@ public final class ParcelableCall implements Parcelable {
|
|||||||
Bundle extras,
|
Bundle extras,
|
||||||
long creationTimeMillis,
|
long creationTimeMillis,
|
||||||
int callDirection,
|
int callDirection,
|
||||||
int callerNumberVerificationStatus) {
|
int callerNumberVerificationStatus,
|
||||||
|
String contactDisplayName,
|
||||||
|
String activeChildCallId
|
||||||
|
) {
|
||||||
mId = id;
|
mId = id;
|
||||||
mState = state;
|
mState = state;
|
||||||
mDisconnectCause = disconnectCause;
|
mDisconnectCause = disconnectCause;
|
||||||
@@ -123,6 +388,8 @@ public final class ParcelableCall implements Parcelable {
|
|||||||
mCreationTimeMillis = creationTimeMillis;
|
mCreationTimeMillis = creationTimeMillis;
|
||||||
mCallDirection = callDirection;
|
mCallDirection = callDirection;
|
||||||
mCallerNumberVerificationStatus = callerNumberVerificationStatus;
|
mCallerNumberVerificationStatus = callerNumberVerificationStatus;
|
||||||
|
mContactDisplayName = contactDisplayName;
|
||||||
|
mActiveChildCallId = activeChildCallId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** The unique ID of the call. */
|
/** The unique ID of the call. */
|
||||||
@@ -332,6 +599,21 @@ public final class ParcelableCall implements Parcelable {
|
|||||||
return mCallerNumberVerificationStatus;
|
return mCallerNumberVerificationStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the name of the remote party as derived from a contacts DB lookup.
|
||||||
|
*/
|
||||||
|
public @Nullable String getContactDisplayName() {
|
||||||
|
return mContactDisplayName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return On a CDMA conference with two participants, returns the ID of the child call that's
|
||||||
|
* currently active.
|
||||||
|
*/
|
||||||
|
public @Nullable String getActiveChildCallId() {
|
||||||
|
return mActiveChildCallId;
|
||||||
|
}
|
||||||
|
|
||||||
/** Responsible for creating ParcelableCall objects for deserialized Parcels. */
|
/** Responsible for creating ParcelableCall objects for deserialized Parcels. */
|
||||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
|
||||||
public static final @android.annotation.NonNull Parcelable.Creator<ParcelableCall> CREATOR =
|
public static final @android.annotation.NonNull Parcelable.Creator<ParcelableCall> CREATOR =
|
||||||
@@ -371,35 +653,40 @@ public final class ParcelableCall implements Parcelable {
|
|||||||
long creationTimeMillis = source.readLong();
|
long creationTimeMillis = source.readLong();
|
||||||
int callDirection = source.readInt();
|
int callDirection = source.readInt();
|
||||||
int callerNumberVerificationStatus = source.readInt();
|
int callerNumberVerificationStatus = source.readInt();
|
||||||
return new ParcelableCall(
|
String contactDisplayName = source.readString();
|
||||||
id,
|
String activeChildCallId = source.readString();
|
||||||
state,
|
return new ParcelableCallBuilder()
|
||||||
disconnectCause,
|
.setId(id)
|
||||||
cannedSmsResponses,
|
.setState(state)
|
||||||
capabilities,
|
.setDisconnectCause(disconnectCause)
|
||||||
properties,
|
.setCannedSmsResponses(cannedSmsResponses)
|
||||||
supportedAudioRoutes,
|
.setCapabilities(capabilities)
|
||||||
connectTimeMillis,
|
.setProperties(properties)
|
||||||
handle,
|
.setSupportedAudioRoutes(supportedAudioRoutes)
|
||||||
handlePresentation,
|
.setConnectTimeMillis(connectTimeMillis)
|
||||||
callerDisplayName,
|
.setHandle(handle)
|
||||||
callerDisplayNamePresentation,
|
.setHandlePresentation(handlePresentation)
|
||||||
gatewayInfo,
|
.setCallerDisplayName(callerDisplayName)
|
||||||
accountHandle,
|
.setCallerDisplayNamePresentation(callerDisplayNamePresentation)
|
||||||
isVideoCallProviderChanged,
|
.setGatewayInfo(gatewayInfo)
|
||||||
videoCallProvider,
|
.setAccountHandle(accountHandle)
|
||||||
isRttCallChanged,
|
.setIsVideoCallProviderChanged(isVideoCallProviderChanged)
|
||||||
rttCall,
|
.setVideoCallProvider(videoCallProvider)
|
||||||
parentCallId,
|
.setIsRttCallChanged(isRttCallChanged)
|
||||||
childCallIds,
|
.setRttCall(rttCall)
|
||||||
statusHints,
|
.setParentCallId(parentCallId)
|
||||||
videoState,
|
.setChildCallIds(childCallIds)
|
||||||
conferenceableCallIds,
|
.setStatusHints(statusHints)
|
||||||
intentExtras,
|
.setVideoState(videoState)
|
||||||
extras,
|
.setConferenceableCallIds(conferenceableCallIds)
|
||||||
creationTimeMillis,
|
.setIntentExtras(intentExtras)
|
||||||
callDirection,
|
.setExtras(extras)
|
||||||
callerNumberVerificationStatus);
|
.setCreationTimeMillis(creationTimeMillis)
|
||||||
|
.setCallDirection(callDirection)
|
||||||
|
.setCallerNumberVerificationStatus(callerNumberVerificationStatus)
|
||||||
|
.setContactDisplayName(contactDisplayName)
|
||||||
|
.setActiveChildCallId(activeChildCallId)
|
||||||
|
.createParcelableCall();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -446,6 +733,8 @@ public final class ParcelableCall implements Parcelable {
|
|||||||
destination.writeLong(mCreationTimeMillis);
|
destination.writeLong(mCreationTimeMillis);
|
||||||
destination.writeInt(mCallDirection);
|
destination.writeInt(mCallDirection);
|
||||||
destination.writeInt(mCallerNumberVerificationStatus);
|
destination.writeInt(mCallerNumberVerificationStatus);
|
||||||
|
destination.writeString(mContactDisplayName);
|
||||||
|
destination.writeString(mActiveChildCallId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user