1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482
|
/*
* Copyright (c) 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.ims;
import android.os.Parcel;
import android.os.Parcelable;
/**
* This class enables an application to get details on why a method call failed.
*
* @hide
*/
public class ImsReasonInfo implements Parcelable {
/**
* Specific code of each types
*/
public static final int CODE_UNSPECIFIED = 0;
/**
* LOCAL
*/
// IMS -> Telephony
// The passed argument is an invalid
public static final int CODE_LOCAL_ILLEGAL_ARGUMENT = 101;
// The operation is invoked in invalid call state
public static final int CODE_LOCAL_ILLEGAL_STATE = 102;
// IMS service internal error
public static final int CODE_LOCAL_INTERNAL_ERROR = 103;
// IMS service goes down (service connection is lost)
public static final int CODE_LOCAL_IMS_SERVICE_DOWN = 106;
// No pending incoming call exists
public static final int CODE_LOCAL_NO_PENDING_CALL = 107;
// IMS Call ended during conference merge process
public static final int CODE_LOCAL_ENDED_BY_CONFERENCE_MERGE = 108;
// IMS -> Telephony
// Service unavailable; by power off
public static final int CODE_LOCAL_POWER_OFF = 111;
// Service unavailable; by low battery
public static final int CODE_LOCAL_LOW_BATTERY = 112;
// Service unavailable; by out of service (data service state)
public static final int CODE_LOCAL_NETWORK_NO_SERVICE = 121;
// Service unavailable; by no LTE coverage
// (VoLTE is not supported even though IMS is registered)
public static final int CODE_LOCAL_NETWORK_NO_LTE_COVERAGE = 122;
// Service unavailable; by located in roaming area
public static final int CODE_LOCAL_NETWORK_ROAMING = 123;
// Service unavailable; by IP changed
public static final int CODE_LOCAL_NETWORK_IP_CHANGED = 124;
// Service unavailable; other
public static final int CODE_LOCAL_SERVICE_UNAVAILABLE = 131;
// Service unavailable; IMS connection is lost (IMS is not registered)
public static final int CODE_LOCAL_NOT_REGISTERED = 132;
// IMS <-> Telephony
// Max call exceeded
public static final int CODE_LOCAL_CALL_EXCEEDED = 141;
// IMS <- Telephony
// Call busy
public static final int CODE_LOCAL_CALL_BUSY = 142;
// Call decline
public static final int CODE_LOCAL_CALL_DECLINE = 143;
// IMS -> Telephony
// SRVCC is in progress
public static final int CODE_LOCAL_CALL_VCC_ON_PROGRESSING = 144;
// Resource reservation is failed (QoS precondition)
public static final int CODE_LOCAL_CALL_RESOURCE_RESERVATION_FAILED = 145;
// Retry CS call; VoLTE service can't be provided by the network or remote end
// Resolve the extra code(EXTRA_CODE_CALL_RETRY_*) if the below code is set
public static final int CODE_LOCAL_CALL_CS_RETRY_REQUIRED = 146;
// Retry VoLTE call; VoLTE service can't be provided by the network temporarily
public static final int CODE_LOCAL_CALL_VOLTE_RETRY_REQUIRED = 147;
// IMS call is already terminated (in TERMINATED state)
public static final int CODE_LOCAL_CALL_TERMINATED = 148;
// Handover not feasible
public static final int CODE_LOCAL_HO_NOT_FEASIBLE = 149;
/**
* TIMEOUT (IMS -> Telephony)
*/
// 1xx waiting timer is expired after sending INVITE request (MO only)
public static final int CODE_TIMEOUT_1XX_WAITING = 201;
// User no answer during call setup operation (MO/MT)
// MO : 200 OK to INVITE request is not received,
// MT : No action from user after alerting the call
public static final int CODE_TIMEOUT_NO_ANSWER = 202;
// User no answer during call update operation (MO/MT)
// MO : 200 OK to re-INVITE request is not received,
// MT : No action from user after alerting the call
public static final int CODE_TIMEOUT_NO_ANSWER_CALL_UPDATE = 203;
//Call failures for FDN
public static final int CODE_FDN_BLOCKED = 241;
// Network does not accept the emergency call request because IMEI was used as identification
// and this capability is not supported by the network.
public static final int CODE_IMEI_NOT_ACCEPTED = 243;
/**
* STATUSCODE (SIP response code) (IMS -> Telephony)
*/
// 3xx responses
// SIP request is redirected
public static final int CODE_SIP_REDIRECTED = 321;
// 4xx responses
// 400 : Bad Request
public static final int CODE_SIP_BAD_REQUEST = 331;
// 403 : Forbidden
public static final int CODE_SIP_FORBIDDEN = 332;
// 404 : Not Found
public static final int CODE_SIP_NOT_FOUND = 333;
// 415 : Unsupported Media Type
// 416 : Unsupported URI Scheme
// 420 : Bad Extension
public static final int CODE_SIP_NOT_SUPPORTED = 334;
// 408 : Request Timeout
public static final int CODE_SIP_REQUEST_TIMEOUT = 335;
// 480 : Temporarily Unavailable
public static final int CODE_SIP_TEMPRARILY_UNAVAILABLE = 336;
// 484 : Address Incomplete
public static final int CODE_SIP_BAD_ADDRESS = 337;
// 486 : Busy Here
// 600 : Busy Everywhere
public static final int CODE_SIP_BUSY = 338;
// 487 : Request Terminated
public static final int CODE_SIP_REQUEST_CANCELLED = 339;
// 406 : Not Acceptable
// 488 : Not Acceptable Here
// 606 : Not Acceptable
public static final int CODE_SIP_NOT_ACCEPTABLE = 340;
// 410 : Gone
// 604 : Does Not Exist Anywhere
public static final int CODE_SIP_NOT_REACHABLE = 341;
// Others
public static final int CODE_SIP_CLIENT_ERROR = 342;
// 5xx responses
// 501 : Server Internal Error
public static final int CODE_SIP_SERVER_INTERNAL_ERROR = 351;
// 503 : Service Unavailable
public static final int CODE_SIP_SERVICE_UNAVAILABLE = 352;
// 504 : Server Time-out
public static final int CODE_SIP_SERVER_TIMEOUT = 353;
// Others
public static final int CODE_SIP_SERVER_ERROR = 354;
// 6xx responses
// 603 : Decline
public static final int CODE_SIP_USER_REJECTED = 361;
// Others
public static final int CODE_SIP_GLOBAL_ERROR = 362;
// Emergency failure
public static final int CODE_EMERGENCY_TEMP_FAILURE = 363;
public static final int CODE_EMERGENCY_PERM_FAILURE = 364;
/**
* MEDIA (IMS -> Telephony)
*/
// Media resource initialization failed
public static final int CODE_MEDIA_INIT_FAILED = 401;
// RTP timeout (no audio / video traffic in the session)
public static final int CODE_MEDIA_NO_DATA = 402;
// Media is not supported; so dropped the call
public static final int CODE_MEDIA_NOT_ACCEPTABLE = 403;
// Unknown media related errors
public static final int CODE_MEDIA_UNSPECIFIED = 404;
/**
* USER
*/
// Telephony -> IMS
// User triggers the call end
public static final int CODE_USER_TERMINATED = 501;
// No action while an incoming call is ringing
public static final int CODE_USER_NOANSWER = 502;
// User ignores an incoming call
public static final int CODE_USER_IGNORE = 503;
// User declines an incoming call
public static final int CODE_USER_DECLINE = 504;
// Device declines/ends a call due to low battery
public static final int CODE_LOW_BATTERY = 505;
// Device declines call due to blacklisted call ID
public static final int CODE_BLACKLISTED_CALL_ID = 506;
// IMS -> Telephony
// The call is terminated by the network or remote user
public static final int CODE_USER_TERMINATED_BY_REMOTE = 510;
/**
* Extra codes for the specific code value
* This value can be referred when the code is CODE_LOCAL_CALL_CS_RETRY_REQUIRED.
*/
// Try to connect CS call; normal
public static final int EXTRA_CODE_CALL_RETRY_NORMAL = 1;
// Try to connect CS call without the notification to user
public static final int EXTRA_CODE_CALL_RETRY_SILENT_REDIAL = 2;
// Try to connect CS call by the settings of the menu
public static final int EXTRA_CODE_CALL_RETRY_BY_SETTINGS = 3;
/**
* UT
*/
public static final int CODE_UT_NOT_SUPPORTED = 801;
public static final int CODE_UT_SERVICE_UNAVAILABLE = 802;
public static final int CODE_UT_OPERATION_NOT_ALLOWED = 803;
public static final int CODE_UT_NETWORK_ERROR = 804;
public static final int CODE_UT_CB_PASSWORD_MISMATCH = 821;
/**
* ECBM
*/
public static final int CODE_ECBM_NOT_SUPPORTED = 901;
/**
* Fail code used to indicate that Multi-endpoint is not supported by the Ims framework.
*/
public static final int CODE_MULTIENDPOINT_NOT_SUPPORTED = 902;
/**
* Ims Registration error code
*/
public static final int CODE_REGISTRATION_ERROR = 1000;
/**
* CALL DROP error codes (Call could drop because of many reasons like Network not available,
* handover, failed, etc)
*/
/**
* CALL DROP error code for the case when a device is ePDG capable and when the user is on an
* active wifi call and at the edge of coverage and there is no qualified LTE network available
* to handover the call to. We get a handover NOT_TRIGERRED message from the modem. This error
* code is received as part of the handover message.
*/
public static final int CODE_CALL_DROP_IWLAN_TO_LTE_UNAVAILABLE = 1100;
/**
* MT call has ended due to a release from the network
* because the call was answered elsewhere
*/
public static final int CODE_ANSWERED_ELSEWHERE = 1014;
/**
* For MultiEndpoint - Call Pull request has failed
*/
public static final int CODE_CALL_PULL_OUT_OF_SYNC = 1015;
/**
* For MultiEndpoint - Call has been pulled from primary to secondary
*/
public static final int CODE_CALL_END_CAUSE_CALL_PULL = 1016;
/**
* Supplementary services (HOLD/RESUME) failure error codes.
* Values for Supplemetary services failure - Failed, Cancelled and Re-Invite collision.
*/
public static final int CODE_SUPP_SVC_FAILED = 1201;
public static final int CODE_SUPP_SVC_CANCELLED = 1202;
public static final int CODE_SUPP_SVC_REINVITE_COLLISION = 1203;
/**
* DPD Procedure received no response or send failed
*/
public static final int CODE_IWLAN_DPD_FAILURE = 1300;
/**
* Establishment of the ePDG Tunnel Failed
*/
public static final int CODE_EPDG_TUNNEL_ESTABLISH_FAILURE = 1400;
/**
* Re-keying of the ePDG Tunnel Failed; may not always result in teardown
*/
public static final int CODE_EPDG_TUNNEL_REKEY_FAILURE = 1401;
/**
* Connection to the packet gateway is lost
*/
public static final int CODE_EPDG_TUNNEL_LOST_CONNECTION = 1402;
/**
* The maximum number of calls allowed has been reached. Used in a multi-endpoint scenario
* where the number of calls across all connected devices has reached the maximum.
*/
public static final int CODE_MAXIMUM_NUMBER_OF_CALLS_REACHED = 1403;
/**
* Similar to {@link #CODE_LOCAL_CALL_DECLINE}, except indicates that a remote device has
* declined the call. Used in a multi-endpoint scenario where a remote device declined an
* incoming call.
*/
public static final int CODE_REMOTE_CALL_DECLINE = 1404;
/**
* Indicates the call was disconnected due to the user reaching their data limit.
*/
public static final int CODE_DATA_LIMIT_REACHED = 1405;
/**
* Indicates the call was disconnected due to the user disabling cellular data.
*/
public static final int CODE_DATA_DISABLED = 1406;
/**
* Indicates a call was disconnected due to loss of wifi signal.
*/
public static final int CODE_WIFI_LOST = 1407;
/**
* Indicates the registration attempt on IWLAN failed due to IKEv2 authetication failure
* during tunnel establishment.
*/
public static final int CODE_IKEV2_AUTH_FAILURE = 1408;
/** The call cannot be established because RADIO is OFF */
public static final int CODE_RADIO_OFF = 1500;
/** The call cannot be established because of no valid SIM */
public static final int CODE_NO_VALID_SIM = 1501;
/** The failure is due internal error at modem */
public static final int CODE_RADIO_INTERNAL_ERROR = 1502;
/** The failure is due to UE timer expired while waiting for a response from network */
public static final int CODE_NETWORK_RESP_TIMEOUT = 1503;
/** The failure is due to explicit reject from network */
public static final int CODE_NETWORK_REJECT = 1504;
/** The failure is due to radio access failure. ex. RACH failure */
public static final int CODE_RADIO_ACCESS_FAILURE = 1505;
/** Call/IMS registration failed/dropped because of a RLF */
public static final int CODE_RADIO_LINK_FAILURE = 1506;
/** Call/IMS registration failed/dropped because of radio link lost */
public static final int CODE_RADIO_LINK_LOST = 1507;
/** The call Call/IMS registration failed because of a radio uplink issue */
public static final int CODE_RADIO_UPLINK_FAILURE = 1508;
/** Call failed because of a RRC connection setup failure */
public static final int CODE_RADIO_SETUP_FAILURE = 1509;
/** Call failed/dropped because of RRC connection release from NW */
public static final int CODE_RADIO_RELEASE_NORMAL = 1510;
/** Call failed/dropped because of RRC abnormally released by modem/network */
public static final int CODE_RADIO_RELEASE_ABNORMAL = 1511;
/** Call failed because of access class barring */
public static final int CODE_ACCESS_CLASS_BLOCKED = 1512;
/** Call/IMS registration is failed/dropped because of a network detach */
public static final int CODE_NETWORK_DETACH = 1513;
/* OEM specific error codes. To be used by OEMs when they don't want to
reveal error code which would be replaced by ERROR_UNSPECIFIED */
public static final int CODE_OEM_CAUSE_1 = 0xf001;
public static final int CODE_OEM_CAUSE_2 = 0xf002;
public static final int CODE_OEM_CAUSE_3 = 0xf003;
public static final int CODE_OEM_CAUSE_4 = 0xf004;
public static final int CODE_OEM_CAUSE_5 = 0xf005;
public static final int CODE_OEM_CAUSE_6 = 0xf006;
public static final int CODE_OEM_CAUSE_7 = 0xf007;
public static final int CODE_OEM_CAUSE_8 = 0xf008;
public static final int CODE_OEM_CAUSE_9 = 0xf009;
public static final int CODE_OEM_CAUSE_10 = 0xf00a;
public static final int CODE_OEM_CAUSE_11 = 0xf00b;
public static final int CODE_OEM_CAUSE_12 = 0xf00c;
public static final int CODE_OEM_CAUSE_13 = 0xf00d;
public static final int CODE_OEM_CAUSE_14 = 0xf00e;
public static final int CODE_OEM_CAUSE_15 = 0xf00f;
/**
* Network string error messages.
* mExtraMessage may have these values.
*/
public static final String EXTRA_MSG_SERVICE_NOT_AUTHORIZED
= "Forbidden. Not Authorized for Service";
// For main reason code
public int mCode;
// For the extra code value; it depends on the code value.
public int mExtraCode;
// For the additional message of the reason info.
public String mExtraMessage;
public ImsReasonInfo() {
mCode = CODE_UNSPECIFIED;
mExtraCode = CODE_UNSPECIFIED;
mExtraMessage = null;
}
public ImsReasonInfo(Parcel in) {
readFromParcel(in);
}
public ImsReasonInfo(int code, int extraCode) {
mCode = code;
mExtraCode = extraCode;
mExtraMessage = null;
}
public ImsReasonInfo(int code, int extraCode, String extraMessage) {
mCode = code;
mExtraCode = extraCode;
mExtraMessage = extraMessage;
}
/**
*
*/
public int getCode() {
return mCode;
}
/**
*
*/
public int getExtraCode() {
return mExtraCode;
}
/**
*
*/
public String getExtraMessage() {
return mExtraMessage;
}
/**
* Returns the string format of {@link ImsReasonInfo}
*
* @return the string format of {@link ImsReasonInfo}
*/
public String toString() {
return "ImsReasonInfo :: {" + mCode + ", " + mExtraCode + ", " + mExtraMessage + "}";
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel out, int flags) {
out.writeInt(mCode);
out.writeInt(mExtraCode);
out.writeString(mExtraMessage);
}
private void readFromParcel(Parcel in) {
mCode = in.readInt();
mExtraCode = in.readInt();
mExtraMessage = in.readString();
}
public static final Creator<ImsReasonInfo> CREATOR = new Creator<ImsReasonInfo>() {
@Override
public ImsReasonInfo createFromParcel(Parcel in) {
return new ImsReasonInfo(in);
}
@Override
public ImsReasonInfo[] newArray(int size) {
return new ImsReasonInfo[size];
}
};
}
|