blob: 3ad0f0cc56fe08945fc1016a69e87ce350635c43 [file] [log] [blame]
Sailesh Nepal60437932014-04-05 16:44:55 -07001/*
2 * Copyright 2014, The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Tyler Gunnef9f6f92014-09-12 22:16:17 -070017package android.telecom;
Sailesh Nepal60437932014-04-05 16:44:55 -070018
Mathew Inwoode5bfa3e2018-08-01 11:26:20 +010019import android.annotation.UnsupportedAppUsage;
Sailesh Nepal60437932014-04-05 16:44:55 -070020import android.net.Uri;
Mathew Inwood8c854f82018-09-14 12:35:36 +010021import android.os.Build;
Nancy Chen10798dc2014-08-08 14:00:25 -070022import android.os.Bundle;
Sailesh Nepal60437932014-04-05 16:44:55 -070023import android.os.Parcel;
24import android.os.Parcelable;
Andrew Lee5dc30752014-06-27 17:02:19 -070025import android.os.RemoteException;
Sailesh Nepal60437932014-04-05 16:44:55 -070026
Santos Cordon980acb92014-05-31 10:31:19 -070027import java.util.ArrayList;
Santos Cordon7c7bc7f2014-07-28 18:15:48 -070028import java.util.Collections;
Santos Cordon980acb92014-05-31 10:31:19 -070029import java.util.List;
Sailesh Nepal60437932014-04-05 16:44:55 -070030
Tyler Gunnef9f6f92014-09-12 22:16:17 -070031import com.android.internal.telecom.IVideoProvider;
Ihab Awadb19a0bc2014-08-07 19:46:01 -070032
Sailesh Nepal60437932014-04-05 16:44:55 -070033/**
Tyler Gunnef9f6f92014-09-12 22:16:17 -070034 * Information about a call that is used between InCallService and Telecom.
Santos Cordon88b771d2014-07-19 13:10:40 -070035 * @hide
Sailesh Nepal60437932014-04-05 16:44:55 -070036 */
Santos Cordon88b771d2014-07-19 13:10:40 -070037public final class ParcelableCall implements Parcelable {
Sailesh Nepal60437932014-04-05 16:44:55 -070038 private final String mId;
Ihab Awadb19a0bc2014-08-07 19:46:01 -070039 private final int mState;
Andrew Lee7f3d41f2014-09-11 17:33:16 -070040 private final DisconnectCause mDisconnectCause;
Ihab Awadc0677542014-06-10 13:29:47 -070041 private final List<String> mCannedSmsResponses;
Sailesh Nepal60437932014-04-05 16:44:55 -070042 private final int mCapabilities;
Andrew Lee223ad142014-08-27 16:33:08 -070043 private final int mProperties;
Christine Hallstrom2830ce92016-11-30 16:06:42 -080044 private final int mSupportedAudioRoutes;
Sailesh Nepal60437932014-04-05 16:44:55 -070045 private final long mConnectTimeMillis;
46 private final Uri mHandle;
Sailesh Nepal61203862014-07-11 14:50:13 -070047 private final int mHandlePresentation;
48 private final String mCallerDisplayName;
49 private final int mCallerDisplayNamePresentation;
Sailesh Nepal60437932014-04-05 16:44:55 -070050 private final GatewayInfo mGatewayInfo;
Evan Charlton8c8a0622014-07-20 12:31:00 -070051 private final PhoneAccountHandle mAccountHandle;
Tyler Gunn75958422015-04-15 14:23:42 -070052 private final boolean mIsVideoCallProviderChanged;
Ihab Awadb19a0bc2014-08-07 19:46:01 -070053 private final IVideoProvider mVideoCallProvider;
Tyler Gunn584ba6c2015-12-08 10:53:41 -080054 private VideoCallImpl mVideoCall;
Hall Liu95d55872017-01-25 17:12:49 -080055 private final boolean mIsRttCallChanged;
56 private final ParcelableRttCall mRttCall;
Santos Cordon980acb92014-05-31 10:31:19 -070057 private final String mParentCallId;
58 private final List<String> mChildCallIds;
Sailesh Nepale7ef59a2014-07-08 21:48:22 -070059 private final StatusHints mStatusHints;
Andrew Lee85f5d422014-07-11 17:22:03 -070060 private final int mVideoState;
Santos Cordon7c7bc7f2014-07-28 18:15:48 -070061 private final List<String> mConferenceableCallIds;
Santos Cordon6b7f9552015-05-27 17:21:45 -070062 private final Bundle mIntentExtras;
Nancy Chen10798dc2014-08-08 14:00:25 -070063 private final Bundle mExtras;
Tyler Gunnc0bf6de2017-03-17 11:27:09 -070064 private final long mCreationTimeMillis;
Santos Cordon980acb92014-05-31 10:31:19 -070065
Santos Cordon88b771d2014-07-19 13:10:40 -070066 public ParcelableCall(
Sailesh Nepal60437932014-04-05 16:44:55 -070067 String id,
Ihab Awadb19a0bc2014-08-07 19:46:01 -070068 int state,
Andrew Lee7f3d41f2014-09-11 17:33:16 -070069 DisconnectCause disconnectCause,
Ihab Awadc0677542014-06-10 13:29:47 -070070 List<String> cannedSmsResponses,
Sailesh Nepal60437932014-04-05 16:44:55 -070071 int capabilities,
Andrew Lee223ad142014-08-27 16:33:08 -070072 int properties,
Christine Hallstrom2830ce92016-11-30 16:06:42 -080073 int supportedAudioRoutes,
Sailesh Nepal60437932014-04-05 16:44:55 -070074 long connectTimeMillis,
75 Uri handle,
Sailesh Nepal61203862014-07-11 14:50:13 -070076 int handlePresentation,
77 String callerDisplayName,
78 int callerDisplayNamePresentation,
Sailesh Nepal60437932014-04-05 16:44:55 -070079 GatewayInfo gatewayInfo,
Evan Charlton8c8a0622014-07-20 12:31:00 -070080 PhoneAccountHandle accountHandle,
Tyler Gunn75958422015-04-15 14:23:42 -070081 boolean isVideoCallProviderChanged,
Ihab Awadb19a0bc2014-08-07 19:46:01 -070082 IVideoProvider videoCallProvider,
Hall Liu95d55872017-01-25 17:12:49 -080083 boolean isRttCallChanged,
84 ParcelableRttCall rttCall,
Santos Cordon980acb92014-05-31 10:31:19 -070085 String parentCallId,
Tyler Gunn8d83fa92014-07-01 11:31:21 -070086 List<String> childCallIds,
Andrew Lee85f5d422014-07-11 17:22:03 -070087 StatusHints statusHints,
Santos Cordon7c7bc7f2014-07-28 18:15:48 -070088 int videoState,
Nancy Chen10798dc2014-08-08 14:00:25 -070089 List<String> conferenceableCallIds,
Santos Cordon6b7f9552015-05-27 17:21:45 -070090 Bundle intentExtras,
Tyler Gunnc0bf6de2017-03-17 11:27:09 -070091 Bundle extras,
92 long creationTimeMillis) {
Sailesh Nepal60437932014-04-05 16:44:55 -070093 mId = id;
94 mState = state;
Andrew Lee7f3d41f2014-09-11 17:33:16 -070095 mDisconnectCause = disconnectCause;
Ihab Awadc0677542014-06-10 13:29:47 -070096 mCannedSmsResponses = cannedSmsResponses;
Sailesh Nepal60437932014-04-05 16:44:55 -070097 mCapabilities = capabilities;
Andrew Lee223ad142014-08-27 16:33:08 -070098 mProperties = properties;
Christine Hallstrom2830ce92016-11-30 16:06:42 -080099 mSupportedAudioRoutes = supportedAudioRoutes;
Sailesh Nepal60437932014-04-05 16:44:55 -0700100 mConnectTimeMillis = connectTimeMillis;
101 mHandle = handle;
Sailesh Nepal61203862014-07-11 14:50:13 -0700102 mHandlePresentation = handlePresentation;
103 mCallerDisplayName = callerDisplayName;
104 mCallerDisplayNamePresentation = callerDisplayNamePresentation;
Sailesh Nepal60437932014-04-05 16:44:55 -0700105 mGatewayInfo = gatewayInfo;
Evan Charlton8c8a0622014-07-20 12:31:00 -0700106 mAccountHandle = accountHandle;
Tyler Gunn75958422015-04-15 14:23:42 -0700107 mIsVideoCallProviderChanged = isVideoCallProviderChanged;
Andrew Lee50aca232014-07-22 16:41:54 -0700108 mVideoCallProvider = videoCallProvider;
Hall Liu95d55872017-01-25 17:12:49 -0800109 mIsRttCallChanged = isRttCallChanged;
110 mRttCall = rttCall;
Santos Cordon980acb92014-05-31 10:31:19 -0700111 mParentCallId = parentCallId;
112 mChildCallIds = childCallIds;
Sailesh Nepale7ef59a2014-07-08 21:48:22 -0700113 mStatusHints = statusHints;
Andrew Lee85f5d422014-07-11 17:22:03 -0700114 mVideoState = videoState;
Santos Cordon7c7bc7f2014-07-28 18:15:48 -0700115 mConferenceableCallIds = Collections.unmodifiableList(conferenceableCallIds);
Santos Cordon6b7f9552015-05-27 17:21:45 -0700116 mIntentExtras = intentExtras;
Nancy Chen10798dc2014-08-08 14:00:25 -0700117 mExtras = extras;
Tyler Gunnc0bf6de2017-03-17 11:27:09 -0700118 mCreationTimeMillis = creationTimeMillis;
Sailesh Nepal60437932014-04-05 16:44:55 -0700119 }
120
121 /** The unique ID of the call. */
Mathew Inwood8c854f82018-09-14 12:35:36 +0100122 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
Sailesh Nepal60437932014-04-05 16:44:55 -0700123 public String getId() {
124 return mId;
125 }
126
127 /** The current state of the call. */
Ihab Awadb19a0bc2014-08-07 19:46:01 -0700128 public int getState() {
Sailesh Nepal60437932014-04-05 16:44:55 -0700129 return mState;
130 }
131
132 /**
Andrew Lee7f3d41f2014-09-11 17:33:16 -0700133 * Reason for disconnection, as described by {@link android.telecomm.DisconnectCause}. Valid
134 * when call state is {@link CallState#DISCONNECTED}.
Sailesh Nepal60437932014-04-05 16:44:55 -0700135 */
Mathew Inwoode5bfa3e2018-08-01 11:26:20 +0100136 @UnsupportedAppUsage
Andrew Lee7f3d41f2014-09-11 17:33:16 -0700137 public DisconnectCause getDisconnectCause() {
138 return mDisconnectCause;
Sailesh Nepal60437932014-04-05 16:44:55 -0700139 }
140
Ihab Awadc0677542014-06-10 13:29:47 -0700141 /**
142 * The set of possible text message responses when this call is incoming.
143 */
144 public List<String> getCannedSmsResponses() {
145 return mCannedSmsResponses;
146 }
147
Sailesh Nepal60437932014-04-05 16:44:55 -0700148 // Bit mask of actions a call supports, values are defined in {@link CallCapabilities}.
149 public int getCapabilities() {
150 return mCapabilities;
151 }
152
Andrew Lee223ad142014-08-27 16:33:08 -0700153 /** Bitmask of properties of the call. */
154 public int getProperties() { return mProperties; }
155
Christine Hallstrom2830ce92016-11-30 16:06:42 -0800156 /** Bitmask of supported routes of the call */
157 public int getSupportedAudioRoutes() {
158 return mSupportedAudioRoutes;
159 }
160
Sailesh Nepal60437932014-04-05 16:44:55 -0700161 /** The time that the call switched to the active state. */
Mathew Inwoode5bfa3e2018-08-01 11:26:20 +0100162 @UnsupportedAppUsage
Sailesh Nepal60437932014-04-05 16:44:55 -0700163 public long getConnectTimeMillis() {
164 return mConnectTimeMillis;
165 }
166
167 /** The endpoint to which the call is connected. */
Mathew Inwoode5bfa3e2018-08-01 11:26:20 +0100168 @UnsupportedAppUsage
Sailesh Nepal60437932014-04-05 16:44:55 -0700169 public Uri getHandle() {
170 return mHandle;
171 }
172
Nancy Chen9d568c02014-09-08 14:17:59 -0700173 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700174 * The presentation requirements for the handle. See {@link TelecomManager} for valid values.
Nancy Chen9d568c02014-09-08 14:17:59 -0700175 */
Sailesh Nepal61203862014-07-11 14:50:13 -0700176 public int getHandlePresentation() {
177 return mHandlePresentation;
178 }
179
180 /** The endpoint to which the call is connected. */
181 public String getCallerDisplayName() {
182 return mCallerDisplayName;
183 }
184
Nancy Chen9d568c02014-09-08 14:17:59 -0700185 /**
186 * The presentation requirements for the caller display name.
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700187 * See {@link TelecomManager} for valid values.
Nancy Chen9d568c02014-09-08 14:17:59 -0700188 */
Sailesh Nepal61203862014-07-11 14:50:13 -0700189 public int getCallerDisplayNamePresentation() {
190 return mCallerDisplayNamePresentation;
191 }
192
Sailesh Nepal60437932014-04-05 16:44:55 -0700193 /** Gateway information for the call. */
194 public GatewayInfo getGatewayInfo() {
195 return mGatewayInfo;
196 }
197
Evan Charlton6eb262c2014-07-19 18:18:19 -0700198 /** PhoneAccountHandle information for the call. */
Evan Charlton8c8a0622014-07-20 12:31:00 -0700199 public PhoneAccountHandle getAccountHandle() {
200 return mAccountHandle;
Nancy Chen5ffbfcc2014-06-25 14:22:55 -0700201 }
202
Sailesh Nepal60437932014-04-05 16:44:55 -0700203 /**
Andrew Lee50aca232014-07-22 16:41:54 -0700204 * Returns an object for remotely communicating through the video call provider's binder.
Tyler Gunn159f35c2017-03-02 09:28:37 -0800205 *
206 * @param callingPackageName the package name of the calling InCallService.
207 * @param targetSdkVersion the target SDK version of the calling InCallService.
Andrew Lee50aca232014-07-22 16:41:54 -0700208 * @return The video call.
Andrew Lee5dc30752014-06-27 17:02:19 -0700209 */
Tyler Gunn159f35c2017-03-02 09:28:37 -0800210 public VideoCallImpl getVideoCallImpl(String callingPackageName, int targetSdkVersion) {
Andrew Lee50aca232014-07-22 16:41:54 -0700211 if (mVideoCall == null && mVideoCallProvider != null) {
Andrew Lee5dc30752014-06-27 17:02:19 -0700212 try {
Tyler Gunn159f35c2017-03-02 09:28:37 -0800213 mVideoCall = new VideoCallImpl(mVideoCallProvider, callingPackageName,
214 targetSdkVersion);
Andrew Lee5dc30752014-06-27 17:02:19 -0700215 } catch (RemoteException ignored) {
216 // Ignore RemoteException.
217 }
218 }
219
Andrew Lee50aca232014-07-22 16:41:54 -0700220 return mVideoCall;
Andrew Lee5dc30752014-06-27 17:02:19 -0700221 }
222
Hall Liu95d55872017-01-25 17:12:49 -0800223 public boolean getIsRttCallChanged() {
224 return mIsRttCallChanged;
225 }
226
227 /**
228 * RTT communication channel information
229 * @return The ParcelableRttCall
230 */
231 public ParcelableRttCall getParcelableRttCall() {
232 return mRttCall;
233 }
234
Andrew Lee5dc30752014-06-27 17:02:19 -0700235 /**
Santos Cordon980acb92014-05-31 10:31:19 -0700236 * The conference call to which this call is conferenced. Null if not conferenced.
Santos Cordon980acb92014-05-31 10:31:19 -0700237 */
238 public String getParentCallId() {
239 return mParentCallId;
240 }
241
242 /**
243 * The child call-IDs if this call is a conference call. Returns an empty list if this is not
244 * a conference call or if the conference call contains no children.
Santos Cordon980acb92014-05-31 10:31:19 -0700245 */
246 public List<String> getChildCallIds() {
247 return mChildCallIds;
248 }
249
Santos Cordon7c7bc7f2014-07-28 18:15:48 -0700250 public List<String> getConferenceableCallIds() {
251 return mConferenceableCallIds;
252 }
253
Tyler Gunn8d83fa92014-07-01 11:31:21 -0700254 /**
Sailesh Nepale7ef59a2014-07-08 21:48:22 -0700255 * The status label and icon.
256 *
257 * @return Status hints.
258 */
259 public StatusHints getStatusHints() {
260 return mStatusHints;
261 }
262
Andrew Lee85f5d422014-07-11 17:22:03 -0700263 /**
264 * The video state.
265 * @return The video state of the call.
266 */
267 public int getVideoState() {
268 return mVideoState;
269 }
270
Nancy Chen10798dc2014-08-08 14:00:25 -0700271 /**
Santos Cordon6b7f9552015-05-27 17:21:45 -0700272 * Any extras associated with this call.
Nancy Chen10798dc2014-08-08 14:00:25 -0700273 *
274 * @return a bundle of extras
275 */
276 public Bundle getExtras() {
277 return mExtras;
278 }
279
Rekha Kumar07366812015-03-24 16:42:31 -0700280 /**
Santos Cordon6b7f9552015-05-27 17:21:45 -0700281 * Extras passed in as part of the original call intent.
282 *
283 * @return The intent extras.
284 */
285 public Bundle getIntentExtras() {
286 return mIntentExtras;
287 }
288
289 /**
Tyler Gunn75958422015-04-15 14:23:42 -0700290 * Indicates to the receiver of the {@link ParcelableCall} whether a change has occurred in the
291 * {@link android.telecom.InCallService.VideoCall} associated with this call. Since
292 * {@link #getVideoCall()} creates a new {@link VideoCallImpl}, it is useful to know whether
293 * the provider has changed (which can influence whether it is accessed).
294 *
295 * @return {@code true} if the video call changed, {@code false} otherwise.
296 */
297 public boolean isVideoCallProviderChanged() {
298 return mIsVideoCallProviderChanged;
299 }
300
Tyler Gunnc0bf6de2017-03-17 11:27:09 -0700301 /**
302 * @return The time the call was created, in milliseconds since the epoch.
303 */
304 public long getCreationTimeMillis() {
305 return mCreationTimeMillis;
306 }
307
Santos Cordon88b771d2014-07-19 13:10:40 -0700308 /** Responsible for creating ParcelableCall objects for deserialized Parcels. */
Mathew Inwoode5bfa3e2018-08-01 11:26:20 +0100309 @UnsupportedAppUsage
Santos Cordon88b771d2014-07-19 13:10:40 -0700310 public static final Parcelable.Creator<ParcelableCall> CREATOR =
311 new Parcelable.Creator<ParcelableCall> () {
Sailesh Nepal60437932014-04-05 16:44:55 -0700312 @Override
Santos Cordon88b771d2014-07-19 13:10:40 -0700313 public ParcelableCall createFromParcel(Parcel source) {
314 ClassLoader classLoader = ParcelableCall.class.getClassLoader();
Sailesh Nepal60437932014-04-05 16:44:55 -0700315 String id = source.readString();
Ihab Awadb19a0bc2014-08-07 19:46:01 -0700316 int state = source.readInt();
Andrew Lee7f3d41f2014-09-11 17:33:16 -0700317 DisconnectCause disconnectCause = source.readParcelable(classLoader);
Ihab Awadc0677542014-06-10 13:29:47 -0700318 List<String> cannedSmsResponses = new ArrayList<>();
319 source.readList(cannedSmsResponses, classLoader);
Sailesh Nepal60437932014-04-05 16:44:55 -0700320 int capabilities = source.readInt();
Andrew Lee223ad142014-08-27 16:33:08 -0700321 int properties = source.readInt();
Sailesh Nepal60437932014-04-05 16:44:55 -0700322 long connectTimeMillis = source.readLong();
Sailesh Nepal60437932014-04-05 16:44:55 -0700323 Uri handle = source.readParcelable(classLoader);
Sailesh Nepal61203862014-07-11 14:50:13 -0700324 int handlePresentation = source.readInt();
325 String callerDisplayName = source.readString();
326 int callerDisplayNamePresentation = source.readInt();
Sailesh Nepal60437932014-04-05 16:44:55 -0700327 GatewayInfo gatewayInfo = source.readParcelable(classLoader);
Evan Charlton8c8a0622014-07-20 12:31:00 -0700328 PhoneAccountHandle accountHandle = source.readParcelable(classLoader);
Tyler Gunn75958422015-04-15 14:23:42 -0700329 boolean isVideoCallProviderChanged = source.readByte() == 1;
Ihab Awadb19a0bc2014-08-07 19:46:01 -0700330 IVideoProvider videoCallProvider =
331 IVideoProvider.Stub.asInterface(source.readStrongBinder());
Santos Cordon980acb92014-05-31 10:31:19 -0700332 String parentCallId = source.readString();
333 List<String> childCallIds = new ArrayList<>();
334 source.readList(childCallIds, classLoader);
Sailesh Nepale7ef59a2014-07-08 21:48:22 -0700335 StatusHints statusHints = source.readParcelable(classLoader);
Andrew Lee85f5d422014-07-11 17:22:03 -0700336 int videoState = source.readInt();
Santos Cordon7c7bc7f2014-07-28 18:15:48 -0700337 List<String> conferenceableCallIds = new ArrayList<>();
338 source.readList(conferenceableCallIds, classLoader);
Santos Cordon6b7f9552015-05-27 17:21:45 -0700339 Bundle intentExtras = source.readBundle(classLoader);
340 Bundle extras = source.readBundle(classLoader);
Christine Hallstrom2830ce92016-11-30 16:06:42 -0800341 int supportedAudioRoutes = source.readInt();
Hall Liu95d55872017-01-25 17:12:49 -0800342 boolean isRttCallChanged = source.readByte() == 1;
343 ParcelableRttCall rttCall = source.readParcelable(classLoader);
Tyler Gunnc0bf6de2017-03-17 11:27:09 -0700344 long creationTimeMillis = source.readLong();
Andrew Lee7f3d41f2014-09-11 17:33:16 -0700345 return new ParcelableCall(
346 id,
347 state,
348 disconnectCause,
349 cannedSmsResponses,
350 capabilities,
351 properties,
Christine Hallstrom2830ce92016-11-30 16:06:42 -0800352 supportedAudioRoutes,
Andrew Lee7f3d41f2014-09-11 17:33:16 -0700353 connectTimeMillis,
354 handle,
355 handlePresentation,
356 callerDisplayName,
357 callerDisplayNamePresentation,
358 gatewayInfo,
359 accountHandle,
Tyler Gunn75958422015-04-15 14:23:42 -0700360 isVideoCallProviderChanged,
Andrew Lee7f3d41f2014-09-11 17:33:16 -0700361 videoCallProvider,
Hall Liu95d55872017-01-25 17:12:49 -0800362 isRttCallChanged,
363 rttCall,
Andrew Lee7f3d41f2014-09-11 17:33:16 -0700364 parentCallId,
365 childCallIds,
366 statusHints,
367 videoState,
368 conferenceableCallIds,
Santos Cordon6b7f9552015-05-27 17:21:45 -0700369 intentExtras,
Tyler Gunnc0bf6de2017-03-17 11:27:09 -0700370 extras,
371 creationTimeMillis);
Sailesh Nepal60437932014-04-05 16:44:55 -0700372 }
373
374 @Override
Santos Cordon88b771d2014-07-19 13:10:40 -0700375 public ParcelableCall[] newArray(int size) {
376 return new ParcelableCall[size];
Sailesh Nepal60437932014-04-05 16:44:55 -0700377 }
378 };
379
380 /** {@inheritDoc} */
381 @Override
382 public int describeContents() {
383 return 0;
384 }
385
Santos Cordon88b771d2014-07-19 13:10:40 -0700386 /** Writes ParcelableCall object into a Parcel. */
Sailesh Nepal60437932014-04-05 16:44:55 -0700387 @Override
388 public void writeToParcel(Parcel destination, int flags) {
389 destination.writeString(mId);
Ihab Awadb19a0bc2014-08-07 19:46:01 -0700390 destination.writeInt(mState);
Andrew Lee7f3d41f2014-09-11 17:33:16 -0700391 destination.writeParcelable(mDisconnectCause, 0);
Ihab Awadc0677542014-06-10 13:29:47 -0700392 destination.writeList(mCannedSmsResponses);
Sailesh Nepal60437932014-04-05 16:44:55 -0700393 destination.writeInt(mCapabilities);
Andrew Lee223ad142014-08-27 16:33:08 -0700394 destination.writeInt(mProperties);
Sailesh Nepal60437932014-04-05 16:44:55 -0700395 destination.writeLong(mConnectTimeMillis);
396 destination.writeParcelable(mHandle, 0);
Sailesh Nepal61203862014-07-11 14:50:13 -0700397 destination.writeInt(mHandlePresentation);
398 destination.writeString(mCallerDisplayName);
399 destination.writeInt(mCallerDisplayNamePresentation);
Sailesh Nepal60437932014-04-05 16:44:55 -0700400 destination.writeParcelable(mGatewayInfo, 0);
Evan Charlton8c8a0622014-07-20 12:31:00 -0700401 destination.writeParcelable(mAccountHandle, 0);
Tyler Gunn75958422015-04-15 14:23:42 -0700402 destination.writeByte((byte) (mIsVideoCallProviderChanged ? 1 : 0));
Tyler Gunn807de8a2014-06-30 14:22:57 -0700403 destination.writeStrongBinder(
Andrew Lee50aca232014-07-22 16:41:54 -0700404 mVideoCallProvider != null ? mVideoCallProvider.asBinder() : null);
Santos Cordon980acb92014-05-31 10:31:19 -0700405 destination.writeString(mParentCallId);
406 destination.writeList(mChildCallIds);
Sailesh Nepale7ef59a2014-07-08 21:48:22 -0700407 destination.writeParcelable(mStatusHints, 0);
Andrew Lee85f5d422014-07-11 17:22:03 -0700408 destination.writeInt(mVideoState);
Santos Cordon7c7bc7f2014-07-28 18:15:48 -0700409 destination.writeList(mConferenceableCallIds);
Santos Cordon6b7f9552015-05-27 17:21:45 -0700410 destination.writeBundle(mIntentExtras);
411 destination.writeBundle(mExtras);
Christine Hallstrom2830ce92016-11-30 16:06:42 -0800412 destination.writeInt(mSupportedAudioRoutes);
Hall Liu95d55872017-01-25 17:12:49 -0800413 destination.writeByte((byte) (mIsRttCallChanged ? 1 : 0));
414 destination.writeParcelable(mRttCall, 0);
Tyler Gunnc0bf6de2017-03-17 11:27:09 -0700415 destination.writeLong(mCreationTimeMillis);
Sailesh Nepal60437932014-04-05 16:44:55 -0700416 }
Santos Cordonb6939982014-06-04 20:20:58 -0700417
418 @Override
419 public String toString() {
420 return String.format("[%s, parent:%s, children:%s]", mId, mParentCallId, mChildCallIds);
421 }
Sailesh Nepal60437932014-04-05 16:44:55 -0700422}