Loading src/java/com/android/internal/telephony/imsphone/ImsPhoneCall.java +9 −6 Original line number Diff line number Diff line Loading @@ -220,12 +220,15 @@ public class ImsPhoneCall extends Call { /* package */ void merge(ImsPhoneCall that, State state) { // This call is the conference host and the "that" call is the one being merged in. // Set the connect time to the earliest of this call and the other call. // This ensures that when an ImsConference is started, its start time will be when the first // call in the conference started. long earliestConnectTime = Math.min(getEarliestConnectTime(), that.getEarliestConnectTime()); getFirstConnection().setConnectTime(earliestConnectTime); // Set the connect time for the conference; this will have been determined when the // conference was initially created. ImsPhoneConnection imsPhoneConnection = getFirstConnection(); if (imsPhoneConnection != null) { long conferenceConnectTime = imsPhoneConnection.getConferenceConnectTime(); if (conferenceConnectTime > 0) { imsPhoneConnection.setConnectTime(conferenceConnectTime); } } ImsPhoneConnection[] cc = that.mConnections.toArray( new ImsPhoneConnection[that.mConnections.size()]); Loading src/java/com/android/internal/telephony/imsphone/ImsPhoneCallTracker.java +19 −1 Original line number Diff line number Diff line Loading @@ -527,6 +527,15 @@ public final class ImsPhoneCallTracker extends CallTracker { return; } // Keep track of the connect time of the earliest call so that it can be set on the // {@code ImsConference} when it is created. long conferenceConnectTime = Math.min(mForegroundCall.getEarliestConnectTime(), mBackgroundCall.getEarliestConnectTime()); ImsPhoneConnection foregroundConnection = mForegroundCall.getFirstConnection(); if (foregroundConnection != null) { foregroundConnection.setConferenceConnectTime(conferenceConnectTime); } try { fgImsCall.merge(bgImsCall); } catch (ImsException e) { Loading Loading @@ -1151,10 +1160,19 @@ public final class ImsPhoneCallTracker extends CallTracker { } @Override public void onCallMerged(ImsCall call) { public void onCallMerged(ImsCall call, boolean swapCalls) { if (DBG) log("onCallMerged"); mForegroundCall.merge(mBackgroundCall, mForegroundCall.getState()); if (swapCalls) { try { switchWaitingOrHoldingAndActive(); } catch (CallStateException e) { if (Phone.DEBUG_PHONE) { loge("Failed swap fg and bg calls on merge exception=" + e); } } } updatePhoneState(); mPhone.notifyPreciseCallStateChanged(); } Loading src/java/com/android/internal/telephony/imsphone/ImsPhoneConnection.java +20 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,9 @@ public class ImsPhoneConnection extends Connection { private PowerManager.WakeLock mPartialWakeLock; // The cached connect time of the connection when it turns into a conference. private long mConferenceConnectTime = 0; //***** Event Constants private static final int EVENT_DTMF_DONE = 1; private static final int EVENT_PAUSE_DONE = 2; Loading Loading @@ -598,6 +601,23 @@ public class ImsPhoneConnection extends Connection { } } /** * Sets the conference connect time. Used when an {@code ImsConference} is created to out of * this phone connection. * * @param conferenceConnectTime The conference connect time. */ public void setConferenceConnectTime(long conferenceConnectTime) { mConferenceConnectTime = conferenceConnectTime; } /** * @return The conference connect time. */ public long getConferenceConnectTime() { return mConferenceConnectTime; } /** * Check for a change in the video capabilities and audio quality for the {@link ImsCall}, and * update the {@link ImsPhoneConnection} with this information. Loading Loading
src/java/com/android/internal/telephony/imsphone/ImsPhoneCall.java +9 −6 Original line number Diff line number Diff line Loading @@ -220,12 +220,15 @@ public class ImsPhoneCall extends Call { /* package */ void merge(ImsPhoneCall that, State state) { // This call is the conference host and the "that" call is the one being merged in. // Set the connect time to the earliest of this call and the other call. // This ensures that when an ImsConference is started, its start time will be when the first // call in the conference started. long earliestConnectTime = Math.min(getEarliestConnectTime(), that.getEarliestConnectTime()); getFirstConnection().setConnectTime(earliestConnectTime); // Set the connect time for the conference; this will have been determined when the // conference was initially created. ImsPhoneConnection imsPhoneConnection = getFirstConnection(); if (imsPhoneConnection != null) { long conferenceConnectTime = imsPhoneConnection.getConferenceConnectTime(); if (conferenceConnectTime > 0) { imsPhoneConnection.setConnectTime(conferenceConnectTime); } } ImsPhoneConnection[] cc = that.mConnections.toArray( new ImsPhoneConnection[that.mConnections.size()]); Loading
src/java/com/android/internal/telephony/imsphone/ImsPhoneCallTracker.java +19 −1 Original line number Diff line number Diff line Loading @@ -527,6 +527,15 @@ public final class ImsPhoneCallTracker extends CallTracker { return; } // Keep track of the connect time of the earliest call so that it can be set on the // {@code ImsConference} when it is created. long conferenceConnectTime = Math.min(mForegroundCall.getEarliestConnectTime(), mBackgroundCall.getEarliestConnectTime()); ImsPhoneConnection foregroundConnection = mForegroundCall.getFirstConnection(); if (foregroundConnection != null) { foregroundConnection.setConferenceConnectTime(conferenceConnectTime); } try { fgImsCall.merge(bgImsCall); } catch (ImsException e) { Loading Loading @@ -1151,10 +1160,19 @@ public final class ImsPhoneCallTracker extends CallTracker { } @Override public void onCallMerged(ImsCall call) { public void onCallMerged(ImsCall call, boolean swapCalls) { if (DBG) log("onCallMerged"); mForegroundCall.merge(mBackgroundCall, mForegroundCall.getState()); if (swapCalls) { try { switchWaitingOrHoldingAndActive(); } catch (CallStateException e) { if (Phone.DEBUG_PHONE) { loge("Failed swap fg and bg calls on merge exception=" + e); } } } updatePhoneState(); mPhone.notifyPreciseCallStateChanged(); } Loading
src/java/com/android/internal/telephony/imsphone/ImsPhoneConnection.java +20 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,9 @@ public class ImsPhoneConnection extends Connection { private PowerManager.WakeLock mPartialWakeLock; // The cached connect time of the connection when it turns into a conference. private long mConferenceConnectTime = 0; //***** Event Constants private static final int EVENT_DTMF_DONE = 1; private static final int EVENT_PAUSE_DONE = 2; Loading Loading @@ -598,6 +601,23 @@ public class ImsPhoneConnection extends Connection { } } /** * Sets the conference connect time. Used when an {@code ImsConference} is created to out of * this phone connection. * * @param conferenceConnectTime The conference connect time. */ public void setConferenceConnectTime(long conferenceConnectTime) { mConferenceConnectTime = conferenceConnectTime; } /** * @return The conference connect time. */ public long getConferenceConnectTime() { return mConferenceConnectTime; } /** * Check for a change in the video capabilities and audio quality for the {@link ImsCall}, and * update the {@link ImsPhoneConnection} with this information. Loading