summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorShriram Ganesh <sganesh@codeaurora.org>2014-01-28 13:05:26 -0800
committerShriram Ganesh <sganesh@codeaurora.org>2014-02-06 13:34:33 -0800
commit2f3c817ccc440144d4b1f8f1ed3af214194c1c66 (patch)
treee4279f45b629a7773e0a893ecd42ee94c3dcd203 /src
parent3d28ee33ba2afe50d6e0ef3b35676c77590ffc5f (diff)
downloadpackages_apps_InCallUI-2f3c817ccc440144d4b1f8f1ed3af214194c1c66.tar.gz
packages_apps_InCallUI-2f3c817ccc440144d4b1f8f1ed3af214194c1c66.tar.bz2
packages_apps_InCallUI-2f3c817ccc440144d4b1f8f1ed3af214194c1c66.zip
Fix display of duplicate calls during call hold SRVCC
1. Check for call identification with primary call for SRVCC before updating the secondary call for UI display. Change-Id: If5ea840724c2da94a39778e9db8e9e885cf18f5e CRs-Fixed: 595741
Diffstat (limited to 'src')
-rw-r--r--src/com/android/incallui/CallCardPresenter.java37
1 files changed, 35 insertions, 2 deletions
diff --git a/src/com/android/incallui/CallCardPresenter.java b/src/com/android/incallui/CallCardPresenter.java
index 1cdf4c2a..40bb269b 100644
--- a/src/com/android/incallui/CallCardPresenter.java
+++ b/src/com/android/incallui/CallCardPresenter.java
@@ -39,6 +39,7 @@ import com.android.incallui.InCallPresenter.IncomingCallListener;
import com.android.services.telephony.common.AudioMode;
import com.android.services.telephony.common.Call;
import com.android.services.telephony.common.Call.Capabilities;
+import com.android.services.telephony.common.CallDetails;
import com.android.services.telephony.common.CallIdentification;
import com.google.common.base.Preconditions;
import com.android.incallui.CallUtils;
@@ -157,8 +158,22 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
final boolean primaryChanged = !areCallsSame(mPrimary, primary);
final boolean secondaryChanged = !areCallsSame(mSecondary, secondary);
- mSecondary = secondary;
- mPrimary = primary;
+
+ if (primary != null && secondary != null &&
+ primary.getCallDetails().getCallDomain() != secondary.getCallDetails()
+ .getCallDomain() && areCallsSameOnDifferentDomains(primary, secondary)) {
+ Log.d(this, "SRVCC scenario primary and secondary are same call Primary " +
+ mPrimary + " Secondary " + mSecondary);
+ mSecondary = null;
+ if (primary.getCallDetails().getCallDomain() == CallDetails.CALL_DOMAIN_PS) {
+ mPrimary = secondary; //primary overwritten with CS
+ } else {
+ mPrimary = primary; //primary retains CS
+ }
+ } else {
+ mSecondary = secondary;
+ mPrimary = primary;
+ }
if (primaryChanged && mPrimary != null) {
// primary call has changed
@@ -249,6 +264,24 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
call1.getCallDetails().isMpty() == call2.getCallDetails().isMpty();
}
+ private boolean areCallsSameOnDifferentDomains(Call call1, Call call2) {
+ if (call1 == null || call2 == null) {
+ return false;
+ }
+ boolean callsSame = false;
+ if (call1.getCallDetails().isMpty() && call2.getCallDetails().isMpty()) { //MPTY SRVCC
+ //Currently more than one conference call each on a different domain
+ //If we hit here it means SRVCC scenario for a conference call
+ callsSame = true;
+ Log.d (this, "areCallsSameOnDifferentDomains for Mpty SRVCC call");
+ } else if (call1.getNumber() != null && call1.getNumber().equals(call2.getNumber())) {
+ //Normal SRVCC
+ callsSame = true;
+ Log.d (this, "areCallsSameOnDifferentDomains for SRVCC call");
+ }
+ return callsSame;
+ }
+
private void maybeStartSearch(Call call, boolean isPrimary) {
// no need to start search for conference calls which show generic info.
if (call != null && !call.isConferenceCall()) {