diff options
author | emancebo <emancebo@cyngn.com> | 2015-02-10 15:17:18 -0800 |
---|---|---|
committer | Rohit Yengisetty <rohit@cyngn.com> | 2015-11-09 16:43:44 -0800 |
commit | 3ae55e3d6d4cb8beec01a64cdd15e17bb441491c (patch) | |
tree | c4f365405f3d9f878aff53f24e3957db02ebbf1d /telecomm | |
parent | 0c2330640d138ed5be08c109d225a543ad10ec55 (diff) | |
download | frameworks_base-3ae55e3d6d4cb8beec01a64cdd15e17bb441491c.zip frameworks_base-3ae55e3d6d4cb8beec01a64cdd15e17bb441491c.tar.gz frameworks_base-3ae55e3d6d4cb8beec01a64cdd15e17bb441491c.tar.bz2 |
Expose call creation time to link call recordings with recent call log (1/2)
Change-Id: I9743abbf23b767cf5cf1f27fffccb0f76618e5b1
Diffstat (limited to 'telecomm')
-rw-r--r-- | telecomm/java/android/telecom/Call.java | 13 | ||||
-rw-r--r-- | telecomm/java/android/telecom/ParcelableCall.java | 11 |
2 files changed, 24 insertions, 0 deletions
diff --git a/telecomm/java/android/telecom/Call.java b/telecomm/java/android/telecom/Call.java index 721e4726..3ef4af7 100644 --- a/telecomm/java/android/telecom/Call.java +++ b/telecomm/java/android/telecom/Call.java @@ -272,6 +272,7 @@ public final class Call { private final int mCallCapabilities; private final int mCallProperties; private final DisconnectCause mDisconnectCause; + private final long mCreateTimeMillis; private final long mConnectTimeMillis; private final GatewayInfo mGatewayInfo; private final int mVideoState; @@ -495,6 +496,13 @@ public final class Call { } /** + * @return the time the Call object was created + */ + public long getCreateTimeMillis() { + return mCreateTimeMillis; + } + + /** * @return Information about any calling gateway the {@code Call} may be using. */ public GatewayInfo getGatewayInfo() { @@ -544,6 +552,7 @@ public final class Call { Objects.equals(mCallCapabilities, d.mCallCapabilities) && Objects.equals(mCallProperties, d.mCallProperties) && Objects.equals(mDisconnectCause, d.mDisconnectCause) && + Objects.equals(mCreateTimeMillis, d.mCreateTimeMillis) && Objects.equals(mConnectTimeMillis, d.mConnectTimeMillis) && Objects.equals(mGatewayInfo, d.mGatewayInfo) && Objects.equals(mVideoState, d.mVideoState) && @@ -565,6 +574,7 @@ public final class Call { Objects.hashCode(mCallCapabilities) + Objects.hashCode(mCallProperties) + Objects.hashCode(mDisconnectCause) + + Objects.hashCode(mCreateTimeMillis) + Objects.hashCode(mConnectTimeMillis) + Objects.hashCode(mGatewayInfo) + Objects.hashCode(mVideoState) + @@ -583,6 +593,7 @@ public final class Call { int capabilities, int properties, DisconnectCause disconnectCause, + long createTimeMillis, long connectTimeMillis, GatewayInfo gatewayInfo, int videoState, @@ -597,6 +608,7 @@ public final class Call { mCallCapabilities = capabilities; mCallProperties = properties; mDisconnectCause = disconnectCause; + mCreateTimeMillis = createTimeMillis; mConnectTimeMillis = connectTimeMillis; mGatewayInfo = gatewayInfo; mVideoState = videoState; @@ -1072,6 +1084,7 @@ public final class Call { parcelableCall.getCapabilities(), parcelableCall.getProperties(), parcelableCall.getDisconnectCause(), + parcelableCall.getCreateTimeMillis(), parcelableCall.getConnectTimeMillis(), parcelableCall.getGatewayInfo(), parcelableCall.getVideoState(), diff --git a/telecomm/java/android/telecom/ParcelableCall.java b/telecomm/java/android/telecom/ParcelableCall.java index 20a4455..5b343e6 100644 --- a/telecomm/java/android/telecom/ParcelableCall.java +++ b/telecomm/java/android/telecom/ParcelableCall.java @@ -39,6 +39,7 @@ public final class ParcelableCall implements Parcelable { private final List<String> mCannedSmsResponses; private final int mCapabilities; private final int mProperties; + private final long mCreateTimeMillis; private final long mConnectTimeMillis; private final Uri mHandle; private final int mHandlePresentation; @@ -65,6 +66,7 @@ public final class ParcelableCall implements Parcelable { List<String> cannedSmsResponses, int capabilities, int properties, + long createTimeMillis, long connectTimeMillis, Uri handle, int handlePresentation, @@ -88,6 +90,7 @@ public final class ParcelableCall implements Parcelable { mCannedSmsResponses = cannedSmsResponses; mCapabilities = capabilities; mProperties = properties; + mCreateTimeMillis = createTimeMillis; mConnectTimeMillis = connectTimeMillis; mHandle = handle; mHandlePresentation = handlePresentation; @@ -140,6 +143,11 @@ public final class ParcelableCall implements Parcelable { /** Bitmask of properties of the call. */ public int getProperties() { return mProperties; } + /** The time that the call object was created */ + public long getCreateTimeMillis() { + return mCreateTimeMillis; + } + /** The time that the call switched to the active state. */ public long getConnectTimeMillis() { return mConnectTimeMillis; @@ -282,6 +290,7 @@ public final class ParcelableCall implements Parcelable { source.readList(cannedSmsResponses, classLoader); int capabilities = source.readInt(); int properties = source.readInt(); + long createTimeMillis = source.readLong(); long connectTimeMillis = source.readLong(); Uri handle = source.readParcelable(classLoader); int handlePresentation = source.readInt(); @@ -309,6 +318,7 @@ public final class ParcelableCall implements Parcelable { cannedSmsResponses, capabilities, properties, + createTimeMillis, connectTimeMillis, handle, handlePresentation, @@ -349,6 +359,7 @@ public final class ParcelableCall implements Parcelable { destination.writeList(mCannedSmsResponses); destination.writeInt(mCapabilities); destination.writeInt(mProperties); + destination.writeLong(mCreateTimeMillis); destination.writeLong(mConnectTimeMillis); destination.writeParcelable(mHandle, 0); destination.writeInt(mHandlePresentation); |