diff options
author | Ravindra <c_rthat@codeaurora.org> | 2015-12-16 15:23:20 +0530 |
---|---|---|
committer | Ethan Chen <intervigil@gmail.com> | 2016-03-07 10:40:48 -0800 |
commit | 34d0d9380d564490433df40ec4afd3ef461545c2 (patch) | |
tree | ea4f9e02cf6a309a9b4a473bbfd06e77ade563ab /src | |
parent | dc3aadd45179cfa1270e2b58fc2a7be018acc6db (diff) | |
download | packages_apps_InCallUI-34d0d9380d564490433df40ec4afd3ef461545c2.tar.gz packages_apps_InCallUI-34d0d9380d564490433df40ec4afd3ef461545c2.tar.bz2 packages_apps_InCallUI-34d0d9380d564490433df40ec4afd3ef461545c2.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/incallui/AnswerPresenter.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/incallui/AnswerPresenter.java b/src/com/android/incallui/AnswerPresenter.java index 814dcf74..b0619b18 100644 --- a/src/com/android/incallui/AnswerPresenter.java +++ b/src/com/android/incallui/AnswerPresenter.java @@ -275,7 +275,9 @@ public class AnswerPresenter extends Presenter<AnswerPresenter.AnswerUi> 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 @@ public class AnswerPresenter extends Presenter<AnswerPresenter.AnswerUi> 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); |