Fix to answer call in DSDS mode.
Reset the mCall reference to null when a call is disconnected
only if the disconnected call matches the call present in mcall.
Change-Id: I89dbcfcde1ed313ab7ba859b30bf55aec7555e96
CRs-Fixed: 945977
diff --git a/src/com/android/incallui/AnswerPresenter.java b/src/com/android/incallui/AnswerPresenter.java
index 814dcf7..b0619b1 100644
--- a/src/com/android/incallui/AnswerPresenter.java
+++ b/src/com/android/incallui/AnswerPresenter.java
@@ -275,7 +275,9 @@
public void onDisconnect(Call call) {
int subId = call.getSubId();
int phoneId = mCalls.getPhoneId(subId);
- mCall[phoneId] = null;
+ if (call.equals(mCall[phoneId])) {
+ mCall[phoneId] = null;
+ }
}
public void onSessionModificationStateChange(int sessionModificationState) {
@@ -330,7 +332,7 @@
int phoneId = mCalls.getPhoneId(subId);
mCallId[phoneId] = call.getId();
mCall[phoneId] = call;
-
+ mCalls.addListener(this);
// Listen for call updates for the current call.
mCalls.addCallUpdateListener(mCallId[phoneId], this);