| Santos Cordon | 823fd3c | 2014-08-07 18:35:18 -0700 | [diff] [blame] | 1 | /* | 
|  | 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 Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 17 | package android.telecom; | 
| Santos Cordon | 823fd3c | 2014-08-07 18:35:18 -0700 | [diff] [blame] | 18 |  | 
| Tyler Gunn | ac60f95 | 2019-05-31 07:23:16 -0700 | [diff] [blame] | 19 | import android.net.Uri; | 
| Santos Cordon | 6b7f955 | 2015-05-27 17:21:45 -0700 | [diff] [blame] | 20 | import android.os.Bundle; | 
| Santos Cordon | 823fd3c | 2014-08-07 18:35:18 -0700 | [diff] [blame] | 21 | import android.os.Parcel; | 
|  | 22 | import android.os.Parcelable; | 
|  | 23 |  | 
|  | 24 | import java.util.ArrayList; | 
| Brad Ebinger | 43e0265 | 2020-04-09 15:30:57 -0700 | [diff] [blame] | 25 | import java.util.Collections; | 
| Santos Cordon | 823fd3c | 2014-08-07 18:35:18 -0700 | [diff] [blame] | 26 | import java.util.List; | 
|  | 27 |  | 
| Rekha Kumar | 0736681 | 2015-03-24 16:42:31 -0700 | [diff] [blame] | 28 | import com.android.internal.telecom.IVideoProvider; | 
|  | 29 |  | 
| Santos Cordon | 823fd3c | 2014-08-07 18:35:18 -0700 | [diff] [blame] | 30 | /** | 
|  | 31 | * A parcelable representation of a conference connection. | 
|  | 32 | * @hide | 
|  | 33 | */ | 
|  | 34 | public final class ParcelableConference implements Parcelable { | 
|  | 35 |  | 
| Brad Ebinger | 43e0265 | 2020-04-09 15:30:57 -0700 | [diff] [blame] | 36 | public static final class Builder { | 
|  | 37 | private final PhoneAccountHandle mPhoneAccount; | 
|  | 38 | private final int mState; | 
|  | 39 | private int mConnectionCapabilities; | 
|  | 40 | private int mConnectionProperties; | 
|  | 41 | private List<String> mConnectionIds = Collections.emptyList(); | 
|  | 42 | private long mConnectTimeMillis = Conference.CONNECT_TIME_NOT_SPECIFIED; | 
|  | 43 | private IVideoProvider mVideoProvider; | 
|  | 44 | private int mVideoState = VideoProfile.STATE_AUDIO_ONLY; | 
|  | 45 | private StatusHints mStatusHints; | 
|  | 46 | private Bundle mExtras; | 
|  | 47 | private long mConnectElapsedTimeMillis = Conference.CONNECT_TIME_NOT_SPECIFIED; | 
|  | 48 | private Uri mAddress; | 
|  | 49 | private int mAddressPresentation = TelecomManager.PRESENTATION_UNKNOWN; | 
|  | 50 | private String mCallerDisplayName; | 
|  | 51 | private int mCallerDisplayNamePresentation = TelecomManager.PRESENTATION_UNKNOWN;; | 
|  | 52 | private DisconnectCause mDisconnectCause; | 
|  | 53 | private boolean mRingbackRequested; | 
|  | 54 | private int mCallDirection = Call.Details.DIRECTION_UNKNOWN; | 
|  | 55 |  | 
|  | 56 | public Builder( | 
|  | 57 | PhoneAccountHandle phoneAccount, | 
|  | 58 | int state) { | 
|  | 59 | mPhoneAccount = phoneAccount; | 
|  | 60 | mState = state; | 
|  | 61 | } | 
|  | 62 |  | 
|  | 63 | public Builder setDisconnectCause(DisconnectCause cause) { | 
|  | 64 | mDisconnectCause = cause; | 
|  | 65 | return this; | 
|  | 66 | } | 
|  | 67 |  | 
|  | 68 | public Builder setRingbackRequested(boolean requested) { | 
|  | 69 | mRingbackRequested = requested; | 
|  | 70 | return this; | 
|  | 71 | } | 
|  | 72 |  | 
|  | 73 | public Builder setCallerDisplayName(String callerDisplayName, | 
|  | 74 | @TelecomManager.Presentation int callerDisplayNamePresentation) { | 
|  | 75 | mCallerDisplayName = callerDisplayName; | 
|  | 76 | mCallerDisplayNamePresentation = callerDisplayNamePresentation; | 
|  | 77 | return this; | 
|  | 78 | } | 
|  | 79 |  | 
|  | 80 | public Builder setAddress(Uri address, | 
|  | 81 | @TelecomManager.Presentation int addressPresentation) { | 
|  | 82 | mAddress = address; | 
|  | 83 | mAddressPresentation = addressPresentation; | 
|  | 84 | return this; | 
|  | 85 | } | 
|  | 86 |  | 
|  | 87 | public Builder setExtras(Bundle extras) { | 
|  | 88 | mExtras = extras; | 
|  | 89 | return this; | 
|  | 90 | } | 
|  | 91 |  | 
|  | 92 | public Builder setStatusHints(StatusHints hints) { | 
|  | 93 | mStatusHints = hints; | 
|  | 94 | return this; | 
|  | 95 | } | 
|  | 96 |  | 
|  | 97 | public Builder setConnectTimeMillis(long connectTimeMillis, long connectElapsedTimeMillis) { | 
|  | 98 | mConnectTimeMillis = connectTimeMillis; | 
|  | 99 | mConnectElapsedTimeMillis = connectElapsedTimeMillis; | 
|  | 100 | return this; | 
|  | 101 | } | 
|  | 102 |  | 
|  | 103 | public Builder setVideoAttributes(IVideoProvider provider, | 
|  | 104 | @VideoProfile.VideoState int videoState) { | 
|  | 105 | mVideoProvider = provider; | 
|  | 106 | mVideoState = videoState; | 
|  | 107 | return this; | 
|  | 108 | } | 
|  | 109 |  | 
|  | 110 | public Builder setConnectionIds(List<String> connectionIds) { | 
|  | 111 | mConnectionIds = connectionIds; | 
|  | 112 | return this; | 
|  | 113 | } | 
|  | 114 |  | 
|  | 115 | public Builder setConnectionProperties(int properties) { | 
|  | 116 | mConnectionProperties = properties; | 
|  | 117 | return this; | 
|  | 118 | } | 
|  | 119 |  | 
|  | 120 | public Builder setConnectionCapabilities(int capabilities) { | 
|  | 121 | mConnectionCapabilities = capabilities; | 
|  | 122 | return this; | 
|  | 123 | } | 
|  | 124 |  | 
|  | 125 | public Builder setCallDirection(int callDirection) { | 
|  | 126 | mCallDirection = callDirection; | 
|  | 127 | return this; | 
|  | 128 | } | 
|  | 129 |  | 
|  | 130 | public ParcelableConference build() { | 
|  | 131 | return new ParcelableConference(mPhoneAccount, mState, mConnectionCapabilities, | 
|  | 132 | mConnectionProperties, mConnectionIds, mVideoProvider, mVideoState, | 
|  | 133 | mConnectTimeMillis, mConnectElapsedTimeMillis, mStatusHints, mExtras, mAddress, | 
|  | 134 | mAddressPresentation, mCallerDisplayName, mCallerDisplayNamePresentation, | 
|  | 135 | mDisconnectCause, mRingbackRequested, mCallDirection); | 
|  | 136 | } | 
|  | 137 | } | 
|  | 138 |  | 
|  | 139 |  | 
|  | 140 | private final PhoneAccountHandle mPhoneAccount; | 
|  | 141 | private final int mState; | 
|  | 142 | private final int mConnectionCapabilities; | 
|  | 143 | private final int mConnectionProperties; | 
|  | 144 | private final List<String> mConnectionIds; | 
|  | 145 | private final long mConnectTimeMillis; | 
| Rekha Kumar | 0736681 | 2015-03-24 16:42:31 -0700 | [diff] [blame] | 146 | private final IVideoProvider mVideoProvider; | 
|  | 147 | private final int mVideoState; | 
| Brad Ebinger | 43e0265 | 2020-04-09 15:30:57 -0700 | [diff] [blame] | 148 | private final StatusHints mStatusHints; | 
|  | 149 | private final Bundle mExtras; | 
|  | 150 | private final long mConnectElapsedTimeMillis; | 
| Tyler Gunn | ac60f95 | 2019-05-31 07:23:16 -0700 | [diff] [blame] | 151 | private final Uri mAddress; | 
|  | 152 | private final int mAddressPresentation; | 
|  | 153 | private final String mCallerDisplayName; | 
|  | 154 | private final int mCallerDisplayNamePresentation; | 
| Brad Ebinger | 43e0265 | 2020-04-09 15:30:57 -0700 | [diff] [blame] | 155 | private final DisconnectCause mDisconnectCause; | 
|  | 156 | private final boolean mRingbackRequested; | 
|  | 157 | private final int mCallDirection; | 
| Ravi Paluri | 80aa214 | 2019-12-02 11:57:37 +0530 | [diff] [blame] | 158 |  | 
| Brad Ebinger | 43e0265 | 2020-04-09 15:30:57 -0700 | [diff] [blame] | 159 | private ParcelableConference( | 
| Ravi Paluri | 80aa214 | 2019-12-02 11:57:37 +0530 | [diff] [blame] | 160 | PhoneAccountHandle phoneAccount, | 
|  | 161 | int state, | 
|  | 162 | int connectionCapabilities, | 
|  | 163 | int connectionProperties, | 
|  | 164 | List<String> connectionIds, | 
|  | 165 | IVideoProvider videoProvider, | 
|  | 166 | int videoState, | 
|  | 167 | long connectTimeMillis, | 
|  | 168 | long connectElapsedTimeMillis, | 
|  | 169 | StatusHints statusHints, | 
|  | 170 | Bundle extras, | 
|  | 171 | Uri address, | 
|  | 172 | int addressPresentation, | 
|  | 173 | String callerDisplayName, | 
|  | 174 | int callerDisplayNamePresentation, | 
|  | 175 | DisconnectCause disconnectCause, | 
| Brad Ebinger | 43e0265 | 2020-04-09 15:30:57 -0700 | [diff] [blame] | 176 | boolean ringbackRequested, | 
|  | 177 | int callDirection) { | 
| Andrew Lee | edc625f | 2015-04-14 13:38:12 -0700 | [diff] [blame] | 178 | mPhoneAccount = phoneAccount; | 
|  | 179 | mState = state; | 
|  | 180 | mConnectionCapabilities = connectionCapabilities; | 
| Tyler Gunn | 720c664 | 2016-03-22 09:02:47 -0700 | [diff] [blame] | 181 | mConnectionProperties = connectionProperties; | 
| Andrew Lee | edc625f | 2015-04-14 13:38:12 -0700 | [diff] [blame] | 182 | mConnectionIds = connectionIds; | 
| Andrew Lee | 0f51da3 | 2015-04-16 13:11:55 -0700 | [diff] [blame] | 183 | mVideoProvider = videoProvider; | 
|  | 184 | mVideoState = videoState; | 
| Tyler Gunn | cd5d33c | 2015-01-12 09:02:01 -0800 | [diff] [blame] | 185 | mConnectTimeMillis = connectTimeMillis; | 
| Andrew Lee | edc625f | 2015-04-14 13:38:12 -0700 | [diff] [blame] | 186 | mStatusHints = statusHints; | 
| Santos Cordon | 6b7f955 | 2015-05-27 17:21:45 -0700 | [diff] [blame] | 187 | mExtras = extras; | 
| Tyler Gunn | b2f875b | 2017-08-04 09:27:26 -0700 | [diff] [blame] | 188 | mConnectElapsedTimeMillis = connectElapsedTimeMillis; | 
| Tyler Gunn | ac60f95 | 2019-05-31 07:23:16 -0700 | [diff] [blame] | 189 | mAddress = address; | 
|  | 190 | mAddressPresentation = addressPresentation; | 
|  | 191 | mCallerDisplayName = callerDisplayName; | 
|  | 192 | mCallerDisplayNamePresentation = callerDisplayNamePresentation; | 
| Brad Ebinger | 43e0265 | 2020-04-09 15:30:57 -0700 | [diff] [blame] | 193 | mDisconnectCause = disconnectCause; | 
|  | 194 | mRingbackRequested = ringbackRequested; | 
|  | 195 | mCallDirection = callDirection; | 
| Santos Cordon | 823fd3c | 2014-08-07 18:35:18 -0700 | [diff] [blame] | 196 | } | 
|  | 197 |  | 
|  | 198 | @Override | 
|  | 199 | public String toString() { | 
|  | 200 | return (new StringBuffer()) | 
|  | 201 | .append("account: ") | 
|  | 202 | .append(mPhoneAccount) | 
|  | 203 | .append(", state: ") | 
|  | 204 | .append(Connection.stateToString(mState)) | 
|  | 205 | .append(", capabilities: ") | 
| Ihab Awad | 5c9c86e | 2014-11-12 13:41:16 -0800 | [diff] [blame] | 206 | .append(Connection.capabilitiesToString(mConnectionCapabilities)) | 
| Tyler Gunn | 720c664 | 2016-03-22 09:02:47 -0700 | [diff] [blame] | 207 | .append(", properties: ") | 
|  | 208 | .append(Connection.propertiesToString(mConnectionProperties)) | 
| Tyler Gunn | cd5d33c | 2015-01-12 09:02:01 -0800 | [diff] [blame] | 209 | .append(", connectTime: ") | 
|  | 210 | .append(mConnectTimeMillis) | 
| Santos Cordon | 823fd3c | 2014-08-07 18:35:18 -0700 | [diff] [blame] | 211 | .append(", children: ") | 
|  | 212 | .append(mConnectionIds) | 
| Rekha Kumar | 0736681 | 2015-03-24 16:42:31 -0700 | [diff] [blame] | 213 | .append(", VideoState: ") | 
|  | 214 | .append(mVideoState) | 
|  | 215 | .append(", VideoProvider: ") | 
|  | 216 | .append(mVideoProvider) | 
| Ravi Paluri | 80aa214 | 2019-12-02 11:57:37 +0530 | [diff] [blame] | 217 | .append(", isRingbackRequested: ") | 
|  | 218 | .append(mRingbackRequested) | 
|  | 219 | .append(", disconnectCause: ") | 
|  | 220 | .append(mDisconnectCause) | 
| Brad Ebinger | 43e0265 | 2020-04-09 15:30:57 -0700 | [diff] [blame] | 221 | .append(", callDirection: ") | 
|  | 222 | .append(mCallDirection) | 
| Santos Cordon | 823fd3c | 2014-08-07 18:35:18 -0700 | [diff] [blame] | 223 | .toString(); | 
|  | 224 | } | 
|  | 225 |  | 
|  | 226 | public PhoneAccountHandle getPhoneAccount() { | 
|  | 227 | return mPhoneAccount; | 
|  | 228 | } | 
|  | 229 |  | 
|  | 230 | public int getState() { | 
|  | 231 | return mState; | 
|  | 232 | } | 
|  | 233 |  | 
| Ihab Awad | 5c9c86e | 2014-11-12 13:41:16 -0800 | [diff] [blame] | 234 | public int getConnectionCapabilities() { | 
|  | 235 | return mConnectionCapabilities; | 
| Santos Cordon | 823fd3c | 2014-08-07 18:35:18 -0700 | [diff] [blame] | 236 | } | 
|  | 237 |  | 
| Tyler Gunn | 720c664 | 2016-03-22 09:02:47 -0700 | [diff] [blame] | 238 | public int getConnectionProperties() { | 
|  | 239 | return mConnectionProperties; | 
|  | 240 | } | 
|  | 241 |  | 
| Santos Cordon | 823fd3c | 2014-08-07 18:35:18 -0700 | [diff] [blame] | 242 | public List<String> getConnectionIds() { | 
|  | 243 | return mConnectionIds; | 
|  | 244 | } | 
|  | 245 |  | 
| Tyler Gunn | cd5d33c | 2015-01-12 09:02:01 -0800 | [diff] [blame] | 246 | public long getConnectTimeMillis() { | 
|  | 247 | return mConnectTimeMillis; | 
|  | 248 | } | 
| Tyler Gunn | b2f875b | 2017-08-04 09:27:26 -0700 | [diff] [blame] | 249 |  | 
|  | 250 | public long getConnectElapsedTimeMillis() { | 
|  | 251 | return mConnectElapsedTimeMillis; | 
|  | 252 | } | 
|  | 253 |  | 
| Rekha Kumar | 0736681 | 2015-03-24 16:42:31 -0700 | [diff] [blame] | 254 | public IVideoProvider getVideoProvider() { | 
|  | 255 | return mVideoProvider; | 
|  | 256 | } | 
|  | 257 |  | 
|  | 258 | public int getVideoState() { | 
|  | 259 | return mVideoState; | 
|  | 260 | } | 
| Tyler Gunn | cd5d33c | 2015-01-12 09:02:01 -0800 | [diff] [blame] | 261 |  | 
| Andrew Lee | edc625f | 2015-04-14 13:38:12 -0700 | [diff] [blame] | 262 | public StatusHints getStatusHints() { | 
|  | 263 | return mStatusHints; | 
|  | 264 | } | 
|  | 265 |  | 
| Santos Cordon | 6b7f955 | 2015-05-27 17:21:45 -0700 | [diff] [blame] | 266 | public Bundle getExtras() { | 
|  | 267 | return mExtras; | 
|  | 268 | } | 
|  | 269 |  | 
| Tyler Gunn | ac60f95 | 2019-05-31 07:23:16 -0700 | [diff] [blame] | 270 | public Uri getHandle() { | 
|  | 271 | return mAddress; | 
|  | 272 | } | 
|  | 273 |  | 
| Ravi Paluri | 80aa214 | 2019-12-02 11:57:37 +0530 | [diff] [blame] | 274 | public final DisconnectCause getDisconnectCause() { | 
|  | 275 | return mDisconnectCause; | 
|  | 276 | } | 
|  | 277 |  | 
|  | 278 | public boolean isRingbackRequested() { | 
|  | 279 | return mRingbackRequested; | 
|  | 280 | } | 
| Brad Ebinger | 43e0265 | 2020-04-09 15:30:57 -0700 | [diff] [blame] | 281 |  | 
| Tyler Gunn | ac60f95 | 2019-05-31 07:23:16 -0700 | [diff] [blame] | 282 | public int getHandlePresentation() { | 
|  | 283 | return mAddressPresentation; | 
|  | 284 | } | 
|  | 285 |  | 
| Brad Ebinger | 43e0265 | 2020-04-09 15:30:57 -0700 | [diff] [blame] | 286 | public int getCallDirection() { | 
|  | 287 | return mCallDirection; | 
|  | 288 | } | 
|  | 289 |  | 
| Jeff Sharkey | 9e8f83d | 2019-02-28 12:06:45 -0700 | [diff] [blame] | 290 | public static final @android.annotation.NonNull Parcelable.Creator<ParcelableConference> CREATOR = | 
| Santos Cordon | 823fd3c | 2014-08-07 18:35:18 -0700 | [diff] [blame] | 291 | new Parcelable.Creator<ParcelableConference> () { | 
|  | 292 | @Override | 
|  | 293 | public ParcelableConference createFromParcel(Parcel source) { | 
|  | 294 | ClassLoader classLoader = ParcelableConference.class.getClassLoader(); | 
| Bernardo Rufino | 1a5cb38 | 2022-01-14 17:35:36 +0000 | [diff] [blame] | 295 | PhoneAccountHandle phoneAccount = source.readParcelable(classLoader, android.telecom.PhoneAccountHandle.class); | 
| Santos Cordon | 823fd3c | 2014-08-07 18:35:18 -0700 | [diff] [blame] | 296 | int state = source.readInt(); | 
|  | 297 | int capabilities = source.readInt(); | 
|  | 298 | List<String> connectionIds = new ArrayList<>(2); | 
| Bernardo Rufino | 1a5cb38 | 2022-01-14 17:35:36 +0000 | [diff] [blame] | 299 | source.readList(connectionIds, classLoader, java.lang.String.class); | 
| Tyler Gunn | cd5d33c | 2015-01-12 09:02:01 -0800 | [diff] [blame] | 300 | long connectTimeMillis = source.readLong(); | 
| Rekha Kumar | 0736681 | 2015-03-24 16:42:31 -0700 | [diff] [blame] | 301 | IVideoProvider videoCallProvider = | 
|  | 302 | IVideoProvider.Stub.asInterface(source.readStrongBinder()); | 
|  | 303 | int videoState = source.readInt(); | 
| Bernardo Rufino | 1a5cb38 | 2022-01-14 17:35:36 +0000 | [diff] [blame] | 304 | StatusHints statusHints = source.readParcelable(classLoader, android.telecom.StatusHints.class); | 
| Santos Cordon | 6b7f955 | 2015-05-27 17:21:45 -0700 | [diff] [blame] | 305 | Bundle extras = source.readBundle(classLoader); | 
| Tyler Gunn | 720c664 | 2016-03-22 09:02:47 -0700 | [diff] [blame] | 306 | int properties = source.readInt(); | 
| Tyler Gunn | b2f875b | 2017-08-04 09:27:26 -0700 | [diff] [blame] | 307 | long connectElapsedTimeMillis = source.readLong(); | 
| Bernardo Rufino | 1a5cb38 | 2022-01-14 17:35:36 +0000 | [diff] [blame] | 308 | Uri address = source.readParcelable(classLoader, android.net.Uri.class); | 
| Tyler Gunn | ac60f95 | 2019-05-31 07:23:16 -0700 | [diff] [blame] | 309 | int addressPresentation = source.readInt(); | 
|  | 310 | String callerDisplayName = source.readString(); | 
|  | 311 | int callerDisplayNamePresentation = source.readInt(); | 
| Bernardo Rufino | 1a5cb38 | 2022-01-14 17:35:36 +0000 | [diff] [blame] | 312 | DisconnectCause disconnectCause = source.readParcelable(classLoader, android.telecom.DisconnectCause.class); | 
| Ravi Paluri | 80aa214 | 2019-12-02 11:57:37 +0530 | [diff] [blame] | 313 | boolean isRingbackRequested = source.readInt() == 1; | 
| Brad Ebinger | 43e0265 | 2020-04-09 15:30:57 -0700 | [diff] [blame] | 314 | int callDirection = source.readInt(); | 
| Rekha Kumar | 0736681 | 2015-03-24 16:42:31 -0700 | [diff] [blame] | 315 |  | 
| Tyler Gunn | 720c664 | 2016-03-22 09:02:47 -0700 | [diff] [blame] | 316 | return new ParcelableConference(phoneAccount, state, capabilities, properties, | 
| Tyler Gunn | b2f875b | 2017-08-04 09:27:26 -0700 | [diff] [blame] | 317 | connectionIds, videoCallProvider, videoState, connectTimeMillis, | 
| Tyler Gunn | ac60f95 | 2019-05-31 07:23:16 -0700 | [diff] [blame] | 318 | connectElapsedTimeMillis, statusHints, extras, address, addressPresentation, | 
| Ravi Paluri | 80aa214 | 2019-12-02 11:57:37 +0530 | [diff] [blame] | 319 | callerDisplayName, callerDisplayNamePresentation, disconnectCause, | 
| Brad Ebinger | 43e0265 | 2020-04-09 15:30:57 -0700 | [diff] [blame] | 320 | isRingbackRequested, callDirection); | 
| Santos Cordon | 823fd3c | 2014-08-07 18:35:18 -0700 | [diff] [blame] | 321 | } | 
|  | 322 |  | 
|  | 323 | @Override | 
|  | 324 | public ParcelableConference[] newArray(int size) { | 
|  | 325 | return new ParcelableConference[size]; | 
|  | 326 | } | 
|  | 327 | }; | 
|  | 328 |  | 
|  | 329 | /** {@inheritDoc} */ | 
|  | 330 | @Override | 
|  | 331 | public int describeContents() { | 
|  | 332 | return 0; | 
|  | 333 | } | 
|  | 334 |  | 
|  | 335 | /** Writes ParcelableConference object into a Parcel. */ | 
|  | 336 | @Override | 
|  | 337 | public void writeToParcel(Parcel destination, int flags) { | 
|  | 338 | destination.writeParcelable(mPhoneAccount, 0); | 
|  | 339 | destination.writeInt(mState); | 
| Ihab Awad | 5c9c86e | 2014-11-12 13:41:16 -0800 | [diff] [blame] | 340 | destination.writeInt(mConnectionCapabilities); | 
| Santos Cordon | 823fd3c | 2014-08-07 18:35:18 -0700 | [diff] [blame] | 341 | destination.writeList(mConnectionIds); | 
| Tyler Gunn | cd5d33c | 2015-01-12 09:02:01 -0800 | [diff] [blame] | 342 | destination.writeLong(mConnectTimeMillis); | 
| Rekha Kumar | 0736681 | 2015-03-24 16:42:31 -0700 | [diff] [blame] | 343 | destination.writeStrongBinder( | 
|  | 344 | mVideoProvider != null ? mVideoProvider.asBinder() : null); | 
|  | 345 | destination.writeInt(mVideoState); | 
| Andrew Lee | edc625f | 2015-04-14 13:38:12 -0700 | [diff] [blame] | 346 | destination.writeParcelable(mStatusHints, 0); | 
| Santos Cordon | 6b7f955 | 2015-05-27 17:21:45 -0700 | [diff] [blame] | 347 | destination.writeBundle(mExtras); | 
| Tyler Gunn | 720c664 | 2016-03-22 09:02:47 -0700 | [diff] [blame] | 348 | destination.writeInt(mConnectionProperties); | 
| Tyler Gunn | b2f875b | 2017-08-04 09:27:26 -0700 | [diff] [blame] | 349 | destination.writeLong(mConnectElapsedTimeMillis); | 
| Tyler Gunn | ac60f95 | 2019-05-31 07:23:16 -0700 | [diff] [blame] | 350 | destination.writeParcelable(mAddress, 0); | 
|  | 351 | destination.writeInt(mAddressPresentation); | 
|  | 352 | destination.writeString(mCallerDisplayName); | 
|  | 353 | destination.writeInt(mCallerDisplayNamePresentation); | 
| Ravi Paluri | 80aa214 | 2019-12-02 11:57:37 +0530 | [diff] [blame] | 354 | destination.writeParcelable(mDisconnectCause, 0); | 
|  | 355 | destination.writeInt(mRingbackRequested ? 1 : 0); | 
| Brad Ebinger | 43e0265 | 2020-04-09 15:30:57 -0700 | [diff] [blame] | 356 | destination.writeInt(mCallDirection); | 
| Santos Cordon | 823fd3c | 2014-08-07 18:35:18 -0700 | [diff] [blame] | 357 | } | 
|  | 358 | } |