Fix call duration issue for conference
When calls are merged to a conference, the connectTime of
conference gets updated with some delay, resulting in the
wrong display of the conf call duration.
Fixed by updating the conf call time only after its
connectTime is updated.
CRs-Fixed: 1024100
Change-Id: Ide003b95aa4ed1a0340c42c568c1973ed84ce9ac
diff --git a/InCallUI/src/com/android/incallui/CallCardPresenter.java b/InCallUI/src/com/android/incallui/CallCardPresenter.java
index 596d9da..63d98f4 100644
--- a/InCallUI/src/com/android/incallui/CallCardPresenter.java
+++ b/InCallUI/src/com/android/incallui/CallCardPresenter.java
@@ -566,7 +566,10 @@
ui.setPrimaryCallElapsedTime(false, 0);
mCallTimer.cancel();
} else {
- ui.setPrimaryCallElapsedTime(true, mPrimary.getCallDuration());
+ final long connectTime = mPrimary.getConnectTimeMillis();
+ if (connectTime > 0) {
+ ui.setPrimaryCallElapsedTime(true, mPrimary.getCallDuration());
+ }
}
}