blob: 6d7ceca0a2cda3b423bbdc9fd4442eaf1dd0d3bb [file] [log] [blame]
Ihab Awad542e0ea2014-05-16 10:22:16 -07001/*
2 * Copyright (C) 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;
Ihab Awad542e0ea2014-05-16 10:22:16 -070018
Hall Liub2306242019-11-15 17:13:05 -080019import android.annotation.NonNull;
20import android.annotation.Nullable;
21import android.annotation.SystemApi;
22import android.annotation.TestApi;
Ihab Awad542e0ea2014-05-16 10:22:16 -070023import android.net.Uri;
Sailesh Nepal61203862014-07-11 14:50:13 -070024import android.os.Bundle;
Ihab Awadfbb092f2014-06-03 18:40:45 -070025import android.os.Parcel;
Hall Liu95d55872017-01-25 17:12:49 -080026import android.os.ParcelFileDescriptor;
Ihab Awadfbb092f2014-06-03 18:40:45 -070027import android.os.Parcelable;
Ihab Awad542e0ea2014-05-16 10:22:16 -070028
Ravi Paluri80aa2142019-12-02 11:57:37 +053029import java.util.ArrayList;
30import java.util.List;
31
Ihab Awad542e0ea2014-05-16 10:22:16 -070032/**
33 * Simple data container encapsulating a request to some entity to
34 * create a new {@link Connection}.
35 */
Ihab Awadfbb092f2014-06-03 18:40:45 -070036public final class ConnectionRequest implements Parcelable {
Ihab Awad542e0ea2014-05-16 10:22:16 -070037
Hall Liu95d55872017-01-25 17:12:49 -080038 /**
39 * Builder class for {@link ConnectionRequest}
40 * @hide
41 */
Hall Liub2306242019-11-15 17:13:05 -080042 @TestApi // For convenience in CTS tests
Hall Liu95d55872017-01-25 17:12:49 -080043 public static final class Builder {
44 private PhoneAccountHandle mAccountHandle;
45 private Uri mAddress;
46 private Bundle mExtras;
47 private int mVideoState = VideoProfile.STATE_AUDIO_ONLY;
48 private String mTelecomCallId;
49 private boolean mShouldShowIncomingCallUi = false;
50 private ParcelFileDescriptor mRttPipeToInCall;
51 private ParcelFileDescriptor mRttPipeFromInCall;
Ravi Paluri80aa2142019-12-02 11:57:37 +053052 private List<Uri> mParticipants;
53 private boolean mIsAdhocConference = false;
Hall Liu95d55872017-01-25 17:12:49 -080054
55 public Builder() { }
56
57 /**
58 * Sets the phone account handle for the resulting {@link ConnectionRequest}
59 * @param accountHandle The accountHandle which should be used to place the call.
60 */
Hall Liub2306242019-11-15 17:13:05 -080061 public @NonNull Builder setAccountHandle(@NonNull PhoneAccountHandle accountHandle) {
Hall Liu95d55872017-01-25 17:12:49 -080062 this.mAccountHandle = accountHandle;
63 return this;
64 }
65
66 /**
Ravi Paluri80aa2142019-12-02 11:57:37 +053067 * Sets the participants for the resulting {@link ConnectionRequest}
68 * @param participants The participants to which the {@link Connection} is to connect.
69 */
70 public @NonNull Builder setParticipants(@Nullable List<Uri> participants) {
71 this.mParticipants = participants;
72 return this;
73 }
74
75 /**
Hall Liu95d55872017-01-25 17:12:49 -080076 * Sets the address for the resulting {@link ConnectionRequest}
77 * @param address The address(e.g., phone number) to which the {@link Connection} is to
78 * connect.
79 */
Hall Liub2306242019-11-15 17:13:05 -080080 public @NonNull Builder setAddress(@NonNull Uri address) {
Hall Liu95d55872017-01-25 17:12:49 -080081 this.mAddress = address;
82 return this;
83 }
84
85 /**
86 * Sets the extras bundle for the resulting {@link ConnectionRequest}
87 * @param extras Application-specific extra data.
88 */
Hall Liub2306242019-11-15 17:13:05 -080089 public @NonNull Builder setExtras(@NonNull Bundle extras) {
Hall Liu95d55872017-01-25 17:12:49 -080090 this.mExtras = extras;
91 return this;
92 }
93
94 /**
95 * Sets the video state for the resulting {@link ConnectionRequest}
96 * @param videoState Determines the video state for the connection.
97 */
Hall Liub2306242019-11-15 17:13:05 -080098 public @NonNull Builder setVideoState(int videoState) {
Hall Liu95d55872017-01-25 17:12:49 -080099 this.mVideoState = videoState;
100 return this;
101 }
102
103 /**
104 * Sets the Telecom call ID for the resulting {@link ConnectionRequest}
105 * @param telecomCallId The telecom call ID.
106 */
Hall Liub2306242019-11-15 17:13:05 -0800107 public @NonNull Builder setTelecomCallId(@NonNull String telecomCallId) {
Hall Liu95d55872017-01-25 17:12:49 -0800108 this.mTelecomCallId = telecomCallId;
109 return this;
110 }
111
112 /**
113 * Sets shouldShowIncomingUi for the resulting {@link ConnectionRequest}
114 * @param shouldShowIncomingCallUi For a self-managed {@link ConnectionService}, will be
115 * {@code true} if the {@link ConnectionService} should show
116 * its own incoming call UI for an incoming call. When
117 * {@code false}, Telecom shows the incoming call UI.
118 */
Hall Liub2306242019-11-15 17:13:05 -0800119 public @NonNull Builder setShouldShowIncomingCallUi(boolean shouldShowIncomingCallUi) {
Hall Liu95d55872017-01-25 17:12:49 -0800120 this.mShouldShowIncomingCallUi = shouldShowIncomingCallUi;
121 return this;
122 }
123
124 /**
Ravi Paluri80aa2142019-12-02 11:57:37 +0530125 * Sets isAdhocConference for the resulting {@link ConnectionRequest}
126 * @param isAdhocConference {@code true} if it is a adhoc conference call
127 * {@code false}, if not a adhoc conference call
128 */
129 public @NonNull Builder setIsAdhocConferenceCall(boolean isAdhocConference) {
130 this.mIsAdhocConference = isAdhocConference;
131 return this;
132 }
133
134 /**
Hall Liu95d55872017-01-25 17:12:49 -0800135 * Sets the RTT pipe for transferring text into the {@link ConnectionService} for the
136 * resulting {@link ConnectionRequest}
137 * @param rttPipeFromInCall The data pipe to read from.
138 */
Hall Liub2306242019-11-15 17:13:05 -0800139 public @NonNull Builder setRttPipeFromInCall(
140 @NonNull ParcelFileDescriptor rttPipeFromInCall) {
Hall Liu95d55872017-01-25 17:12:49 -0800141 this.mRttPipeFromInCall = rttPipeFromInCall;
142 return this;
143 }
144
145 /**
146 * Sets the RTT pipe for transferring text out of {@link ConnectionService} for the
147 * resulting {@link ConnectionRequest}
148 * @param rttPipeToInCall The data pipe to write to.
149 */
Hall Liub2306242019-11-15 17:13:05 -0800150 public @NonNull Builder setRttPipeToInCall(@NonNull ParcelFileDescriptor rttPipeToInCall) {
Hall Liu95d55872017-01-25 17:12:49 -0800151 this.mRttPipeToInCall = rttPipeToInCall;
152 return this;
153 }
154
Hall Liub2306242019-11-15 17:13:05 -0800155 /**
156 * Build the {@link ConnectionRequest}
157 * @return Result of the builder
158 */
159 public @NonNull ConnectionRequest build() {
Hall Liu95d55872017-01-25 17:12:49 -0800160 return new ConnectionRequest(
161 mAccountHandle,
162 mAddress,
163 mExtras,
164 mVideoState,
165 mTelecomCallId,
166 mShouldShowIncomingCallUi,
167 mRttPipeFromInCall,
Ravi Paluri80aa2142019-12-02 11:57:37 +0530168 mRttPipeToInCall,
169 mParticipants,
170 mIsAdhocConference);
Hall Liu95d55872017-01-25 17:12:49 -0800171 }
172 }
173
Evan Charlton8c8a0622014-07-20 12:31:00 -0700174 private final PhoneAccountHandle mAccountHandle;
Nancy Chenea38cca2014-09-05 16:38:49 -0700175 private final Uri mAddress;
Ihab Awad542e0ea2014-05-16 10:22:16 -0700176 private final Bundle mExtras;
Tyler Gunn12013ad2014-07-08 14:04:58 -0700177 private final int mVideoState;
Tyler Gunnf0500bd2015-09-01 10:59:48 -0700178 private final String mTelecomCallId;
Tyler Gunnf5035432017-01-09 09:43:12 -0800179 private final boolean mShouldShowIncomingCallUi;
Hall Liu95d55872017-01-25 17:12:49 -0800180 private final ParcelFileDescriptor mRttPipeToInCall;
181 private final ParcelFileDescriptor mRttPipeFromInCall;
Hall Liue9041242018-02-09 16:40:03 -0800182 // Cached return value of getRttTextStream -- we don't want to wrap it more than once.
183 private Connection.RttTextStream mRttTextStream;
Ravi Paluri80aa2142019-12-02 11:57:37 +0530184 private List<Uri> mParticipants;
185 private final boolean mIsAdhocConference;
Ihab Awad542e0ea2014-05-16 10:22:16 -0700186
Sailesh Nepal61203862014-07-11 14:50:13 -0700187 /**
Evan Charlton8c8a0622014-07-20 12:31:00 -0700188 * @param accountHandle The accountHandle which should be used to place the call.
Sailesh Nepal61203862014-07-11 14:50:13 -0700189 * @param handle The handle (e.g., phone number) to which the {@link Connection} is to connect.
Sailesh Nepal61203862014-07-11 14:50:13 -0700190 * @param extras Application-specific extra data.
Tyler Gunnbe74de02014-08-29 14:51:48 -0700191 */
192 public ConnectionRequest(
193 PhoneAccountHandle accountHandle,
194 Uri handle,
Tyler Gunnbe74de02014-08-29 14:51:48 -0700195 Bundle extras) {
Hall Liu95d55872017-01-25 17:12:49 -0800196 this(accountHandle, handle, extras, VideoProfile.STATE_AUDIO_ONLY, null, false, null, null);
Tyler Gunnbe74de02014-08-29 14:51:48 -0700197 }
198
199 /**
200 * @param accountHandle The accountHandle which should be used to place the call.
201 * @param handle The handle (e.g., phone number) to which the {@link Connection} is to connect.
Tyler Gunnbe74de02014-08-29 14:51:48 -0700202 * @param extras Application-specific extra data.
Sailesh Nepal61203862014-07-11 14:50:13 -0700203 * @param videoState Determines the video state for the connection.
204 */
205 public ConnectionRequest(
Evan Charlton8c8a0622014-07-20 12:31:00 -0700206 PhoneAccountHandle accountHandle,
Sailesh Nepal61203862014-07-11 14:50:13 -0700207 Uri handle,
Sailesh Nepal61203862014-07-11 14:50:13 -0700208 Bundle extras,
Tyler Gunn12013ad2014-07-08 14:04:58 -0700209 int videoState) {
Hall Liu95d55872017-01-25 17:12:49 -0800210 this(accountHandle, handle, extras, videoState, null, false, null, null);
Tyler Gunnf0500bd2015-09-01 10:59:48 -0700211 }
212
213 /**
214 * @param accountHandle The accountHandle which should be used to place the call.
215 * @param handle The handle (e.g., phone number) to which the {@link Connection} is to connect.
216 * @param extras Application-specific extra data.
217 * @param videoState Determines the video state for the connection.
218 * @param telecomCallId The telecom call ID.
Tyler Gunnf5035432017-01-09 09:43:12 -0800219 * @param shouldShowIncomingCallUi For a self-managed {@link ConnectionService}, will be
220 * {@code true} if the {@link ConnectionService} should show its
221 * own incoming call UI for an incoming call. When
222 * {@code false}, Telecom shows the incoming call UI.
Tyler Gunnf0500bd2015-09-01 10:59:48 -0700223 * @hide
224 */
225 public ConnectionRequest(
226 PhoneAccountHandle accountHandle,
227 Uri handle,
228 Bundle extras,
229 int videoState,
Tyler Gunnf5035432017-01-09 09:43:12 -0800230 String telecomCallId,
231 boolean shouldShowIncomingCallUi) {
Hall Liu95d55872017-01-25 17:12:49 -0800232 this(accountHandle, handle, extras, videoState, telecomCallId,
233 shouldShowIncomingCallUi, null, null);
234 }
235
236 private ConnectionRequest(
237 PhoneAccountHandle accountHandle,
238 Uri handle,
239 Bundle extras,
240 int videoState,
241 String telecomCallId,
242 boolean shouldShowIncomingCallUi,
243 ParcelFileDescriptor rttPipeFromInCall,
244 ParcelFileDescriptor rttPipeToInCall) {
Ravi Paluri80aa2142019-12-02 11:57:37 +0530245 this(accountHandle, handle, extras, videoState, telecomCallId,
246 shouldShowIncomingCallUi, rttPipeFromInCall, rttPipeToInCall, null, false);
247 }
248
249 private ConnectionRequest(
250 PhoneAccountHandle accountHandle,
251 Uri handle,
252 Bundle extras,
253 int videoState,
254 String telecomCallId,
255 boolean shouldShowIncomingCallUi,
256 ParcelFileDescriptor rttPipeFromInCall,
257 ParcelFileDescriptor rttPipeToInCall,
258 List<Uri> participants,
259 boolean isAdhocConference) {
Evan Charlton8c8a0622014-07-20 12:31:00 -0700260 mAccountHandle = accountHandle;
Nancy Chenea38cca2014-09-05 16:38:49 -0700261 mAddress = handle;
Ihab Awadfbb092f2014-06-03 18:40:45 -0700262 mExtras = extras;
Tyler Gunn12013ad2014-07-08 14:04:58 -0700263 mVideoState = videoState;
Tyler Gunnf0500bd2015-09-01 10:59:48 -0700264 mTelecomCallId = telecomCallId;
Tyler Gunnf5035432017-01-09 09:43:12 -0800265 mShouldShowIncomingCallUi = shouldShowIncomingCallUi;
Hall Liu95d55872017-01-25 17:12:49 -0800266 mRttPipeFromInCall = rttPipeFromInCall;
267 mRttPipeToInCall = rttPipeToInCall;
Ravi Paluri80aa2142019-12-02 11:57:37 +0530268 mParticipants = participants;
269 mIsAdhocConference = isAdhocConference;
Ihab Awadfbb092f2014-06-03 18:40:45 -0700270 }
271
Sailesh Nepalc5b01572014-07-14 16:29:44 -0700272 private ConnectionRequest(Parcel in) {
Evan Charlton8c8a0622014-07-20 12:31:00 -0700273 mAccountHandle = in.readParcelable(getClass().getClassLoader());
Nancy Chenea38cca2014-09-05 16:38:49 -0700274 mAddress = in.readParcelable(getClass().getClassLoader());
Sailesh Nepalc5b01572014-07-14 16:29:44 -0700275 mExtras = in.readParcelable(getClass().getClassLoader());
276 mVideoState = in.readInt();
Tyler Gunnf0500bd2015-09-01 10:59:48 -0700277 mTelecomCallId = in.readString();
Tyler Gunnf5035432017-01-09 09:43:12 -0800278 mShouldShowIncomingCallUi = in.readInt() == 1;
Hall Liu95d55872017-01-25 17:12:49 -0800279 mRttPipeFromInCall = in.readParcelable(getClass().getClassLoader());
280 mRttPipeToInCall = in.readParcelable(getClass().getClassLoader());
Ravi Paluri80aa2142019-12-02 11:57:37 +0530281
282 mParticipants = new ArrayList<Uri>();
283 in.readList(mParticipants, getClass().getClassLoader());
284
285 mIsAdhocConference = in.readInt() == 1;
Sailesh Nepalc5b01572014-07-14 16:29:44 -0700286 }
287
Ihab Awadfbb092f2014-06-03 18:40:45 -0700288 /**
Ihab Awad9c3f1882014-06-30 21:17:13 -0700289 * The account which should be used to place the call.
Santos Cordon52d8a152014-06-17 19:08:45 -0700290 */
Evan Charlton8c8a0622014-07-20 12:31:00 -0700291 public PhoneAccountHandle getAccountHandle() { return mAccountHandle; }
Santos Cordon52d8a152014-06-17 19:08:45 -0700292
293 /**
Ihab Awad542e0ea2014-05-16 10:22:16 -0700294 * The handle (e.g., phone number) to which the {@link Connection} is to connect.
295 */
Nancy Chenea38cca2014-09-05 16:38:49 -0700296 public Uri getAddress() { return mAddress; }
Sailesh Nepal61203862014-07-11 14:50:13 -0700297
298 /**
Ravi Paluri80aa2142019-12-02 11:57:37 +0530299 * The participants to which the {@link Connection} is to connect.
300 */
301 public @Nullable List<Uri> getParticipants() { return mParticipants; }
302
303 /**
Ihab Awad542e0ea2014-05-16 10:22:16 -0700304 * Application-specific extra data. Used for passing back information from an incoming
305 * call {@code Intent}, and for any proprietary extensions arranged between a client
306 * and servant {@code ConnectionService} which agree on a vocabulary for such data.
307 */
308 public Bundle getExtras() { return mExtras; }
309
Tyler Gunn12013ad2014-07-08 14:04:58 -0700310 /**
Ihab Awadb19a0bc2014-08-07 19:46:01 -0700311 * Describes the video states supported by the client requesting the connection.
Yorke Lee32f24732015-05-12 16:18:03 -0700312 * Valid values: {@link VideoProfile#STATE_AUDIO_ONLY},
313 * {@link VideoProfile#STATE_BIDIRECTIONAL},
314 * {@link VideoProfile#STATE_TX_ENABLED},
315 * {@link VideoProfile#STATE_RX_ENABLED}.
Tyler Gunn12013ad2014-07-08 14:04:58 -0700316 *
317 * @return The video state for the connection.
318 */
319 public int getVideoState() {
320 return mVideoState;
321 }
322
Tyler Gunnf0500bd2015-09-01 10:59:48 -0700323 /**
324 * Returns the internal Telecom ID associated with the connection request.
325 *
326 * @return The Telecom ID.
327 * @hide
328 */
Hall Liub2306242019-11-15 17:13:05 -0800329 @SystemApi
330 @TestApi
331 public @Nullable String getTelecomCallId() {
Tyler Gunnf0500bd2015-09-01 10:59:48 -0700332 return mTelecomCallId;
333 }
334
Tyler Gunnf5035432017-01-09 09:43:12 -0800335 /**
336 * For a self-managed {@link ConnectionService}, indicates for an incoming call whether the
337 * {@link ConnectionService} should show its own incoming call UI for an incoming call.
338 *
339 * @return {@code true} if the {@link ConnectionService} should show its own incoming call UI.
340 * When {@code false}, Telecom shows the incoming call UI for the call.
341 * @hide
342 */
343 public boolean shouldShowIncomingCallUi() {
344 return mShouldShowIncomingCallUi;
345 }
346
Hall Liu95d55872017-01-25 17:12:49 -0800347 /**
Ravi Paluri80aa2142019-12-02 11:57:37 +0530348 * @return {@code true} if the call is a adhoc conference call else @return {@code false}
349 */
350 public boolean isAdhocConferenceCall() {
351 return mIsAdhocConference;
352 }
353
354 /**
Hall Liu95d55872017-01-25 17:12:49 -0800355 * Gets the {@link ParcelFileDescriptor} that is used to send RTT text from the connection
356 * service to the in-call UI. In order to obtain an
357 * {@link java.io.InputStream} from this {@link ParcelFileDescriptor}, use
358 * {@link android.os.ParcelFileDescriptor.AutoCloseInputStream}.
359 * Only text data encoded using UTF-8 should be written into this {@link ParcelFileDescriptor}.
360 * @return The {@link ParcelFileDescriptor} that should be used for communication.
361 * Do not un-hide -- only for use by Telephony
362 * @hide
363 */
364 public ParcelFileDescriptor getRttPipeToInCall() {
365 return mRttPipeToInCall;
366 }
367
368 /**
369 * Gets the {@link ParcelFileDescriptor} that is used to send RTT text from the in-call UI to
370 * the connection service. In order to obtain an
371 * {@link java.io.OutputStream} from this {@link ParcelFileDescriptor}, use
372 * {@link android.os.ParcelFileDescriptor.AutoCloseOutputStream}.
373 * The contents of this {@link ParcelFileDescriptor} will consist solely of text encoded in
374 * UTF-8.
375 * @return The {@link ParcelFileDescriptor} that should be used for communication
376 * Do not un-hide -- only for use by Telephony
377 * @hide
378 */
379 public ParcelFileDescriptor getRttPipeFromInCall() {
380 return mRttPipeFromInCall;
381 }
382
383 /**
384 * Gets the {@link android.telecom.Connection.RttTextStream} object that should be used to
385 * send and receive RTT text to/from the in-call app.
386 * @return An instance of {@link android.telecom.Connection.RttTextStream}, or {@code null}
387 * if this connection request is not requesting an RTT session upon connection establishment.
Hall Liu95d55872017-01-25 17:12:49 -0800388 */
389 public Connection.RttTextStream getRttTextStream() {
390 if (isRequestingRtt()) {
Hall Liue9041242018-02-09 16:40:03 -0800391 if (mRttTextStream == null) {
392 mRttTextStream = new Connection.RttTextStream(mRttPipeToInCall, mRttPipeFromInCall);
393 }
394 return mRttTextStream;
Hall Liu95d55872017-01-25 17:12:49 -0800395 } else {
396 return null;
397 }
398 }
399
400 /**
401 * Convenience method for determining whether the ConnectionRequest is requesting an RTT session
402 * @return {@code true} if RTT is requested, {@code false} otherwise.
Hall Liu95d55872017-01-25 17:12:49 -0800403 */
404 public boolean isRequestingRtt() {
405 return mRttPipeFromInCall != null && mRttPipeToInCall != null;
406 }
407
Evan Charltonbf11f982014-07-20 22:06:28 -0700408 @Override
Ihab Awad542e0ea2014-05-16 10:22:16 -0700409 public String toString() {
Ravi Paluri80aa2142019-12-02 11:57:37 +0530410 return String.format("ConnectionRequest %s %s isAdhocConf: %s",
Nancy Chenea38cca2014-09-05 16:38:49 -0700411 mAddress == null
Ihab Awad542e0ea2014-05-16 10:22:16 -0700412 ? Uri.EMPTY
Nancy Chenea38cca2014-09-05 16:38:49 -0700413 : Connection.toLogSafePhoneNumber(mAddress.toString()),
Ravi Paluri80aa2142019-12-02 11:57:37 +0530414 bundleToString(mExtras),
415 isAdhocConferenceCall() ? "Y" : "N");
Shi Yuanjieafea7de2018-07-19 20:30:10 +0900416 }
417
418 private static String bundleToString(Bundle extras){
419 if (extras == null) {
420 return "";
421 }
422 StringBuilder sb = new StringBuilder();
423 sb.append("Bundle[");
424 for (String key : extras.keySet()) {
425 sb.append(key);
426 sb.append("=");
427 switch (key) {
428 case TelecomManager.EXTRA_INCOMING_CALL_ADDRESS:
429 case TelecomManager.EXTRA_UNKNOWN_CALL_HANDLE:
430 sb.append(Log.pii(extras.get(key)));
431 break;
432 default:
433 sb.append(extras.get(key));
434 break;
435 }
436 sb.append(", ");
437 }
438 sb.append("]");
439 return sb.toString();
Ihab Awad542e0ea2014-05-16 10:22:16 -0700440 }
Ihab Awadfbb092f2014-06-03 18:40:45 -0700441
Jeff Sharkey9e8f83d2019-02-28 12:06:45 -0700442 public static final @android.annotation.NonNull Creator<ConnectionRequest> CREATOR = new Creator<ConnectionRequest> () {
Sailesh Nepalc5b01572014-07-14 16:29:44 -0700443 @Override
444 public ConnectionRequest createFromParcel(Parcel source) {
445 return new ConnectionRequest(source);
446 }
Ihab Awadfbb092f2014-06-03 18:40:45 -0700447
Sailesh Nepalc5b01572014-07-14 16:29:44 -0700448 @Override
449 public ConnectionRequest[] newArray(int size) {
450 return new ConnectionRequest[size];
451 }
452 };
Ihab Awadfbb092f2014-06-03 18:40:45 -0700453
454 /**
455 * {@inheritDoc}
456 */
457 @Override
458 public int describeContents() {
459 return 0;
460 }
461
Ihab Awadfbb092f2014-06-03 18:40:45 -0700462 @Override
463 public void writeToParcel(Parcel destination, int flags) {
Evan Charlton8c8a0622014-07-20 12:31:00 -0700464 destination.writeParcelable(mAccountHandle, 0);
Nancy Chenea38cca2014-09-05 16:38:49 -0700465 destination.writeParcelable(mAddress, 0);
Ihab Awadfbb092f2014-06-03 18:40:45 -0700466 destination.writeParcelable(mExtras, 0);
Tyler Gunn12013ad2014-07-08 14:04:58 -0700467 destination.writeInt(mVideoState);
Tyler Gunnf0500bd2015-09-01 10:59:48 -0700468 destination.writeString(mTelecomCallId);
Tyler Gunnf5035432017-01-09 09:43:12 -0800469 destination.writeInt(mShouldShowIncomingCallUi ? 1 : 0);
Hall Liu95d55872017-01-25 17:12:49 -0800470 destination.writeParcelable(mRttPipeFromInCall, 0);
471 destination.writeParcelable(mRttPipeToInCall, 0);
Ravi Paluri80aa2142019-12-02 11:57:37 +0530472 destination.writeList(mParticipants);
473 destination.writeInt(mIsAdhocConference ? 1 : 0);
Tyler Gunn12013ad2014-07-08 14:04:58 -0700474 }
475}