Telecom: Reset the duration after the CDMA call is accepted
In android original design, the duration of CDMA MO call is started from
the dial command sent, so it is not the real duration of the active time.
In this patch, a new message is registered to listen the event of the call
accepted, and then reset the duration when the event happens.
Change-Id: Icc447012030ae243f200ec2c83b7d5210af9b31c
diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java
index 25e67c8..a570176 100644
--- a/telecomm/java/android/telecom/Connection.java
+++ b/telecomm/java/android/telecom/Connection.java
@@ -842,6 +842,7 @@
public void onRemoteRttRequest(Connection c) {}
/** @hide */
public void onPhoneAccountChanged(Connection c, PhoneAccountHandle pHandle) {}
+ public void onConnectionTimeReset(Connection c) {}
}
/**
@@ -2364,6 +2365,16 @@
}
/**
+ * @hide
+ * Resets the cdma connection time.
+ */
+ public final void resetConnectionTime() {
+ for (Listener l : mListeners) {
+ l.onConnectionTimeReset(this);
+ }
+ }
+
+ /**
* Returns the connections or conferences with which this connection can be conferenced.
*/
public final List<Conferenceable> getConferenceables() {