Santos Cordon | e8dc4be | 2014-07-21 01:28:28 -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 | e8dc4be | 2014-07-21 01:28:28 -0700 | [diff] [blame] | 18 | |
| 19 | import android.net.Uri; |
Santos Cordon | 6b7f955 | 2015-05-27 17:21:45 -0700 | [diff] [blame] | 20 | import android.os.Bundle; |
Santos Cordon | e8dc4be | 2014-07-21 01:28:28 -0700 | [diff] [blame] | 21 | import android.os.Parcel; |
| 22 | import android.os.Parcelable; |
| 23 | |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 24 | import com.android.internal.telecom.IVideoProvider; |
Santos Cordon | e8dc4be | 2014-07-21 01:28:28 -0700 | [diff] [blame] | 25 | |
Ihab Awad | b8e85c7 | 2014-08-23 20:34:57 -0700 | [diff] [blame] | 26 | import java.util.ArrayList; |
| 27 | import java.util.List; |
| 28 | |
Santos Cordon | e8dc4be | 2014-07-21 01:28:28 -0700 | [diff] [blame] | 29 | /** |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 30 | * Information about a connection that is used between Telecom and the ConnectionService. |
| 31 | * This is used to send initial Connection information to Telecom when the connection is |
Santos Cordon | e8dc4be | 2014-07-21 01:28:28 -0700 | [diff] [blame] | 32 | * first created. |
| 33 | * @hide |
| 34 | */ |
| 35 | public final class ParcelableConnection implements Parcelable { |
Ihab Awad | b8e85c7 | 2014-08-23 20:34:57 -0700 | [diff] [blame] | 36 | private final PhoneAccountHandle mPhoneAccount; |
| 37 | private final int mState; |
Ihab Awad | 5c9c86e | 2014-11-12 13:41:16 -0800 | [diff] [blame] | 38 | private final int mConnectionCapabilities; |
Tyler Gunn | 720c664 | 2016-03-22 09:02:47 -0700 | [diff] [blame] | 39 | private final int mConnectionProperties; |
Christine Hallstrom | 4e22d6d | 2016-11-30 16:06:42 -0800 | [diff] [blame] | 40 | private final int mSupportedAudioRoutes; |
Andrew Lee | 100e293 | 2014-09-08 15:34:24 -0700 | [diff] [blame] | 41 | private final Uri mAddress; |
| 42 | private final int mAddressPresentation; |
Ihab Awad | b8e85c7 | 2014-08-23 20:34:57 -0700 | [diff] [blame] | 43 | private final String mCallerDisplayName; |
| 44 | private final int mCallerDisplayNamePresentation; |
| 45 | private final IVideoProvider mVideoProvider; |
| 46 | private final int mVideoState; |
Andrew Lee | 100e293 | 2014-09-08 15:34:24 -0700 | [diff] [blame] | 47 | private final boolean mRingbackRequested; |
| 48 | private final boolean mIsVoipAudioMode; |
Roshan Pius | e927ec0 | 2015-07-15 15:47:21 -0700 | [diff] [blame] | 49 | private final long mConnectTimeMillis; |
Tyler Gunn | b2f875b | 2017-08-04 09:27:26 -0700 | [diff] [blame] | 50 | private final long mConnectElapsedTimeMillis; |
Ihab Awad | b8e85c7 | 2014-08-23 20:34:57 -0700 | [diff] [blame] | 51 | private final StatusHints mStatusHints; |
Andrew Lee | 7f3d41f | 2014-09-11 17:33:16 -0700 | [diff] [blame] | 52 | private final DisconnectCause mDisconnectCause; |
Ihab Awad | b8e85c7 | 2014-08-23 20:34:57 -0700 | [diff] [blame] | 53 | private final List<String> mConferenceableConnectionIds; |
Santos Cordon | 6b7f955 | 2015-05-27 17:21:45 -0700 | [diff] [blame] | 54 | private final Bundle mExtras; |
Tyler Gunn | 78da781 | 2017-05-09 14:34:57 -0700 | [diff] [blame] | 55 | private String mParentCallId; |
| 56 | |
| 57 | /** @hide */ |
| 58 | public ParcelableConnection( |
| 59 | PhoneAccountHandle phoneAccount, |
| 60 | int state, |
| 61 | int capabilities, |
| 62 | int properties, |
| 63 | int supportedAudioRoutes, |
| 64 | Uri address, |
| 65 | int addressPresentation, |
| 66 | String callerDisplayName, |
| 67 | int callerDisplayNamePresentation, |
| 68 | IVideoProvider videoProvider, |
| 69 | int videoState, |
| 70 | boolean ringbackRequested, |
| 71 | boolean isVoipAudioMode, |
| 72 | long connectTimeMillis, |
Tyler Gunn | b2f875b | 2017-08-04 09:27:26 -0700 | [diff] [blame] | 73 | long connectElapsedTimeMillis, |
Tyler Gunn | 78da781 | 2017-05-09 14:34:57 -0700 | [diff] [blame] | 74 | StatusHints statusHints, |
| 75 | DisconnectCause disconnectCause, |
| 76 | List<String> conferenceableConnectionIds, |
| 77 | Bundle extras, |
| 78 | String parentCallId) { |
| 79 | this(phoneAccount, state, capabilities, properties, supportedAudioRoutes, address, |
| 80 | addressPresentation, callerDisplayName, callerDisplayNamePresentation, |
| 81 | videoProvider, videoState, ringbackRequested, isVoipAudioMode, connectTimeMillis, |
Tyler Gunn | b2f875b | 2017-08-04 09:27:26 -0700 | [diff] [blame] | 82 | connectElapsedTimeMillis, statusHints, disconnectCause, conferenceableConnectionIds, |
| 83 | extras); |
Tyler Gunn | 78da781 | 2017-05-09 14:34:57 -0700 | [diff] [blame] | 84 | mParentCallId = parentCallId; |
| 85 | } |
Santos Cordon | e8dc4be | 2014-07-21 01:28:28 -0700 | [diff] [blame] | 86 | |
| 87 | /** @hide */ |
| 88 | public ParcelableConnection( |
| 89 | PhoneAccountHandle phoneAccount, |
| 90 | int state, |
| 91 | int capabilities, |
Tyler Gunn | 720c664 | 2016-03-22 09:02:47 -0700 | [diff] [blame] | 92 | int properties, |
Christine Hallstrom | 4e22d6d | 2016-11-30 16:06:42 -0800 | [diff] [blame] | 93 | int supportedAudioRoutes, |
Andrew Lee | 100e293 | 2014-09-08 15:34:24 -0700 | [diff] [blame] | 94 | Uri address, |
| 95 | int addressPresentation, |
Santos Cordon | e8dc4be | 2014-07-21 01:28:28 -0700 | [diff] [blame] | 96 | String callerDisplayName, |
| 97 | int callerDisplayNamePresentation, |
Ihab Awad | b19a0bc | 2014-08-07 19:46:01 -0700 | [diff] [blame] | 98 | IVideoProvider videoProvider, |
Sailesh Nepal | 8b9d3ca | 2014-08-14 17:39:34 -0700 | [diff] [blame] | 99 | int videoState, |
Andrew Lee | 100e293 | 2014-09-08 15:34:24 -0700 | [diff] [blame] | 100 | boolean ringbackRequested, |
| 101 | boolean isVoipAudioMode, |
Roshan Pius | e927ec0 | 2015-07-15 15:47:21 -0700 | [diff] [blame] | 102 | long connectTimeMillis, |
Tyler Gunn | b2f875b | 2017-08-04 09:27:26 -0700 | [diff] [blame] | 103 | long connectElapsedTimeMillis, |
Ihab Awad | 6107bab | 2014-08-18 09:23:25 -0700 | [diff] [blame] | 104 | StatusHints statusHints, |
Andrew Lee | 7f3d41f | 2014-09-11 17:33:16 -0700 | [diff] [blame] | 105 | DisconnectCause disconnectCause, |
Santos Cordon | 6b7f955 | 2015-05-27 17:21:45 -0700 | [diff] [blame] | 106 | List<String> conferenceableConnectionIds, |
| 107 | Bundle extras) { |
Santos Cordon | e8dc4be | 2014-07-21 01:28:28 -0700 | [diff] [blame] | 108 | mPhoneAccount = phoneAccount; |
| 109 | mState = state; |
Ihab Awad | 5c9c86e | 2014-11-12 13:41:16 -0800 | [diff] [blame] | 110 | mConnectionCapabilities = capabilities; |
Tyler Gunn | 720c664 | 2016-03-22 09:02:47 -0700 | [diff] [blame] | 111 | mConnectionProperties = properties; |
Christine Hallstrom | 4e22d6d | 2016-11-30 16:06:42 -0800 | [diff] [blame] | 112 | mSupportedAudioRoutes = supportedAudioRoutes; |
Andrew Lee | 100e293 | 2014-09-08 15:34:24 -0700 | [diff] [blame] | 113 | mAddress = address; |
| 114 | mAddressPresentation = addressPresentation; |
Santos Cordon | e8dc4be | 2014-07-21 01:28:28 -0700 | [diff] [blame] | 115 | mCallerDisplayName = callerDisplayName; |
| 116 | mCallerDisplayNamePresentation = callerDisplayNamePresentation; |
Ihab Awad | b19a0bc | 2014-08-07 19:46:01 -0700 | [diff] [blame] | 117 | mVideoProvider = videoProvider; |
Santos Cordon | e8dc4be | 2014-07-21 01:28:28 -0700 | [diff] [blame] | 118 | mVideoState = videoState; |
Andrew Lee | 100e293 | 2014-09-08 15:34:24 -0700 | [diff] [blame] | 119 | mRingbackRequested = ringbackRequested; |
| 120 | mIsVoipAudioMode = isVoipAudioMode; |
Roshan Pius | e927ec0 | 2015-07-15 15:47:21 -0700 | [diff] [blame] | 121 | mConnectTimeMillis = connectTimeMillis; |
Tyler Gunn | b2f875b | 2017-08-04 09:27:26 -0700 | [diff] [blame] | 122 | mConnectElapsedTimeMillis = connectElapsedTimeMillis; |
Sailesh Nepal | 8b9d3ca | 2014-08-14 17:39:34 -0700 | [diff] [blame] | 123 | mStatusHints = statusHints; |
Sailesh Nepal | cf7020b | 2014-08-20 10:07:19 -0700 | [diff] [blame] | 124 | mDisconnectCause = disconnectCause; |
Santos Cordon | 6b7f955 | 2015-05-27 17:21:45 -0700 | [diff] [blame] | 125 | mConferenceableConnectionIds = conferenceableConnectionIds; |
| 126 | mExtras = extras; |
Tyler Gunn | 78da781 | 2017-05-09 14:34:57 -0700 | [diff] [blame] | 127 | mParentCallId = null; |
Santos Cordon | e8dc4be | 2014-07-21 01:28:28 -0700 | [diff] [blame] | 128 | } |
| 129 | |
| 130 | public PhoneAccountHandle getPhoneAccount() { |
| 131 | return mPhoneAccount; |
| 132 | } |
| 133 | |
| 134 | public int getState() { |
| 135 | return mState; |
| 136 | } |
| 137 | |
Tyler Gunn | 720c664 | 2016-03-22 09:02:47 -0700 | [diff] [blame] | 138 | /** |
| 139 | * Returns the current connection capabilities bit-mask. Connection capabilities are defined as |
| 140 | * {@code CAPABILITY_*} constants in {@link Connection}. |
| 141 | * |
| 142 | * @return Bit-mask containing capabilities of the connection. |
| 143 | */ |
Ihab Awad | 5c9c86e | 2014-11-12 13:41:16 -0800 | [diff] [blame] | 144 | public int getConnectionCapabilities() { |
| 145 | return mConnectionCapabilities; |
Santos Cordon | e8dc4be | 2014-07-21 01:28:28 -0700 | [diff] [blame] | 146 | } |
| 147 | |
Tyler Gunn | 720c664 | 2016-03-22 09:02:47 -0700 | [diff] [blame] | 148 | /** |
| 149 | * Returns the current connection properties bit-mask. Connection properties are defined as |
| 150 | * {@code PROPERTY_*} constants in {@link Connection}. |
| 151 | * |
| 152 | * @return Bit-mask containing properties of the connection. |
| 153 | */ |
| 154 | public int getConnectionProperties() { |
| 155 | return mConnectionProperties; |
| 156 | } |
| 157 | |
Christine Hallstrom | 4e22d6d | 2016-11-30 16:06:42 -0800 | [diff] [blame] | 158 | public int getSupportedAudioRoutes() { |
| 159 | return mSupportedAudioRoutes; |
| 160 | } |
| 161 | |
Santos Cordon | e8dc4be | 2014-07-21 01:28:28 -0700 | [diff] [blame] | 162 | public Uri getHandle() { |
Andrew Lee | 100e293 | 2014-09-08 15:34:24 -0700 | [diff] [blame] | 163 | return mAddress; |
Santos Cordon | e8dc4be | 2014-07-21 01:28:28 -0700 | [diff] [blame] | 164 | } |
| 165 | |
| 166 | public int getHandlePresentation() { |
Andrew Lee | 100e293 | 2014-09-08 15:34:24 -0700 | [diff] [blame] | 167 | return mAddressPresentation; |
Santos Cordon | e8dc4be | 2014-07-21 01:28:28 -0700 | [diff] [blame] | 168 | } |
| 169 | |
| 170 | public String getCallerDisplayName() { |
| 171 | return mCallerDisplayName; |
| 172 | } |
| 173 | |
| 174 | public int getCallerDisplayNamePresentation() { |
| 175 | return mCallerDisplayNamePresentation; |
| 176 | } |
| 177 | |
Ihab Awad | b19a0bc | 2014-08-07 19:46:01 -0700 | [diff] [blame] | 178 | public IVideoProvider getVideoProvider() { |
| 179 | return mVideoProvider; |
Santos Cordon | e8dc4be | 2014-07-21 01:28:28 -0700 | [diff] [blame] | 180 | } |
| 181 | |
| 182 | public int getVideoState() { |
| 183 | return mVideoState; |
| 184 | } |
| 185 | |
Andrew Lee | 100e293 | 2014-09-08 15:34:24 -0700 | [diff] [blame] | 186 | public boolean isRingbackRequested() { |
| 187 | return mRingbackRequested; |
Sailesh Nepal | 8b9d3ca | 2014-08-14 17:39:34 -0700 | [diff] [blame] | 188 | } |
| 189 | |
Andrew Lee | 100e293 | 2014-09-08 15:34:24 -0700 | [diff] [blame] | 190 | public boolean getIsVoipAudioMode() { |
| 191 | return mIsVoipAudioMode; |
Sailesh Nepal | 8b9d3ca | 2014-08-14 17:39:34 -0700 | [diff] [blame] | 192 | } |
| 193 | |
Roshan Pius | e927ec0 | 2015-07-15 15:47:21 -0700 | [diff] [blame] | 194 | public long getConnectTimeMillis() { |
| 195 | return mConnectTimeMillis; |
| 196 | } |
| 197 | |
Tyler Gunn | b2f875b | 2017-08-04 09:27:26 -0700 | [diff] [blame] | 198 | public long getConnectElapsedTimeMillis() { |
| 199 | return mConnectElapsedTimeMillis; |
| 200 | } |
| 201 | |
Sailesh Nepal | 8b9d3ca | 2014-08-14 17:39:34 -0700 | [diff] [blame] | 202 | public final StatusHints getStatusHints() { |
| 203 | return mStatusHints; |
| 204 | } |
| 205 | |
Andrew Lee | 7f3d41f | 2014-09-11 17:33:16 -0700 | [diff] [blame] | 206 | public final DisconnectCause getDisconnectCause() { |
Sailesh Nepal | cf7020b | 2014-08-20 10:07:19 -0700 | [diff] [blame] | 207 | return mDisconnectCause; |
Ihab Awad | 6107bab | 2014-08-18 09:23:25 -0700 | [diff] [blame] | 208 | } |
| 209 | |
Ihab Awad | b8e85c7 | 2014-08-23 20:34:57 -0700 | [diff] [blame] | 210 | public final List<String> getConferenceableConnectionIds() { |
| 211 | return mConferenceableConnectionIds; |
| 212 | } |
| 213 | |
Santos Cordon | 6b7f955 | 2015-05-27 17:21:45 -0700 | [diff] [blame] | 214 | public final Bundle getExtras() { |
| 215 | return mExtras; |
| 216 | } |
| 217 | |
Tyler Gunn | 78da781 | 2017-05-09 14:34:57 -0700 | [diff] [blame] | 218 | public final String getParentCallId() { |
| 219 | return mParentCallId; |
| 220 | } |
| 221 | |
Santos Cordon | 7c7bc7f | 2014-07-28 18:15:48 -0700 | [diff] [blame] | 222 | @Override |
| 223 | public String toString() { |
| 224 | return new StringBuilder() |
| 225 | .append("ParcelableConnection [act:") |
| 226 | .append(mPhoneAccount) |
Santos Cordon | 6b7f955 | 2015-05-27 17:21:45 -0700 | [diff] [blame] | 227 | .append("], state:") |
Santos Cordon | 7c7bc7f | 2014-07-28 18:15:48 -0700 | [diff] [blame] | 228 | .append(mState) |
| 229 | .append(", capabilities:") |
Ihab Awad | 5c9c86e | 2014-11-12 13:41:16 -0800 | [diff] [blame] | 230 | .append(Connection.capabilitiesToString(mConnectionCapabilities)) |
Tyler Gunn | 720c664 | 2016-03-22 09:02:47 -0700 | [diff] [blame] | 231 | .append(", properties:") |
| 232 | .append(Connection.propertiesToString(mConnectionProperties)) |
Santos Cordon | 6b7f955 | 2015-05-27 17:21:45 -0700 | [diff] [blame] | 233 | .append(", extras:") |
| 234 | .append(mExtras) |
Tyler Gunn | 78da781 | 2017-05-09 14:34:57 -0700 | [diff] [blame] | 235 | .append(", parent:") |
| 236 | .append(mParentCallId) |
Santos Cordon | 7c7bc7f | 2014-07-28 18:15:48 -0700 | [diff] [blame] | 237 | .toString(); |
| 238 | } |
| 239 | |
Jeff Sharkey | 9e8f83d | 2019-02-28 12:06:45 -0700 | [diff] [blame] | 240 | public static final @android.annotation.NonNull Parcelable.Creator<ParcelableConnection> CREATOR = |
Santos Cordon | e8dc4be | 2014-07-21 01:28:28 -0700 | [diff] [blame] | 241 | new Parcelable.Creator<ParcelableConnection> () { |
| 242 | @Override |
| 243 | public ParcelableConnection createFromParcel(Parcel source) { |
| 244 | ClassLoader classLoader = ParcelableConnection.class.getClassLoader(); |
| 245 | |
| 246 | PhoneAccountHandle phoneAccount = source.readParcelable(classLoader); |
| 247 | int state = source.readInt(); |
| 248 | int capabilities = source.readInt(); |
Andrew Lee | 100e293 | 2014-09-08 15:34:24 -0700 | [diff] [blame] | 249 | Uri address = source.readParcelable(classLoader); |
| 250 | int addressPresentation = source.readInt(); |
Santos Cordon | e8dc4be | 2014-07-21 01:28:28 -0700 | [diff] [blame] | 251 | String callerDisplayName = source.readString(); |
| 252 | int callerDisplayNamePresentation = source.readInt(); |
Ihab Awad | b19a0bc | 2014-08-07 19:46:01 -0700 | [diff] [blame] | 253 | IVideoProvider videoCallProvider = |
| 254 | IVideoProvider.Stub.asInterface(source.readStrongBinder()); |
Santos Cordon | e8dc4be | 2014-07-21 01:28:28 -0700 | [diff] [blame] | 255 | int videoState = source.readInt(); |
Andrew Lee | 100e293 | 2014-09-08 15:34:24 -0700 | [diff] [blame] | 256 | boolean ringbackRequested = source.readByte() == 1; |
Sailesh Nepal | 8b9d3ca | 2014-08-14 17:39:34 -0700 | [diff] [blame] | 257 | boolean audioModeIsVoip = source.readByte() == 1; |
Roshan Pius | e927ec0 | 2015-07-15 15:47:21 -0700 | [diff] [blame] | 258 | long connectTimeMillis = source.readLong(); |
Sailesh Nepal | 8b9d3ca | 2014-08-14 17:39:34 -0700 | [diff] [blame] | 259 | StatusHints statusHints = source.readParcelable(classLoader); |
Andrew Lee | 7f3d41f | 2014-09-11 17:33:16 -0700 | [diff] [blame] | 260 | DisconnectCause disconnectCause = source.readParcelable(classLoader); |
Ihab Awad | b8e85c7 | 2014-08-23 20:34:57 -0700 | [diff] [blame] | 261 | List<String> conferenceableConnectionIds = new ArrayList<>(); |
| 262 | source.readStringList(conferenceableConnectionIds); |
Jeff Sharkey | f0ec2e0 | 2016-03-21 12:37:54 -0600 | [diff] [blame] | 263 | Bundle extras = Bundle.setDefusable(source.readBundle(classLoader), true); |
Tyler Gunn | 720c664 | 2016-03-22 09:02:47 -0700 | [diff] [blame] | 264 | int properties = source.readInt(); |
Christine Hallstrom | 4e22d6d | 2016-11-30 16:06:42 -0800 | [diff] [blame] | 265 | int supportedAudioRoutes = source.readInt(); |
Tyler Gunn | 78da781 | 2017-05-09 14:34:57 -0700 | [diff] [blame] | 266 | String parentCallId = source.readString(); |
Tyler Gunn | b2f875b | 2017-08-04 09:27:26 -0700 | [diff] [blame] | 267 | long connectElapsedTimeMillis = source.readLong(); |
Santos Cordon | e8dc4be | 2014-07-21 01:28:28 -0700 | [diff] [blame] | 268 | |
| 269 | return new ParcelableConnection( |
| 270 | phoneAccount, |
| 271 | state, |
| 272 | capabilities, |
Tyler Gunn | 720c664 | 2016-03-22 09:02:47 -0700 | [diff] [blame] | 273 | properties, |
Christine Hallstrom | 4e22d6d | 2016-11-30 16:06:42 -0800 | [diff] [blame] | 274 | supportedAudioRoutes, |
Andrew Lee | 100e293 | 2014-09-08 15:34:24 -0700 | [diff] [blame] | 275 | address, |
| 276 | addressPresentation, |
Santos Cordon | e8dc4be | 2014-07-21 01:28:28 -0700 | [diff] [blame] | 277 | callerDisplayName, |
| 278 | callerDisplayNamePresentation, |
Andrew Lee | 50aca23 | 2014-07-22 16:41:54 -0700 | [diff] [blame] | 279 | videoCallProvider, |
Sailesh Nepal | 8b9d3ca | 2014-08-14 17:39:34 -0700 | [diff] [blame] | 280 | videoState, |
Andrew Lee | 100e293 | 2014-09-08 15:34:24 -0700 | [diff] [blame] | 281 | ringbackRequested, |
Sailesh Nepal | 8b9d3ca | 2014-08-14 17:39:34 -0700 | [diff] [blame] | 282 | audioModeIsVoip, |
Roshan Pius | e927ec0 | 2015-07-15 15:47:21 -0700 | [diff] [blame] | 283 | connectTimeMillis, |
Tyler Gunn | b2f875b | 2017-08-04 09:27:26 -0700 | [diff] [blame] | 284 | connectElapsedTimeMillis, |
Ihab Awad | 6107bab | 2014-08-18 09:23:25 -0700 | [diff] [blame] | 285 | statusHints, |
Andrew Lee | 7f3d41f | 2014-09-11 17:33:16 -0700 | [diff] [blame] | 286 | disconnectCause, |
Santos Cordon | 6b7f955 | 2015-05-27 17:21:45 -0700 | [diff] [blame] | 287 | conferenceableConnectionIds, |
Tyler Gunn | 78da781 | 2017-05-09 14:34:57 -0700 | [diff] [blame] | 288 | extras, |
| 289 | parentCallId); |
Santos Cordon | e8dc4be | 2014-07-21 01:28:28 -0700 | [diff] [blame] | 290 | } |
| 291 | |
| 292 | @Override |
| 293 | public ParcelableConnection[] newArray(int size) { |
| 294 | return new ParcelableConnection[size]; |
| 295 | } |
| 296 | }; |
| 297 | |
| 298 | /** {@inheritDoc} */ |
| 299 | @Override |
| 300 | public int describeContents() { |
| 301 | return 0; |
| 302 | } |
| 303 | |
| 304 | /** Writes ParcelableConnection object into a Parcel. */ |
| 305 | @Override |
| 306 | public void writeToParcel(Parcel destination, int flags) { |
| 307 | destination.writeParcelable(mPhoneAccount, 0); |
| 308 | destination.writeInt(mState); |
Ihab Awad | 5c9c86e | 2014-11-12 13:41:16 -0800 | [diff] [blame] | 309 | destination.writeInt(mConnectionCapabilities); |
Andrew Lee | 100e293 | 2014-09-08 15:34:24 -0700 | [diff] [blame] | 310 | destination.writeParcelable(mAddress, 0); |
| 311 | destination.writeInt(mAddressPresentation); |
Santos Cordon | e8dc4be | 2014-07-21 01:28:28 -0700 | [diff] [blame] | 312 | destination.writeString(mCallerDisplayName); |
| 313 | destination.writeInt(mCallerDisplayNamePresentation); |
| 314 | destination.writeStrongBinder( |
Ihab Awad | b19a0bc | 2014-08-07 19:46:01 -0700 | [diff] [blame] | 315 | mVideoProvider != null ? mVideoProvider.asBinder() : null); |
Santos Cordon | e8dc4be | 2014-07-21 01:28:28 -0700 | [diff] [blame] | 316 | destination.writeInt(mVideoState); |
Andrew Lee | 100e293 | 2014-09-08 15:34:24 -0700 | [diff] [blame] | 317 | destination.writeByte((byte) (mRingbackRequested ? 1 : 0)); |
| 318 | destination.writeByte((byte) (mIsVoipAudioMode ? 1 : 0)); |
Roshan Pius | e927ec0 | 2015-07-15 15:47:21 -0700 | [diff] [blame] | 319 | destination.writeLong(mConnectTimeMillis); |
Sailesh Nepal | 8b9d3ca | 2014-08-14 17:39:34 -0700 | [diff] [blame] | 320 | destination.writeParcelable(mStatusHints, 0); |
Andrew Lee | 7f3d41f | 2014-09-11 17:33:16 -0700 | [diff] [blame] | 321 | destination.writeParcelable(mDisconnectCause, 0); |
Ihab Awad | b8e85c7 | 2014-08-23 20:34:57 -0700 | [diff] [blame] | 322 | destination.writeStringList(mConferenceableConnectionIds); |
Santos Cordon | 6b7f955 | 2015-05-27 17:21:45 -0700 | [diff] [blame] | 323 | destination.writeBundle(mExtras); |
Tyler Gunn | 720c664 | 2016-03-22 09:02:47 -0700 | [diff] [blame] | 324 | destination.writeInt(mConnectionProperties); |
Christine Hallstrom | 4e22d6d | 2016-11-30 16:06:42 -0800 | [diff] [blame] | 325 | destination.writeInt(mSupportedAudioRoutes); |
Tyler Gunn | 78da781 | 2017-05-09 14:34:57 -0700 | [diff] [blame] | 326 | destination.writeString(mParentCallId); |
Tyler Gunn | b2f875b | 2017-08-04 09:27:26 -0700 | [diff] [blame] | 327 | destination.writeLong(mConnectElapsedTimeMillis); |
Santos Cordon | e8dc4be | 2014-07-21 01:28:28 -0700 | [diff] [blame] | 328 | } |
| 329 | } |