diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2014-02-17 08:35:49 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2014-02-17 08:35:49 -0800 |
| commit | aaf53b883eb9c8da6e84c1f196ffca69d12e5cd9 (patch) | |
| tree | d72142a62afbdd2ae6a029e071109d258d6a57b1 /src | |
| parent | 796fd8b883f350fde8171e193d7e84071cae49da (diff) | |
| parent | 2f3c817ccc440144d4b1f8f1ed3af214194c1c66 (diff) | |
| download | packages_apps_InCallUI-aaf53b883eb9c8da6e84c1f196ffca69d12e5cd9.tar.gz packages_apps_InCallUI-aaf53b883eb9c8da6e84c1f196ffca69d12e5cd9.tar.bz2 packages_apps_InCallUI-aaf53b883eb9c8da6e84c1f196ffca69d12e5cd9.zip | |
Merge "Fix display of duplicate calls during call hold SRVCC"
Diffstat (limited to 'src')
| -rw-r--r-- | src/com/android/incallui/CallCardPresenter.java | 37 |
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()) { |
