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// Signal strength levels, primarily used by android/telephony/SignalStrength.java.
95enum SignalStrengthEnum {
96    SIGNAL_STRENGTH_NONE_OR_UNKNOWN = 0;
97    SIGNAL_STRENGTH_POOR = 1;
98    SIGNAL_STRENGTH_MODERATE = 2;
99    SIGNAL_STRENGTH_GOOD = 3;
100    SIGNAL_STRENGTH_GREAT = 4;
101}
102
103enum ServiceStateEnum {
104    /**
105     * Normal operation condition, the phone is registered
106     * with an operator either in home network or in roaming.
107     */
108    SERVICE_STATE_IN_SERVICE = 0;
109
110    /**
111     * Phone is not registered with any operator, the phone
112     * can be currently searching a new operator to register to, or not
113     * searching to registration at all, or registration is denied, or radio
114     * signal is not available.
115     */
116    SERVICE_STATE_OUT_OF_SERVICE = 1;
117
118    /**
119     * The phone is registered and locked.  Only emergency numbers are allowed. {@more}
120     */
121    SERVICE_STATE_EMERGENCY_ONLY = 2;
122
123    /**
124     * Radio of telephony is explicitly powered off.
125     */
126    SERVICE_STATE_POWER_OFF = 3;
127}
128
129enum SimStateEnum {
130    SIM_STATE_UNKNOWN = 0;
131    /** SIM card state: no SIM card is available in the device */
132    SIM_STATE_ABSENT = 1;
133    /** SIM card state: Locked: requires the user's SIM PIN to unlock */
134    SIM_STATE_PIN_REQUIRED = 2;
135    /** SIM card state: Locked: requires the user's SIM PUK to unlock */
136    SIM_STATE_PUK_REQUIRED = 3;
137    /** SIM card state: Locked: requires a network PIN to unlock */
138    SIM_STATE_NETWORK_LOCKED = 4;
139    /** SIM card state: Ready */
140    SIM_STATE_READY = 5;
141    /** SIM card state: SIM Card is NOT READY */
142    SIM_STATE_NOT_READY = 6;
143    /** SIM card state: SIM Card Error, permanently disabled */
144    SIM_STATE_PERM_DISABLED = 7;
145    /** SIM card state: SIM Card Error, present but faulty */
146    SIM_STATE_CARD_IO_ERROR = 8;
147    /** SIM card state: SIM Card restricted, present but not usable due to
148     * carrier restrictions.
149     */
150    SIM_STATE_CARD_RESTRICTED = 9;
151    /**
152     * SIM card state: Loaded: SIM card applications have been loaded
153     * @hide
154     */
155    SIM_STATE_LOADED = 10;
156    /**
157     * SIM card state: SIM Card is present
158     * @hide
159     */
160    SIM_STATE_PRESENT = 11;
161}
162