Merge "Merge "Add api to retrieve call creation time." am: f19c52d20d am: 777adc636b am: eee4d5157a" into oc-dev-plus-aosp
This commit is contained in:
committed by
Android (Google) Code Review
commit
c5cedc7bb7
@@ -38748,6 +38748,7 @@ package android.telecom {
|
|||||||
method public java.lang.String getCallerDisplayName();
|
method public java.lang.String getCallerDisplayName();
|
||||||
method public int getCallerDisplayNamePresentation();
|
method public int getCallerDisplayNamePresentation();
|
||||||
method public final long getConnectTimeMillis();
|
method public final long getConnectTimeMillis();
|
||||||
|
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();
|
||||||
method public android.telecom.GatewayInfo getGatewayInfo();
|
method public android.telecom.GatewayInfo getGatewayInfo();
|
||||||
|
|||||||
@@ -41938,6 +41938,7 @@ package android.telecom {
|
|||||||
method public java.lang.String getCallerDisplayName();
|
method public java.lang.String getCallerDisplayName();
|
||||||
method public int getCallerDisplayNamePresentation();
|
method public int getCallerDisplayNamePresentation();
|
||||||
method public final long getConnectTimeMillis();
|
method public final long getConnectTimeMillis();
|
||||||
|
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();
|
||||||
method public android.telecom.GatewayInfo getGatewayInfo();
|
method public android.telecom.GatewayInfo getGatewayInfo();
|
||||||
|
|||||||
@@ -38952,6 +38952,7 @@ package android.telecom {
|
|||||||
method public java.lang.String getCallerDisplayName();
|
method public java.lang.String getCallerDisplayName();
|
||||||
method public int getCallerDisplayNamePresentation();
|
method public int getCallerDisplayNamePresentation();
|
||||||
method public final long getConnectTimeMillis();
|
method public final long getConnectTimeMillis();
|
||||||
|
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();
|
||||||
method public android.telecom.GatewayInfo getGatewayInfo();
|
method public android.telecom.GatewayInfo getGatewayInfo();
|
||||||
|
|||||||
@@ -356,6 +356,7 @@ public final class Call {
|
|||||||
private final StatusHints mStatusHints;
|
private final StatusHints mStatusHints;
|
||||||
private final Bundle mExtras;
|
private final Bundle mExtras;
|
||||||
private final Bundle mIntentExtras;
|
private final Bundle mIntentExtras;
|
||||||
|
private final long mCreationTimeMillis;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether the supplied capabilities supports the specified capability.
|
* Whether the supplied capabilities supports the specified capability.
|
||||||
@@ -578,9 +579,12 @@ public final class Call {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return The time the {@code Call} has been connected. This information is updated
|
* Returns the time the {@link Call} connected (i.e. became active). This information is
|
||||||
* periodically, but user interfaces should not rely on this to display any "call time
|
* updated periodically, but user interfaces should not rely on this to display the "call
|
||||||
* clock".
|
* time clock". For the time when the call was first added to Telecom, see
|
||||||
|
* {@link #getCreationTimeMillis()}.
|
||||||
|
*
|
||||||
|
* @return The time the {@link Call} connected in milliseconds since the epoch.
|
||||||
*/
|
*/
|
||||||
public final long getConnectTimeMillis() {
|
public final long getConnectTimeMillis() {
|
||||||
return mConnectTimeMillis;
|
return mConnectTimeMillis;
|
||||||
@@ -622,6 +626,18 @@ public final class Call {
|
|||||||
return mIntentExtras;
|
return mIntentExtras;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the time when the call was first created and added to Telecom. This is the same
|
||||||
|
* time that is logged as the start time in the Call Log (see
|
||||||
|
* {@link android.provider.CallLog.Calls#DATE}). To determine when the call was connected
|
||||||
|
* (became active), see {@link #getConnectTimeMillis()}.
|
||||||
|
*
|
||||||
|
* @return The creation time of the call, in millis since the epoch.
|
||||||
|
*/
|
||||||
|
public long getCreationTimeMillis() {
|
||||||
|
return mCreationTimeMillis;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
if (o instanceof Details) {
|
if (o instanceof Details) {
|
||||||
@@ -641,28 +657,29 @@ public final class Call {
|
|||||||
Objects.equals(mVideoState, d.mVideoState) &&
|
Objects.equals(mVideoState, d.mVideoState) &&
|
||||||
Objects.equals(mStatusHints, d.mStatusHints) &&
|
Objects.equals(mStatusHints, d.mStatusHints) &&
|
||||||
areBundlesEqual(mExtras, d.mExtras) &&
|
areBundlesEqual(mExtras, d.mExtras) &&
|
||||||
areBundlesEqual(mIntentExtras, d.mIntentExtras);
|
areBundlesEqual(mIntentExtras, d.mIntentExtras) &&
|
||||||
|
Objects.equals(mCreationTimeMillis, d.mCreationTimeMillis);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return
|
return Objects.hash(mHandle,
|
||||||
Objects.hashCode(mHandle) +
|
mHandlePresentation,
|
||||||
Objects.hashCode(mHandlePresentation) +
|
mCallerDisplayName,
|
||||||
Objects.hashCode(mCallerDisplayName) +
|
mCallerDisplayNamePresentation,
|
||||||
Objects.hashCode(mCallerDisplayNamePresentation) +
|
mAccountHandle,
|
||||||
Objects.hashCode(mAccountHandle) +
|
mCallCapabilities,
|
||||||
Objects.hashCode(mCallCapabilities) +
|
mCallProperties,
|
||||||
Objects.hashCode(mCallProperties) +
|
mDisconnectCause,
|
||||||
Objects.hashCode(mDisconnectCause) +
|
mConnectTimeMillis,
|
||||||
Objects.hashCode(mConnectTimeMillis) +
|
mGatewayInfo,
|
||||||
Objects.hashCode(mGatewayInfo) +
|
mVideoState,
|
||||||
Objects.hashCode(mVideoState) +
|
mStatusHints,
|
||||||
Objects.hashCode(mStatusHints) +
|
mExtras,
|
||||||
Objects.hashCode(mExtras) +
|
mIntentExtras,
|
||||||
Objects.hashCode(mIntentExtras);
|
mCreationTimeMillis);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@hide} */
|
/** {@hide} */
|
||||||
@@ -681,7 +698,8 @@ public final class Call {
|
|||||||
int videoState,
|
int videoState,
|
||||||
StatusHints statusHints,
|
StatusHints statusHints,
|
||||||
Bundle extras,
|
Bundle extras,
|
||||||
Bundle intentExtras) {
|
Bundle intentExtras,
|
||||||
|
long creationTimeMillis) {
|
||||||
mTelecomCallId = telecomCallId;
|
mTelecomCallId = telecomCallId;
|
||||||
mHandle = handle;
|
mHandle = handle;
|
||||||
mHandlePresentation = handlePresentation;
|
mHandlePresentation = handlePresentation;
|
||||||
@@ -697,6 +715,7 @@ public final class Call {
|
|||||||
mStatusHints = statusHints;
|
mStatusHints = statusHints;
|
||||||
mExtras = extras;
|
mExtras = extras;
|
||||||
mIntentExtras = intentExtras;
|
mIntentExtras = intentExtras;
|
||||||
|
mCreationTimeMillis = creationTimeMillis;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@hide} */
|
/** {@hide} */
|
||||||
@@ -716,7 +735,8 @@ public final class Call {
|
|||||||
parcelableCall.getVideoState(),
|
parcelableCall.getVideoState(),
|
||||||
parcelableCall.getStatusHints(),
|
parcelableCall.getStatusHints(),
|
||||||
parcelableCall.getExtras(),
|
parcelableCall.getExtras(),
|
||||||
parcelableCall.getIntentExtras());
|
parcelableCall.getIntentExtras(),
|
||||||
|
parcelableCall.getCreationTimeMillis());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ public final class ParcelableCall implements Parcelable {
|
|||||||
private final List<String> mConferenceableCallIds;
|
private final List<String> mConferenceableCallIds;
|
||||||
private final Bundle mIntentExtras;
|
private final Bundle mIntentExtras;
|
||||||
private final Bundle mExtras;
|
private final Bundle mExtras;
|
||||||
|
private final long mCreationTimeMillis;
|
||||||
|
|
||||||
public ParcelableCall(
|
public ParcelableCall(
|
||||||
String id,
|
String id,
|
||||||
@@ -85,7 +86,8 @@ public final class ParcelableCall implements Parcelable {
|
|||||||
int videoState,
|
int videoState,
|
||||||
List<String> conferenceableCallIds,
|
List<String> conferenceableCallIds,
|
||||||
Bundle intentExtras,
|
Bundle intentExtras,
|
||||||
Bundle extras) {
|
Bundle extras,
|
||||||
|
long creationTimeMillis) {
|
||||||
mId = id;
|
mId = id;
|
||||||
mState = state;
|
mState = state;
|
||||||
mDisconnectCause = disconnectCause;
|
mDisconnectCause = disconnectCause;
|
||||||
@@ -111,6 +113,7 @@ public final class ParcelableCall implements Parcelable {
|
|||||||
mConferenceableCallIds = Collections.unmodifiableList(conferenceableCallIds);
|
mConferenceableCallIds = Collections.unmodifiableList(conferenceableCallIds);
|
||||||
mIntentExtras = intentExtras;
|
mIntentExtras = intentExtras;
|
||||||
mExtras = extras;
|
mExtras = extras;
|
||||||
|
mCreationTimeMillis = creationTimeMillis;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** The unique ID of the call. */
|
/** The unique ID of the call. */
|
||||||
@@ -289,6 +292,13 @@ public final class ParcelableCall implements Parcelable {
|
|||||||
return mIsVideoCallProviderChanged;
|
return mIsVideoCallProviderChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return The time the call was created, in milliseconds since the epoch.
|
||||||
|
*/
|
||||||
|
public long getCreationTimeMillis() {
|
||||||
|
return mCreationTimeMillis;
|
||||||
|
}
|
||||||
|
|
||||||
/** Responsible for creating ParcelableCall objects for deserialized Parcels. */
|
/** Responsible for creating ParcelableCall objects for deserialized Parcels. */
|
||||||
public static final Parcelable.Creator<ParcelableCall> CREATOR =
|
public static final Parcelable.Creator<ParcelableCall> CREATOR =
|
||||||
new Parcelable.Creator<ParcelableCall> () {
|
new Parcelable.Creator<ParcelableCall> () {
|
||||||
@@ -324,6 +334,7 @@ public final class ParcelableCall implements Parcelable {
|
|||||||
int supportedAudioRoutes = source.readInt();
|
int supportedAudioRoutes = source.readInt();
|
||||||
boolean isRttCallChanged = source.readByte() == 1;
|
boolean isRttCallChanged = source.readByte() == 1;
|
||||||
ParcelableRttCall rttCall = source.readParcelable(classLoader);
|
ParcelableRttCall rttCall = source.readParcelable(classLoader);
|
||||||
|
long creationTimeMillis = source.readLong();
|
||||||
return new ParcelableCall(
|
return new ParcelableCall(
|
||||||
id,
|
id,
|
||||||
state,
|
state,
|
||||||
@@ -349,7 +360,8 @@ public final class ParcelableCall implements Parcelable {
|
|||||||
videoState,
|
videoState,
|
||||||
conferenceableCallIds,
|
conferenceableCallIds,
|
||||||
intentExtras,
|
intentExtras,
|
||||||
extras);
|
extras,
|
||||||
|
creationTimeMillis);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -393,6 +405,7 @@ public final class ParcelableCall implements Parcelable {
|
|||||||
destination.writeInt(mSupportedAudioRoutes);
|
destination.writeInt(mSupportedAudioRoutes);
|
||||||
destination.writeByte((byte) (mIsRttCallChanged ? 1 : 0));
|
destination.writeByte((byte) (mIsRttCallChanged ? 1 : 0));
|
||||||
destination.writeParcelable(mRttCall, 0);
|
destination.writeParcelable(mRttCall, 0);
|
||||||
|
destination.writeLong(mCreationTimeMillis);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user