• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2018 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
17syntax = "proto2";
18package android.telephony;
19
20option java_outer_classname = "TelephonyProtoEnums";
21option java_multiple_files = true;
22
23enum CallBearerEnum {
24    /** Call bearer is unknown or invalid */
25    CALL_BEARER_UNKNOWN = 0;
26
27    /** Call bearer is legacy CS */
28    CALL_BEARER_CS = 1;
29
30    /** Call bearer is IMS */
31    CALL_BEARER_IMS = 2;
32}
33
34enum CallDirectionEnum {
35    /** Call direction: unknown or invalid */
36    CALL_DIRECTION_UNKNOWN = 0;
37
38    /** Call direction: mobile originated (outgoing for this device) */
39    CALL_DIRECTION_MO = 1;
40
41    /** Call direction: mobile terminated (incoming for this device) */
42    CALL_DIRECTION_MT = 2;
43}
44
45// Call setup duration buckets.
46// See com.android.internal.telephony.metrics.VoiceCallSessionStats for definition.
47enum CallSetupDurationEnum {
48    CALL_SETUP_DURATION_UNKNOWN = 0;
49    CALL_SETUP_DURATION_EXTREMELY_FAST = 1;
50    CALL_SETUP_DURATION_ULTRA_FAST = 2;
51    CALL_SETUP_DURATION_VERY_FAST = 3;
52    CALL_SETUP_DURATION_FAST = 4;
53    CALL_SETUP_DURATION_NORMAL = 5;
54    CALL_SETUP_DURATION_SLOW = 6;
55    CALL_SETUP_DURATION_VERY_SLOW = 7;
56    CALL_SETUP_DURATION_ULTRA_SLOW = 8;
57    CALL_SETUP_DURATION_EXTREMELY_SLOW = 9;
58}
59
60// Data conn. power states, primarily used by android/telephony/DataConnectionRealTimeInfo.java.
61enum DataConnectionPowerStateEnum {
62    DATA_CONNECTION_POWER_STATE_LOW = 1;
63    DATA_CONNECTION_POWER_STATE_MEDIUM = 2;
64    DATA_CONNECTION_POWER_STATE_HIGH = 3;
65    DATA_CONNECTION_POWER_STATE_UNKNOWN = 2147483647; // Java Integer.MAX_VALUE;
66}
67
68// Network type enums, primarily used by android/telephony/TelephonyManager.java.
69// Do not add negative types.
70enum NetworkTypeEnum {
71    NETWORK_TYPE_UNKNOWN = 0;
72    NETWORK_TYPE_GPRS = 1;
73    NETWORK_TYPE_EDGE = 2;
74    NETWORK_TYPE_UMTS = 3;
75    NETWORK_TYPE_CDMA = 4;
76    NETWORK_TYPE_EVDO_0 = 5;
77    NETWORK_TYPE_EVDO_A = 6;
78    NETWORK_TYPE_1XRTT = 7;
79    NETWORK_TYPE_HSDPA = 8;
80    NETWORK_TYPE_HSUPA = 9;
81    NETWORK_TYPE_HSPA = 10;
82    NETWORK_TYPE_IDEN = 11;
83    NETWORK_TYPE_EVDO_B = 12;
84    NETWORK_TYPE_LTE = 13;
85    NETWORK_TYPE_EHRPD = 14;
86    NETWORK_TYPE_HSPAP = 15;
87    NETWORK_TYPE_GSM = 16;
88    NETWORK_TYPE_TD_SCDMA = 17;
89    NETWORK_TYPE_IWLAN = 18;
90    NETWORK_TYPE_LTE_CA = 19;
91    NETWORK_TYPE_NR = 20;
92}
93
94// Roaming type enums, see android.telephony.ServiceState.RoamingType for definitions.
95enum RoamingTypeEnum {
96    ROAMING_TYPE_NOT_ROAMING = 0;
97    ROAMING_TYPE_ROAMING = 1;
98    ROAMING_TYPE_ROAMING_DOMESTIC = 2;
99    ROAMING_TYPE_ROAMING_INTERNATIONAL = 3;
100}
101
102// Signal strength levels, as defined in android/telephony/SignalStrength.java.
103enum SignalStrengthEnum {
104    SIGNAL_STRENGTH_NONE_OR_UNKNOWN = 0;
105    SIGNAL_STRENGTH_POOR = 1;
106    SIGNAL_STRENGTH_MODERATE = 2;
107    SIGNAL_STRENGTH_GOOD = 3;
108    SIGNAL_STRENGTH_GREAT = 4;
109}
110
111enum ServiceStateEnum {
112    /**
113     * Normal operation condition, the phone is registered
114     * with an operator either in home network or in roaming.
115     */
116    SERVICE_STATE_IN_SERVICE = 0;
117
118    /**
119     * Phone is not registered with any operator, the phone
120     * can be currently searching a new operator to register to, or not
121     * searching to registration at all, or registration is denied, or radio
122     * signal is not available.
123     */
124    SERVICE_STATE_OUT_OF_SERVICE = 1;
125
126    /**
127     * The phone is registered and locked.  Only emergency numbers are allowed. {@more}
128     */
129    SERVICE_STATE_EMERGENCY_ONLY = 2;
130
131    /**
132     * Radio of telephony is explicitly powered off.
133     */
134    SERVICE_STATE_POWER_OFF = 3;
135}
136
137enum SimStateEnum {
138    SIM_STATE_UNKNOWN = 0;
139    /** SIM card state: no SIM card is available in the device */
140    SIM_STATE_ABSENT = 1;
141    /** SIM card state: Locked: requires the user's SIM PIN to unlock */
142    SIM_STATE_PIN_REQUIRED = 2;
143    /** SIM card state: Locked: requires the user's SIM PUK to unlock */
144    SIM_STATE_PUK_REQUIRED = 3;
145    /** SIM card state: Locked: requires a network PIN to unlock */
146    SIM_STATE_NETWORK_LOCKED = 4;
147    /** SIM card state: Ready */
148    SIM_STATE_READY = 5;
149    /** SIM card state: SIM Card is NOT READY */
150    SIM_STATE_NOT_READY = 6;
151    /** SIM card state: SIM Card Error, permanently disabled */
152    SIM_STATE_PERM_DISABLED = 7;
153    /** SIM card state: SIM Card Error, present but faulty */
154    SIM_STATE_CARD_IO_ERROR = 8;
155    /** SIM card state: SIM Card restricted, present but not usable due to
156     * carrier restrictions.
157     */
158    SIM_STATE_CARD_RESTRICTED = 9;
159    /**
160     * SIM card state: Loaded: SIM card applications have been loaded
161     * @hide
162     */
163    SIM_STATE_LOADED = 10;
164    /**
165     * SIM card state: SIM Card is present
166     * @hide
167     */
168    SIM_STATE_PRESENT = 11;
169}
170
171// Format of SMS message
172enum SmsFormatEnum {
173    /** Unknown format */
174    SMS_FORMAT_UNKNOWN = 0;
175    /** Format compliant with 3GPP TS 23.040 */
176    SMS_FORMAT_3GPP = 1;
177    /** Format compliant with 3GPP2 TS C.S0015-B */
178    SMS_FORMAT_3GPP2 = 2;
179}
180
181// Technology used to carry an SMS message
182enum SmsTechEnum {
183    /**
184     * Unknown SMS technology used to carry the SMS.
185     * This value is also used for injected SMS.
186     */
187    SMS_TECH_UNKNOWN = 0;
188    /** The SMS was carried over CS bearer in 3GPP network */
189    SMS_TECH_CS_3GPP = 1;
190    /** The SMS was carried over CS bearer in 3GPP2 network */
191    SMS_TECH_CS_3GPP2 = 2;
192    /** The SMS was carried over IMS */
193    SMS_TECH_IMS = 3;
194}
195
196// Types of SMS message
197enum SmsTypeEnum {
198    /** Normal type. */
199    SMS_TYPE_NORMAL = 0;
200    /** SMS-PP (point-to-point). */
201    SMS_TYPE_SMS_PP = 1;
202    /** Voicemail indication. */
203    SMS_TYPE_VOICEMAIL_INDICATION = 2;
204    /** Type 0 message (3GPP TS 23.040 9.2.3.9). */
205    SMS_TYPE_ZERO = 3;
206    /** WAP-PUSH message. */
207    SMS_TYPE_WAP_PUSH = 4;
208}
209
210// Incoming SMS errors
211enum SmsIncomingErrorEnum {
212    SMS_SUCCESS = 0;
213    SMS_ERROR_GENERIC = 1;
214    SMS_ERROR_NO_MEMORY = 2;
215    SMS_ERROR_NOT_SUPPORTED = 3;
216}
217
218// Outgoing SMS results
219enum SmsSendResultEnum {
220    // Unknown error
221    SMS_SEND_RESULT_UNKNOWN = 0;
222    // Success
223    SMS_SEND_RESULT_SUCCESS = 1;
224    // Permanent error
225    SMS_SEND_RESULT_ERROR = 2;
226    // Temporary error, retry
227    SMS_SEND_RESULT_ERROR_RETRY = 3;
228    // Error over IMS, retry on CS
229    SMS_SEND_RESULT_ERROR_FALLBACK = 4;
230}
231
232// Data profile of the data call. From
233// frameworks/base/telephony/java/com/android/internal/telephony/RILConstants.java
234enum DataProfileEnum {
235    DATA_PROFILE_DEFAULT = 0;
236    DATA_PROFILE_TETHERED = 1;
237    DATA_PROFILE_IMS = 2;
238    DATA_PROFILE_FOTA = 3;
239    DATA_PROFILE_CBS = 4;
240    DATA_PROFILE_OEM_BASE = 1000;
241    DATA_PROFILE_INVALID = -1;
242}
243
244// Reason of data call deactivation. From
245// frameworks/base/telephony/java/android/telephony/data/DataService.java#DeactivateDataReason
246enum DataDeactivateReasonEnum {
247    DEACTIVATE_REASON_UNKNOWN = 0;
248    DEACTIVATE_REASON_NORMAL = 1;
249    DEACTIVATE_REASON_RADIO_OFF = 2;
250    DEACTIVATE_REASON_HANDOVER = 3;
251}
252
253// IP type of the data call
254// see frameworks/base/telephony/java/android/telephony/data/ApnSetting.java#ProtocolType
255enum ApnProtocolEnum {
256    APN_PROTOCOL_IPV4 = 0;
257    APN_PROTOCOL_IPV6 = 1;
258    APN_PROTOCOL_IPV4V6 = 2;
259    APN_PROTOCOL_PPP = 3;
260}
261
262// Action taken to recover a data call that is stalled. From
263// frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/DcTracker.java
264// #RecoveryAction
265enum DataStallRecoveryActionEnum {
266    RECOVERY_ACTION_GET_DATA_CALL_LIST = 0;
267    RECOVERY_ACTION_CLEANUP = 1;
268    RECOVERY_ACTION_REREGISTER = 2;
269    RECOVERY_ACTION_RADIO_RESTART = 3;
270}
271
272// Codec quality
273enum CodecQuality {
274    /** Codec quality: unknown */
275    CODEC_QUALITY_UNKNOWN = 0;
276
277    /** Codec quality: narrowband */
278    CODEC_QUALITY_NARROWBAND = 1;
279
280    /** Codec quality: wideband */
281    CODEC_QUALITY_WIDEBAND = 2;
282
283    /** Codec quality: super-wideband */
284    CODEC_QUALITY_SUPER_WIDEBAND = 3;
285
286    /** Codec quality: fullband */
287    CODEC_QUALITY_FULLBAND = 4;
288}
289
290
291// Result from restore of sim-specific settings.
292enum SimSpecfifcSettingsRestoreResult {
293    SIM_RESTORE_RESULT_UNKNOWN = 0;
294    // SIM-specific settings were successfully restored.
295    SIM_RESTORE_RESULT_SUCCESS = 1;
296    // SIM-specific settings didn't restore because no matching SIM was
297    // found in backed up data.
298    SIM_RESTORE_RESULT_NONE_MATCH = 2;
299    // No SIM-specific settings were found in backup file
300    SIM_RESTORE_RESULT_ZERO_SIM_IN_BACKUP = 3;
301}
302
303// Case of sim-specific settings restore.
304enum SimSpecificSettingsRestoreCase {
305    SIM_RESTORE_CASE_UNDEFINED_USE_CASE = 0;
306    // Restore was done during SuW.
307    SIM_RESTORE_CASE_SUW = 1;
308    // Restore was done once sim was inserted.
309    SIM_RESTORE_CASE_SIM_INSERTED = 2;
310}
311
312// Matching criteria for sim-specific settings restore.
313enum SimSpecificSettingsRestoreMatchingCriteria {
314    SIM_RESTORE_MATCHING_CRITERIA_UNSET= 0;
315    // No match was found.
316    SIM_RESTORE_MATCHING_CRITERIA_NONE = 1;
317    // Restore was done by matching two sims by ICCID.
318    SIM_RESTORE_MATCHING_CRITERIA_ICCID = 2;
319    // Restore was done by matching carrierId and phoneNumber.
320    SIM_RESTORE_MATCHING_CRITERIA_CARRIER_ID_AND_PHONE_NUMBER = 3;
321    // Restore was done by matching carrierId only.
322    SIM_RESTORE_MATCHING_CRITERIA_CARRIER_ID_ONLY = 4;
323}