1 /* 2 * Copyright (C) 2006 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 17 package com.android.internal.telephony; 18 19 /** 20 * TODO: This should probably not be an interface see 21 * http://www.javaworld.com/javaworld/javaqa/2001-06/01-qa-0608-constants.html and google with 22 * http://www.google.com/search?q=interface+constants&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:en-US:unofficial&client=firefox-a 23 * 24 * Also they should all probably be static final. 25 */ 26 27 /** 28 * {@hide} 29 */ 30 public interface RILConstants { 31 // From the top of ril.cpp 32 int RIL_ERRNO_INVALID_RESPONSE = -1; 33 34 int MAX_INT = 0x7FFFFFFF; 35 36 // from RIL_Errno 37 int SUCCESS = 0; 38 int RADIO_NOT_AVAILABLE = 1; /* If radio did not start or is resetting */ 39 int GENERIC_FAILURE = 2; 40 int PASSWORD_INCORRECT = 3; /* for PIN/PIN2 methods only! */ 41 int SIM_PIN2 = 4; /* Operation requires SIM PIN2 to be entered */ 42 int SIM_PUK2 = 5; /* Operation requires SIM PIN2 to be entered */ 43 int REQUEST_NOT_SUPPORTED = 6; 44 int REQUEST_CANCELLED = 7; 45 int OP_NOT_ALLOWED_DURING_VOICE_CALL = 8; /* data operation is not allowed during voice call in 46 class C */ 47 int OP_NOT_ALLOWED_BEFORE_REG_NW = 9; /* request is not allowed before device registers to 48 network */ 49 int SMS_SEND_FAIL_RETRY = 10; /* send sms fail and need retry */ 50 int SIM_ABSENT = 11; /* ICC card is absent */ 51 int SUBSCRIPTION_NOT_AVAILABLE = 12; /* fail to find CDMA subscription from specified 52 location */ 53 int MODE_NOT_SUPPORTED = 13; /* HW does not support preferred network type */ 54 int FDN_CHECK_FAILURE = 14; /* send operation barred error when FDN is enabled */ 55 int ILLEGAL_SIM_OR_ME = 15; /* network selection failure due 56 to wrong SIM/ME and no 57 retries needed */ 58 59 /* NETWORK_MODE_* See ril.h RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE */ 60 int NETWORK_MODE_WCDMA_PREF = 0; /* GSM/WCDMA (WCDMA preferred) */ 61 int NETWORK_MODE_GSM_ONLY = 1; /* GSM only */ 62 int NETWORK_MODE_WCDMA_ONLY = 2; /* WCDMA only */ 63 int NETWORK_MODE_GSM_UMTS = 3; /* GSM/WCDMA (auto mode, according to PRL) 64 AVAILABLE Application Settings menu*/ 65 int NETWORK_MODE_CDMA = 4; /* CDMA and EvDo (auto mode, according to PRL) 66 AVAILABLE Application Settings menu*/ 67 int NETWORK_MODE_CDMA_NO_EVDO = 5; /* CDMA only */ 68 int NETWORK_MODE_EVDO_NO_CDMA = 6; /* EvDo only */ 69 int NETWORK_MODE_GLOBAL = 7; /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) 70 AVAILABLE Application Settings menu*/ 71 int NETWORK_MODE_LTE_CDMA_EVDO = 8; /* LTE, CDMA and EvDo */ 72 int NETWORK_MODE_LTE_GSM_WCDMA = 9; /* LTE, GSM/WCDMA */ 73 int NETWORK_MODE_LTE_CMDA_EVDO_GSM_WCDMA = 10; /* LTE, CDMA, EvDo, GSM/WCDMA */ 74 int NETWORK_MODE_LTE_ONLY = 11; /* LTE Only mode. */ 75 76 int PREFERRED_NETWORK_MODE = NETWORK_MODE_WCDMA_PREF; 77 78 /* CDMA subscription source. See ril.h RIL_REQUEST_CDMA_SET_SUBSCRIPTION */ 79 int SUBSCRIPTION_FROM_RUIM = 0; /* CDMA subscription from RUIM when available */ 80 int SUBSCRIPTION_FROM_NV = 1; /* CDMA subscription from NV */ 81 int PREFERRED_CDMA_SUBSCRIPTION = SUBSCRIPTION_FROM_NV; 82 83 int CDMA_CELL_BROADCAST_SMS_DISABLED = 1; 84 int CDMA_CELL_BROADCAST_SMS_ENABLED = 0; 85 86 int NO_PHONE = 0; 87 int GSM_PHONE = 1; 88 int CDMA_PHONE = 2; 89 int SIP_PHONE = 3; 90 91 int LTE_ON_CDMA_UNKNOWN = -1; 92 int LTE_ON_CDMA_FALSE = 0; 93 int LTE_ON_CDMA_TRUE = 1; 94 95 int CDM_TTY_MODE_DISABLED = 0; 96 int CDM_TTY_MODE_ENABLED = 1; 97 98 int CDM_TTY_FULL_MODE = 1; 99 int CDM_TTY_HCO_MODE = 2; 100 int CDM_TTY_VCO_MODE = 3; 101 102 /* Setup a packet data connection. See ril.h RIL_REQUEST_SETUP_DATA_CALL */ 103 int SETUP_DATA_TECH_CDMA = 0; 104 int SETUP_DATA_TECH_GSM = 1; 105 106 int SETUP_DATA_AUTH_NONE = 0; 107 int SETUP_DATA_AUTH_PAP = 1; 108 int SETUP_DATA_AUTH_CHAP = 2; 109 int SETUP_DATA_AUTH_PAP_CHAP = 3; 110 111 String SETUP_DATA_PROTOCOL_IP = "IP"; 112 String SETUP_DATA_PROTOCOL_IPV6 = "IPV6"; 113 String SETUP_DATA_PROTOCOL_IPV4V6 = "IPV4V6"; 114 115 /* Deactivate data call reasons */ 116 int DEACTIVATE_REASON_NONE = 0; 117 int DEACTIVATE_REASON_RADIO_OFF = 1; 118 int DEACTIVATE_REASON_PDP_RESET = 2; 119 120 /* 121 cat include/telephony/ril.h | \ 122 egrep '^#define' | \ 123 sed -re 's/^#define +([^ ]+)* +([^ ]+)/ int \1 = \2;/' \ 124 >>java/android/com.android.internal.telephony/gsm/RILConstants.java 125 */ 126 127 /** 128 * No restriction at all including voice/SMS/USSD/SS/AV64 129 * and packet data. 130 */ 131 int RIL_RESTRICTED_STATE_NONE = 0x00; 132 /** 133 * Block emergency call due to restriction. 134 * But allow all normal voice/SMS/USSD/SS/AV64. 135 */ 136 int RIL_RESTRICTED_STATE_CS_EMERGENCY = 0x01; 137 /** 138 * Block all normal voice/SMS/USSD/SS/AV64 due to restriction. 139 * Only Emergency call allowed. 140 */ 141 int RIL_RESTRICTED_STATE_CS_NORMAL = 0x02; 142 /** 143 * Block all voice/SMS/USSD/SS/AV64 144 * including emergency call due to restriction. 145 */ 146 int RIL_RESTRICTED_STATE_CS_ALL = 0x04; 147 /** 148 * Block packet data access due to restriction. 149 */ 150 int RIL_RESTRICTED_STATE_PS_ALL = 0x10; 151 152 /** Data profile for RIL_REQUEST_SETUP_DATA_CALL */ 153 public static final int DATA_PROFILE_DEFAULT = 0; 154 public static final int DATA_PROFILE_TETHERED = 1; 155 public static final int DATA_PROFILE_IMS = 2; 156 public static final int DATA_PROFILE_FOTA = 3; 157 public static final int DATA_PROFILE_CBS = 4; 158 public static final int DATA_PROFILE_OEM_BASE = 1000; 159 160 int RIL_REQUEST_GET_SIM_STATUS = 1; 161 int RIL_REQUEST_ENTER_SIM_PIN = 2; 162 int RIL_REQUEST_ENTER_SIM_PUK = 3; 163 int RIL_REQUEST_ENTER_SIM_PIN2 = 4; 164 int RIL_REQUEST_ENTER_SIM_PUK2 = 5; 165 int RIL_REQUEST_CHANGE_SIM_PIN = 6; 166 int RIL_REQUEST_CHANGE_SIM_PIN2 = 7; 167 int RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION = 8; 168 int RIL_REQUEST_GET_CURRENT_CALLS = 9; 169 int RIL_REQUEST_DIAL = 10; 170 int RIL_REQUEST_GET_IMSI = 11; 171 int RIL_REQUEST_HANGUP = 12; 172 int RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND = 13; 173 int RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND = 14; 174 int RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE = 15; 175 int RIL_REQUEST_CONFERENCE = 16; 176 int RIL_REQUEST_UDUB = 17; 177 int RIL_REQUEST_LAST_CALL_FAIL_CAUSE = 18; 178 int RIL_REQUEST_SIGNAL_STRENGTH = 19; 179 int RIL_REQUEST_VOICE_REGISTRATION_STATE = 20; 180 int RIL_REQUEST_DATA_REGISTRATION_STATE = 21; 181 int RIL_REQUEST_OPERATOR = 22; 182 int RIL_REQUEST_RADIO_POWER = 23; 183 int RIL_REQUEST_DTMF = 24; 184 int RIL_REQUEST_SEND_SMS = 25; 185 int RIL_REQUEST_SEND_SMS_EXPECT_MORE = 26; 186 int RIL_REQUEST_SETUP_DATA_CALL = 27; 187 int RIL_REQUEST_SIM_IO = 28; 188 int RIL_REQUEST_SEND_USSD = 29; 189 int RIL_REQUEST_CANCEL_USSD = 30; 190 int RIL_REQUEST_GET_CLIR = 31; 191 int RIL_REQUEST_SET_CLIR = 32; 192 int RIL_REQUEST_QUERY_CALL_FORWARD_STATUS = 33; 193 int RIL_REQUEST_SET_CALL_FORWARD = 34; 194 int RIL_REQUEST_QUERY_CALL_WAITING = 35; 195 int RIL_REQUEST_SET_CALL_WAITING = 36; 196 int RIL_REQUEST_SMS_ACKNOWLEDGE = 37; 197 int RIL_REQUEST_GET_IMEI = 38; 198 int RIL_REQUEST_GET_IMEISV = 39; 199 int RIL_REQUEST_ANSWER = 40; 200 int RIL_REQUEST_DEACTIVATE_DATA_CALL = 41; 201 int RIL_REQUEST_QUERY_FACILITY_LOCK = 42; 202 int RIL_REQUEST_SET_FACILITY_LOCK = 43; 203 int RIL_REQUEST_CHANGE_BARRING_PASSWORD = 44; 204 int RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE = 45; 205 int RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC = 46; 206 int RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL = 47; 207 int RIL_REQUEST_QUERY_AVAILABLE_NETWORKS = 48; 208 int RIL_REQUEST_DTMF_START = 49; 209 int RIL_REQUEST_DTMF_STOP = 50; 210 int RIL_REQUEST_BASEBAND_VERSION = 51; 211 int RIL_REQUEST_SEPARATE_CONNECTION = 52; 212 int RIL_REQUEST_SET_MUTE = 53; 213 int RIL_REQUEST_GET_MUTE = 54; 214 int RIL_REQUEST_QUERY_CLIP = 55; 215 int RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE = 56; 216 int RIL_REQUEST_DATA_CALL_LIST = 57; 217 int RIL_REQUEST_RESET_RADIO = 58; 218 int RIL_REQUEST_OEM_HOOK_RAW = 59; 219 int RIL_REQUEST_OEM_HOOK_STRINGS = 60; 220 int RIL_REQUEST_SCREEN_STATE = 61; 221 int RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION = 62; 222 int RIL_REQUEST_WRITE_SMS_TO_SIM = 63; 223 int RIL_REQUEST_DELETE_SMS_ON_SIM = 64; 224 int RIL_REQUEST_SET_BAND_MODE = 65; 225 int RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE = 66; 226 int RIL_REQUEST_STK_GET_PROFILE = 67; 227 int RIL_REQUEST_STK_SET_PROFILE = 68; 228 int RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND = 69; 229 int RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE = 70; 230 int RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM = 71; 231 int RIL_REQUEST_EXPLICIT_CALL_TRANSFER = 72; 232 int RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE = 73; 233 int RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE = 74; 234 int RIL_REQUEST_GET_NEIGHBORING_CELL_IDS = 75; 235 int RIL_REQUEST_SET_LOCATION_UPDATES = 76; 236 int RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE = 77; 237 int RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE = 78; 238 int RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE = 79; 239 int RIL_REQUEST_SET_TTY_MODE = 80; 240 int RIL_REQUEST_QUERY_TTY_MODE = 81; 241 int RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE = 82; 242 int RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE = 83; 243 int RIL_REQUEST_CDMA_FLASH = 84; 244 int RIL_REQUEST_CDMA_BURST_DTMF = 85; 245 int RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY = 86; 246 int RIL_REQUEST_CDMA_SEND_SMS = 87; 247 int RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE = 88; 248 int RIL_REQUEST_GSM_GET_BROADCAST_CONFIG = 89; 249 int RIL_REQUEST_GSM_SET_BROADCAST_CONFIG = 90; 250 int RIL_REQUEST_GSM_BROADCAST_ACTIVATION = 91; 251 int RIL_REQUEST_CDMA_GET_BROADCAST_CONFIG = 92; 252 int RIL_REQUEST_CDMA_SET_BROADCAST_CONFIG = 93; 253 int RIL_REQUEST_CDMA_BROADCAST_ACTIVATION = 94; 254 int RIL_REQUEST_CDMA_SUBSCRIPTION = 95; 255 int RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM = 96; 256 int RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM = 97; 257 int RIL_REQUEST_DEVICE_IDENTITY = 98; 258 int RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE = 99; 259 int RIL_REQUEST_GET_SMSC_ADDRESS = 100; 260 int RIL_REQUEST_SET_SMSC_ADDRESS = 101; 261 int RIL_REQUEST_REPORT_SMS_MEMORY_STATUS = 102; 262 int RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING = 103; 263 int RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE = 104; 264 int RIL_REQUEST_ISIM_AUTHENTICATION = 105; 265 int RIL_UNSOL_RESPONSE_BASE = 1000; 266 int RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED = 1000; 267 int RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED = 1001; 268 int RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED = 1002; 269 int RIL_UNSOL_RESPONSE_NEW_SMS = 1003; 270 int RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT = 1004; 271 int RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM = 1005; 272 int RIL_UNSOL_ON_USSD = 1006; 273 int RIL_UNSOL_ON_USSD_REQUEST = 1007; 274 int RIL_UNSOL_NITZ_TIME_RECEIVED = 1008; 275 int RIL_UNSOL_SIGNAL_STRENGTH = 1009; 276 int RIL_UNSOL_DATA_CALL_LIST_CHANGED = 1010; 277 int RIL_UNSOL_SUPP_SVC_NOTIFICATION = 1011; 278 int RIL_UNSOL_STK_SESSION_END = 1012; 279 int RIL_UNSOL_STK_PROACTIVE_COMMAND = 1013; 280 int RIL_UNSOL_STK_EVENT_NOTIFY = 1014; 281 int RIL_UNSOL_STK_CALL_SETUP = 1015; 282 int RIL_UNSOL_SIM_SMS_STORAGE_FULL = 1016; 283 int RIL_UNSOL_SIM_REFRESH = 1017; 284 int RIL_UNSOL_CALL_RING = 1018; 285 int RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED = 1019; 286 int RIL_UNSOL_RESPONSE_CDMA_NEW_SMS = 1020; 287 int RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS = 1021; 288 int RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL = 1022; 289 int RIL_UNSOL_RESTRICTED_STATE_CHANGED = 1023; 290 int RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE = 1024; 291 int RIL_UNSOL_CDMA_CALL_WAITING = 1025; 292 int RIL_UNSOL_CDMA_OTA_PROVISION_STATUS = 1026; 293 int RIL_UNSOL_CDMA_INFO_REC = 1027; 294 int RIL_UNSOL_OEM_HOOK_RAW = 1028; 295 int RIL_UNSOL_RINGBACK_TONE = 1029; 296 int RIL_UNSOL_RESEND_INCALL_MUTE = 1030; 297 int RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED = 1031; 298 int RIL_UNSOl_CDMA_PRL_CHANGED = 1032; 299 int RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE = 1033; 300 int RIL_UNSOL_RIL_CONNECTED = 1034; 301 } 302