Loading src/com/android/server/telecom/Call.java +31 −7 Original line number Diff line number Diff line Loading @@ -334,13 +334,6 @@ final class Call implements CreateConnectionResponse { boolean isIncoming, boolean isConference) { mState = isConference ? CallState.ACTIVE : CallState.NEW; // Conference calls are considered connected upon adding to Telecom, so set the connect // time now. if (isConference) { mConnectTimeMillis = System.currentTimeMillis(); } mContext = context; mRepository = repository; setHandle(handle); Loading @@ -353,6 +346,37 @@ final class Call implements CreateConnectionResponse { maybeLoadCannedSmsResponses(); } /** * Persists the specified parameters and initializes the new instance. * * @param context The context. * @param repository The connection service repository. * @param handle The handle to dial. * @param gatewayInfo Gateway information to use for the call. * @param connectionManagerPhoneAccountHandle Account to use for the service managing the call. * This account must be one that was registered with the * {@link PhoneAccount#CAPABILITY_CONNECTION_MANAGER} flag. * @param targetPhoneAccountHandle Account information to use for the call. This account must be * one that was registered with the {@link PhoneAccount#CAPABILITY_CALL_PROVIDER} flag. * @param isIncoming True if this is an incoming call. * @param connectTimeMillis The connection time of the call. */ Call( Context context, ConnectionServiceRepository repository, Uri handle, GatewayInfo gatewayInfo, PhoneAccountHandle connectionManagerPhoneAccountHandle, PhoneAccountHandle targetPhoneAccountHandle, boolean isIncoming, boolean isConference, long connectTimeMillis) { this(context, repository, handle, gatewayInfo, connectionManagerPhoneAccountHandle, targetPhoneAccountHandle, isIncoming, isConference); mConnectTimeMillis = connectTimeMillis; } void addListener(Listener listener) { mListeners.add(listener); } Loading src/com/android/server/telecom/CallsManager.java +11 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.os.Trace; import android.provider.CallLog.Calls; import android.telecom.AudioState; import android.telecom.CallState; import android.telecom.Conference; import android.telecom.Connection; import android.telecom.DisconnectCause; import android.telecom.GatewayInfo; Loading Loading @@ -1039,6 +1040,14 @@ public final class CallsManager extends Call.ListenerBase { Call createConferenceCall( PhoneAccountHandle phoneAccount, ParcelableConference parcelableConference) { // If the parceled conference specifies a connect time, use it; otherwise default to 0, // which is the default value for new Calls. long connectTime = parcelableConference.getConnectTimeMillis() == Conference.CONNECT_TIME_NOT_SPECIFIED ? 0 : parcelableConference.getConnectTimeMillis(); Call call = new Call( mContext, mConnectionServiceRepository, Loading @@ -1047,7 +1056,8 @@ public final class CallsManager extends Call.ListenerBase { null /* connectionManagerPhoneAccount */, phoneAccount, false /* isIncoming */, true /* isConference */); true /* isConference */, connectTime); setCallState(call, Call.getStateFromConnectionState(parcelableConference.getState())); call.setConnectionCapabilities(parcelableConference.getConnectionCapabilities()); Loading Loading
src/com/android/server/telecom/Call.java +31 −7 Original line number Diff line number Diff line Loading @@ -334,13 +334,6 @@ final class Call implements CreateConnectionResponse { boolean isIncoming, boolean isConference) { mState = isConference ? CallState.ACTIVE : CallState.NEW; // Conference calls are considered connected upon adding to Telecom, so set the connect // time now. if (isConference) { mConnectTimeMillis = System.currentTimeMillis(); } mContext = context; mRepository = repository; setHandle(handle); Loading @@ -353,6 +346,37 @@ final class Call implements CreateConnectionResponse { maybeLoadCannedSmsResponses(); } /** * Persists the specified parameters and initializes the new instance. * * @param context The context. * @param repository The connection service repository. * @param handle The handle to dial. * @param gatewayInfo Gateway information to use for the call. * @param connectionManagerPhoneAccountHandle Account to use for the service managing the call. * This account must be one that was registered with the * {@link PhoneAccount#CAPABILITY_CONNECTION_MANAGER} flag. * @param targetPhoneAccountHandle Account information to use for the call. This account must be * one that was registered with the {@link PhoneAccount#CAPABILITY_CALL_PROVIDER} flag. * @param isIncoming True if this is an incoming call. * @param connectTimeMillis The connection time of the call. */ Call( Context context, ConnectionServiceRepository repository, Uri handle, GatewayInfo gatewayInfo, PhoneAccountHandle connectionManagerPhoneAccountHandle, PhoneAccountHandle targetPhoneAccountHandle, boolean isIncoming, boolean isConference, long connectTimeMillis) { this(context, repository, handle, gatewayInfo, connectionManagerPhoneAccountHandle, targetPhoneAccountHandle, isIncoming, isConference); mConnectTimeMillis = connectTimeMillis; } void addListener(Listener listener) { mListeners.add(listener); } Loading
src/com/android/server/telecom/CallsManager.java +11 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.os.Trace; import android.provider.CallLog.Calls; import android.telecom.AudioState; import android.telecom.CallState; import android.telecom.Conference; import android.telecom.Connection; import android.telecom.DisconnectCause; import android.telecom.GatewayInfo; Loading Loading @@ -1039,6 +1040,14 @@ public final class CallsManager extends Call.ListenerBase { Call createConferenceCall( PhoneAccountHandle phoneAccount, ParcelableConference parcelableConference) { // If the parceled conference specifies a connect time, use it; otherwise default to 0, // which is the default value for new Calls. long connectTime = parcelableConference.getConnectTimeMillis() == Conference.CONNECT_TIME_NOT_SPECIFIED ? 0 : parcelableConference.getConnectTimeMillis(); Call call = new Call( mContext, mConnectionServiceRepository, Loading @@ -1047,7 +1056,8 @@ public final class CallsManager extends Call.ListenerBase { null /* connectionManagerPhoneAccount */, phoneAccount, false /* isIncoming */, true /* isConference */); true /* isConference */, connectTime); setCallState(call, Call.getStateFromConnectionState(parcelableConference.getState())); call.setConnectionCapabilities(parcelableConference.getConnectionCapabilities()); Loading