From e0ec555ed70bb58208eaa12b139d155ae0b20bdd Mon Sep 17 00:00:00 2001 From: Santos Cordon Date: Thu, 14 Aug 2014 01:53:44 -0700 Subject: Fix parentID for conference call support. Bug:16844332 Bug:16449372 Change-Id: I815df3aa8c2cf9db5dd20d670a64e3fd59493f56 --- InCallUI/src/com/android/incallui/Call.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'InCallUI') diff --git a/InCallUI/src/com/android/incallui/Call.java b/InCallUI/src/com/android/incallui/Call.java index 01f2e8b30..075ec981d 100644 --- a/InCallUI/src/com/android/incallui/Call.java +++ b/InCallUI/src/com/android/incallui/Call.java @@ -169,7 +169,6 @@ public final class Call { private final String mId; private int mState = State.INVALID; private int mDisconnectCause; - private String mParentCallId; private int mSessionModificationState; private final List mChildCallIds = new ArrayList<>(); @@ -205,11 +204,6 @@ public final class Call { setState(translateState(mTelecommCall.getState())); setDisconnectCause(mTelecommCall.getDetails().getDisconnectCauseCode()); - if (mTelecommCall.getParent() != null) { - mParentCallId = CallList.getInstance().getCallByTelecommCall( - mTelecommCall.getParent()).getId(); - } - if (mTelecommCall.getVideoCall() != null) { if (mVideoCallListener == null) { mVideoCallListener = new InCallVideoCallListener(this); @@ -264,7 +258,7 @@ public final class Call { } public int getState() { - if (mParentCallId != null) { + if (mTelecommCall.getParent() != null) { return State.CONFERENCED; } else { return mState; @@ -343,7 +337,11 @@ public final class Call { } public String getParentId() { - return mParentCallId; + android.telecomm.Call parentCall = mTelecommCall.getParent(); + if (parentCall != null) { + return CallList.getInstance().getCallByTelecommCall(parentCall).getId(); + } + return null; } public int getVideoState() { @@ -385,7 +383,7 @@ public final class Call { State.toString(mState), PhoneCapabilities.toString(mTelecommCall.getDetails().getCallCapabilities()), mChildCallIds, - mParentCallId, + getParentId(), mTelecommCall.getDetails().getVideoState()); } } -- cgit v1.2.3