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 23// Data conn. power states, primarily used by android/telephony/DataConnectionRealTimeInfo.java. 24enum 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 31// Network type enums, primarily used by android/telephony/TelephonyManager.java. 32// Do not add negative types. 33enum 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 NETWORK_TYPE_NR = 20; 55} 56 57// Signal strength levels, primarily used by android/telephony/SignalStrength.java. 58enum SignalStrengthEnum { 59 SIGNAL_STRENGTH_NONE_OR_UNKNOWN = 0; 60 SIGNAL_STRENGTH_POOR = 1; 61 SIGNAL_STRENGTH_MODERATE = 2; 62 SIGNAL_STRENGTH_GOOD = 3; 63 SIGNAL_STRENGTH_GREAT = 4; 64} 65 66 67enum ServiceStateEnum { 68 /** 69 * Normal operation condition, the phone is registered 70 * with an operator either in home network or in roaming. 71 */ 72 SERVICE_STATE_IN_SERVICE = 0; 73 74 /** 75 * Phone is not registered with any operator, the phone 76 * can be currently searching a new operator to register to, or not 77 * searching to registration at all, or registration is denied, or radio 78 * signal is not available. 79 */ 80 SERVICE_STATE_OUT_OF_SERVICE = 1; 81 82 /** 83 * The phone is registered and locked. Only emergency numbers are allowed. {@more} 84 */ 85 SERVICE_STATE_EMERGENCY_ONLY = 2; 86 87 /** 88 * Radio of telephony is explicitly powered off. 89 */ 90 SERVICE_STATE_POWER_OFF = 3; 91} 92 93enum SimStateEnum { 94 SIM_STATE_UNKNOWN = 0; 95 /** SIM card state: no SIM card is available in the device */ 96 SIM_STATE_ABSENT = 1; 97 /** SIM card state: Locked: requires the user's SIM PIN to unlock */ 98 SIM_STATE_PIN_REQUIRED = 2; 99 /** SIM card state: Locked: requires the user's SIM PUK to unlock */ 100 SIM_STATE_PUK_REQUIRED = 3; 101 /** SIM card state: Locked: requires a network PIN to unlock */ 102 SIM_STATE_NETWORK_LOCKED = 4; 103 /** SIM card state: Ready */ 104 SIM_STATE_READY = 5; 105 /** SIM card state: SIM Card is NOT READY */ 106 SIM_STATE_NOT_READY = 6; 107 /** SIM card state: SIM Card Error, permanently disabled */ 108 SIM_STATE_PERM_DISABLED = 7; 109 /** SIM card state: SIM Card Error, present but faulty */ 110 SIM_STATE_CARD_IO_ERROR = 8; 111 /** SIM card state: SIM Card restricted, present but not usable due to 112 * carrier restrictions. 113 */ 114 SIM_STATE_CARD_RESTRICTED = 9; 115 /** 116 * SIM card state: Loaded: SIM card applications have been loaded 117 * @hide 118 */ 119 SIM_STATE_LOADED = 10; 120 /** 121 * SIM card state: SIM Card is present 122 * @hide 123 */ 124 SIM_STATE_PRESENT = 11; 125} 126