Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 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 | |
| 17 | syntax = "proto2"; |
| 18 | package android.telephony; |
| 19 | |
| 20 | option java_outer_classname = "TelephonyProtoEnums"; |
| 21 | option java_multiple_files = true; |
| 22 | |
| 23 | // Data conn. power states, primarily used by android/telephony/DataConnectionRealTimeInfo.java. |
| 24 | enum DataConnectionPowerStateEnum { |
| 25 | DATA_CONNECTION_POWER_STATE_LOW = 1; |
| 26 | DATA_CONNECTION_POWER_STATE_MEDIUM = 2; |
| 27 | DATA_CONNECTION_POWER_STATE_HIGH = 3; |
| 28 | DATA_CONNECTION_POWER_STATE_UNKNOWN = 2147483647; // Java Integer.MAX_VALUE; |
| 29 | } |
| 30 | |
Tej Singh | eee317b | 2018-03-07 19:28:05 -0800 | [diff] [blame] | 31 | // Network type enums, primarily used by android/telephony/TelephonyManager.java. |
| 32 | // Do not add negative types. |
| 33 | enum NetworkTypeEnum { |
| 34 | NETWORK_TYPE_UNKNOWN = 0; |
| 35 | NETWORK_TYPE_GPRS = 1; |
| 36 | NETWORK_TYPE_EDGE = 2; |
| 37 | NETWORK_TYPE_UMTS = 3; |
| 38 | NETWORK_TYPE_CDMA = 4; |
| 39 | NETWORK_TYPE_EVDO_0 = 5; |
| 40 | NETWORK_TYPE_EVDO_A = 6; |
| 41 | NETWORK_TYPE_1XRTT = 7; |
| 42 | NETWORK_TYPE_HSDPA = 8; |
| 43 | NETWORK_TYPE_HSUPA = 9; |
| 44 | NETWORK_TYPE_HSPA = 10; |
| 45 | NETWORK_TYPE_IDEN = 11; |
| 46 | NETWORK_TYPE_EVDO_B = 12; |
| 47 | NETWORK_TYPE_LTE = 13; |
| 48 | NETWORK_TYPE_EHRPD = 14; |
| 49 | NETWORK_TYPE_HSPAP = 15; |
| 50 | NETWORK_TYPE_GSM = 16; |
| 51 | NETWORK_TYPE_TD_SCDMA = 17; |
| 52 | NETWORK_TYPE_IWLAN = 18; |
| 53 | NETWORK_TYPE_LTE_CA = 19; |
| 54 | } |
| 55 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 56 | // Signal strength levels, primarily used by android/telephony/SignalStrength.java. |
| 57 | enum SignalStrengthEnum { |
| 58 | SIGNAL_STRENGTH_NONE_OR_UNKNOWN = 0; |
| 59 | SIGNAL_STRENGTH_POOR = 1; |
| 60 | SIGNAL_STRENGTH_MODERATE = 2; |
| 61 | SIGNAL_STRENGTH_GOOD = 3; |
| 62 | SIGNAL_STRENGTH_GREAT = 4; |
| 63 | } |
Yangster | 4ccebea | 2018-10-09 17:09:02 -0700 | [diff] [blame] | 64 | |
| 65 | |
| 66 | enum ServiceStateEnum { |
| 67 | /** |
| 68 | * Normal operation condition, the phone is registered |
| 69 | * with an operator either in home network or in roaming. |
| 70 | */ |
| 71 | SERVICE_STATE_IN_SERVICE = 0; |
| 72 | |
| 73 | /** |
| 74 | * Phone is not registered with any operator, the phone |
| 75 | * can be currently searching a new operator to register to, or not |
| 76 | * searching to registration at all, or registration is denied, or radio |
| 77 | * signal is not available. |
| 78 | */ |
| 79 | SERVICE_STATE_OUT_OF_SERVICE = 1; |
| 80 | |
| 81 | /** |
| 82 | * The phone is registered and locked. Only emergency numbers are allowed. {@more} |
| 83 | */ |
| 84 | SERVICE_STATE_EMERGENCY_ONLY = 2; |
| 85 | |
| 86 | /** |
| 87 | * Radio of telephony is explicitly powered off. |
| 88 | */ |
| 89 | SERVICE_STATE_POWER_OFF = 3; |
| 90 | } |
| 91 | |
| 92 | enum SimStateEnum { |
| 93 | SIM_STATE_UNKNOWN = 0; |
| 94 | /** SIM card state: no SIM card is available in the device */ |
| 95 | SIM_STATE_ABSENT = 1; |
| 96 | /** SIM card state: Locked: requires the user's SIM PIN to unlock */ |
| 97 | SIM_STATE_PIN_REQUIRED = 2; |
| 98 | /** SIM card state: Locked: requires the user's SIM PUK to unlock */ |
| 99 | SIM_STATE_PUK_REQUIRED = 3; |
| 100 | /** SIM card state: Locked: requires a network PIN to unlock */ |
| 101 | SIM_STATE_NETWORK_LOCKED = 4; |
| 102 | /** SIM card state: Ready */ |
| 103 | SIM_STATE_READY = 5; |
| 104 | /** SIM card state: SIM Card is NOT READY */ |
| 105 | SIM_STATE_NOT_READY = 6; |
| 106 | /** SIM card state: SIM Card Error, permanently disabled */ |
| 107 | SIM_STATE_PERM_DISABLED = 7; |
| 108 | /** SIM card state: SIM Card Error, present but faulty */ |
| 109 | SIM_STATE_CARD_IO_ERROR = 8; |
| 110 | /** SIM card state: SIM Card restricted, present but not usable due to |
| 111 | * carrier restrictions. |
| 112 | */ |
| 113 | SIM_STATE_CARD_RESTRICTED = 9; |
| 114 | /** |
| 115 | * SIM card state: Loaded: SIM card applications have been loaded |
| 116 | * @hide |
| 117 | */ |
| 118 | SIM_STATE_LOADED = 10; |
| 119 | /** |
| 120 | * SIM card state: SIM Card is present |
| 121 | * @hide |
| 122 | */ |
| 123 | SIM_STATE_PRESENT = 11; |
| 124 | } |