2 * Copyright (C) 2016 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 android.hardware.radio@1.0;
19 enum RadioConst : int32_t {
21 RADIO_LAST_IMPRECISE_RIL_VERSION = 12,
22 RADIO_VERSION_MIN = 6,
23 RADIO_CDMA_ALPHA_INFO_BUFFER_LENGTH = 64,
24 RADIO_CDMA_NUMBER_INFO_BUFFER_LENGTH = 81,
26 RADIO_MAX_SOCKET_NAME_LENGTH = 6,
27 RADIO_MAX_CLIENT_ID_LENGTH = 2,
28 RADIO_MAX_DEBUG_SOCKET_NAME_LENGTH = 12,
29 RADIO_MAX_QEMU_PIPE_NAME_LENGTH = 11,
30 RADIO_MAX_UUID_LENGTH = 64,
31 RADIO_RADIO_CAPABILITY_VERSION = 1,
32 RADIO_CARD_MAX_APPS = 8,
33 RADIO_CDMA_MAX_NUMBER_OF_INFO_RECS = 10,
34 RADIO_SS_INFO_MAX = 4,
35 RADIO_NUM_SERVICE_CLASSES = 7,
36 RADIO_NUM_TX_POWER_LEVELS = 5,
39 enum RadioCdmaSmsConst : int32_t {
42 BEARER_DATA_MAX = 255,
43 UDH_MAX_SND_SIZE = 128,
44 UDH_EO_DATA_SEGMENT_MAX = 131,
47 UDH_LARGE_PIC_SIZE = 128,
48 UDH_SMALL_PIC_SIZE = 32,
49 UDH_VAR_PIC_SIZE = 134,
50 UDH_ANIM_NUM_BITMAPS = 4,
51 UDH_LARGE_BITMAP_SIZE = 32,
52 UDH_SMALL_BITMAP_SIZE = 8,
57 enum RadioRestrictedState : int32_t {
65 enum RadioCardState : int32_t {
69 /* card is present but not usable due to carrier restrictions.*/
73 enum RadioPinState : int32_t {
75 ENABLED_NOT_VERIFIED = 1,
79 ENABLED_PERM_BLOCKED = 5,
82 enum RadioAppType : int32_t {
91 enum RadioAppState : int32_t {
95 /* If PIN1 or UPin is required */
97 /* If PUK1 or Puk for UPin is required */
98 SUBSCRIPTION_PERSO = 4,
99 /* perso_substate should be look at when app_state is assigned to this value */
103 enum RadioPersoSubstate : int32_t {
107 /* in between each lock transition */
109 /* when either SIM or RUIM Perso is finished since each app can only have 1 active perso
112 SIM_NETWORK_SUBSET = 4,
114 SIM_SERVICE_PROVIDER = 6,
117 /* The corresponding perso lock is blocked */
118 SIM_NETWORK_SUBSET_PUK = 9,
119 SIM_CORPORATE_PUK = 10,
120 SIM_SERVICE_PROVIDER_PUK = 11,
126 RUIM_SERVICE_PROVIDER = 17,
128 RUIM_NETWORK1_PUK = 19,
129 /* The corresponding perso lock is blocked */
130 RUIM_NETWORK2_PUK = 20,
132 RUIM_CORPORATE_PUK = 22,
133 RUIM_SERVICE_PROVIDER_PUK = 23,
137 enum RadioState : int32_t {
139 /* Radio explictly powered off (eg CFUN=0) */
141 /* States 2-9 below are deprecated. Just leaving them here for backward compatibility. */
143 /* Radio is on, but the SIM interface is not ready */
144 SIM_LOCKED_OR_ABSENT = 3,
145 /* SIM PIN locked, PUK required, network
146 personalization locked, or SIM absent */
148 /* Radio is on and SIM interface is available */
150 /* Radio is on, but the RUIM interface is not ready */
152 /* Radio is on and the RUIM interface is available */
153 RUIM_LOCKED_OR_ABSENT = 7,
154 /* RUIM PIN locked, PUK required, network
155 personalization locked, or RUIM absent */
157 /* Radio is on, but the NV interface is not available */
163 struct RadioAppStatus {
164 RadioAppType appType;
165 RadioAppState appState;
166 RadioPersoSubstate persoSubstate;
167 /* applicable only if app_state == SUBSCRIPTION_PERSO */
169 /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41, 0x30, 0x30, 0x30 */
171 /* null terminated string */
172 int32_t pin1Replaced;
173 /* applicable to USIM, CSIM & ISIM */
178 struct RadioCardStatus {
179 RadioCardState cardState;
180 RadioPinState universalPinState;
181 /* applicable to USIM and CSIM */
182 int32_t gsmUmtsSubscriptionAppIndex;
183 /* value < RADIO_CARD_MAX_APPS, -1 if none */
184 int32_t cdmaSubscriptionAppIndex;
185 /* value < RADIO_CARD_MAX_APPS, -1 if none */
186 int32_t imsSubscriptionAppIndex;
187 /* value < RADIO_CARD_MAX_APPS, -1 if none */
188 int32_t numApplications;
189 /* value <= RADIO_CARD_MAX_APPS */
190 RadioAppStatus[RadioConst:RADIO_CARD_MAX_APPS] applications;