Move to Android N-MR1 SDK.
[android_tools.git] / sdk / sources / android-25 / com / android / internal / telephony / cat / ResultCode.java
blobf001c7e1356b0c6e007fbaa1016afd116d9eba19
1 /*
2 * Copyright (C) 2006 The Android Open Source Project
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package com.android.internal.telephony.cat;
20 /**
21 * Enumeration for the return code in TERMINAL RESPONSE.
22 * To get the actual return code for each enum value, call {@link #value}
23 * method.
25 * {@hide}
27 public enum ResultCode {
30 * Results '0X' and '1X' indicate that the command has been performed.
33 /** Command performed successfully */
34 OK(0x00),
36 /** Command performed with partial comprehension */
37 PRFRMD_WITH_PARTIAL_COMPREHENSION(0x01),
39 /** Command performed, with missing information */
40 PRFRMD_WITH_MISSING_INFO(0x02),
42 /** REFRESH performed with additional EFs read */
43 PRFRMD_WITH_ADDITIONAL_EFS_READ(0x03),
45 /**
46 * Command performed successfully, but requested icon could not be
47 * displayed
49 PRFRMD_ICON_NOT_DISPLAYED(0x04),
51 /** Command performed, but modified by call control by NAA */
52 PRFRMD_MODIFIED_BY_NAA(0x05),
54 /** Command performed successfully, limited service */
55 PRFRMD_LIMITED_SERVICE(0x06),
57 /** Command performed with modification */
58 PRFRMD_WITH_MODIFICATION(0x07),
60 /** REFRESH performed but indicated NAA was not active */
61 PRFRMD_NAA_NOT_ACTIVE(0x08),
63 /** Command performed successfully, tone not played */
64 PRFRMD_TONE_NOT_PLAYED(0x09),
66 /** Proactive UICC session terminated by the user */
67 UICC_SESSION_TERM_BY_USER(0x10),
69 /** Backward move in the proactive UICC session requested by the user */
70 BACKWARD_MOVE_BY_USER(0x11),
72 /** No response from user */
73 NO_RESPONSE_FROM_USER(0x12),
75 /** Help information required by the user */
76 HELP_INFO_REQUIRED(0x13),
78 /** USSD or SS transaction terminated by the user */
79 USSD_SS_SESSION_TERM_BY_USER(0x14),
83 * Results '2X' indicate to the UICC that it may be worth re-trying the
84 * command at a later opportunity.
87 /** Terminal currently unable to process command */
88 TERMINAL_CRNTLY_UNABLE_TO_PROCESS(0x20),
90 /** Network currently unable to process command */
91 NETWORK_CRNTLY_UNABLE_TO_PROCESS(0x21),
93 /** User did not accept the proactive command */
94 USER_NOT_ACCEPT(0x22),
96 /** User cleared down call before connection or network release */
97 USER_CLEAR_DOWN_CALL(0x23),
99 /** Action in contradiction with the current timer state */
100 CONTRADICTION_WITH_TIMER(0x24),
102 /** Interaction with call control by NAA, temporary problem */
103 NAA_CALL_CONTROL_TEMPORARY(0x25),
105 /** Launch browser generic error code */
106 LAUNCH_BROWSER_ERROR(0x26),
108 /** MMS temporary problem. */
109 MMS_TEMPORARY(0x27),
113 * Results '3X' indicate that it is not worth the UICC re-trying with an
114 * identical command, as it will only get the same response. However, the
115 * decision to retry lies with the application.
118 /** Command beyond terminal's capabilities */
119 BEYOND_TERMINAL_CAPABILITY(0x30),
121 /** Command type not understood by terminal */
122 CMD_TYPE_NOT_UNDERSTOOD(0x31),
124 /** Command data not understood by terminal */
125 CMD_DATA_NOT_UNDERSTOOD(0x32),
127 /** Command number not known by terminal */
128 CMD_NUM_NOT_KNOWN(0x33),
130 /** SS Return Error */
131 SS_RETURN_ERROR(0x34),
133 /** SMS RP-ERROR */
134 SMS_RP_ERROR(0x35),
136 /** Error, required values are missing */
137 REQUIRED_VALUES_MISSING(0x36),
139 /** USSD Return Error */
140 USSD_RETURN_ERROR(0x37),
142 /** MultipleCard commands error */
143 MULTI_CARDS_CMD_ERROR(0x38),
146 * Interaction with call control by USIM or MO short message control by
147 * USIM, permanent problem
149 USIM_CALL_CONTROL_PERMANENT(0x39),
151 /** Bearer Independent Protocol error */
152 BIP_ERROR(0x3a),
154 /** Access Technology unable to process command */
155 ACCESS_TECH_UNABLE_TO_PROCESS(0x3b),
157 /** Frames error */
158 FRAMES_ERROR(0x3c),
160 /** MMS Error */
161 MMS_ERROR(0x3d);
164 private int mCode;
166 ResultCode(int code) {
167 mCode = code;
171 * Retrieves the actual result code that this object represents.
172 * @return Actual result code
174 public int value() {
175 return mCode;
178 public static ResultCode fromInt(int value) {
179 for (ResultCode r : ResultCode.values()) {
180 if (r.mCode == value) {
181 return r;
184 return null;