/* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ syntax = "proto2"; package android.telephony; option java_outer_classname = "TelephonyProtoEnums"; option java_multiple_files = true; enum CallBearerEnum { /** Call bearer is unknown or invalid */ CALL_BEARER_UNKNOWN = 0; /** Call bearer is legacy CS */ CALL_BEARER_CS = 1; /** Call bearer is IMS */ CALL_BEARER_IMS = 2; } enum CallDirectionEnum { /** Call direction: unknown or invalid */ CALL_DIRECTION_UNKNOWN = 0; /** Call direction: mobile originated (outgoing for this device) */ CALL_DIRECTION_MO = 1; /** Call direction: mobile terminated (incoming for this device) */ CALL_DIRECTION_MT = 2; } // Call setup duration buckets. // See com.android.internal.telephony.metrics.VoiceCallSessionStats for definition. enum CallSetupDurationEnum { CALL_SETUP_DURATION_UNKNOWN = 0; CALL_SETUP_DURATION_EXTREMELY_FAST = 1; CALL_SETUP_DURATION_ULTRA_FAST = 2; CALL_SETUP_DURATION_VERY_FAST = 3; CALL_SETUP_DURATION_FAST = 4; CALL_SETUP_DURATION_NORMAL = 5; CALL_SETUP_DURATION_SLOW = 6; CALL_SETUP_DURATION_VERY_SLOW = 7; CALL_SETUP_DURATION_ULTRA_SLOW = 8; CALL_SETUP_DURATION_EXTREMELY_SLOW = 9; } // Data conn. power states, primarily used by android/telephony/DataConnectionRealTimeInfo.java. enum DataConnectionPowerStateEnum { DATA_CONNECTION_POWER_STATE_LOW = 1; DATA_CONNECTION_POWER_STATE_MEDIUM = 2; DATA_CONNECTION_POWER_STATE_HIGH = 3; DATA_CONNECTION_POWER_STATE_UNKNOWN = 2147483647; // Java Integer.MAX_VALUE; } // Network type enums, primarily used by android/telephony/TelephonyManager.java. // Do not add negative types. enum NetworkTypeEnum { NETWORK_TYPE_UNKNOWN = 0; NETWORK_TYPE_GPRS = 1; NETWORK_TYPE_EDGE = 2; NETWORK_TYPE_UMTS = 3; NETWORK_TYPE_CDMA = 4; NETWORK_TYPE_EVDO_0 = 5; NETWORK_TYPE_EVDO_A = 6; NETWORK_TYPE_1XRTT = 7; NETWORK_TYPE_HSDPA = 8; NETWORK_TYPE_HSUPA = 9; NETWORK_TYPE_HSPA = 10; NETWORK_TYPE_IDEN = 11; NETWORK_TYPE_EVDO_B = 12; NETWORK_TYPE_LTE = 13; NETWORK_TYPE_EHRPD = 14; NETWORK_TYPE_HSPAP = 15; NETWORK_TYPE_GSM = 16; NETWORK_TYPE_TD_SCDMA = 17; NETWORK_TYPE_IWLAN = 18; NETWORK_TYPE_LTE_CA = 19; NETWORK_TYPE_NR = 20; } // Roaming type enums, see android.telephony.ServiceState.RoamingType for definitions. enum RoamingTypeEnum { ROAMING_TYPE_NOT_ROAMING = 0; ROAMING_TYPE_ROAMING = 1; ROAMING_TYPE_ROAMING_DOMESTIC = 2; ROAMING_TYPE_ROAMING_INTERNATIONAL = 3; } // Signal strength levels, as defined in android/telephony/SignalStrength.java. enum SignalStrengthEnum { SIGNAL_STRENGTH_NONE_OR_UNKNOWN = 0; SIGNAL_STRENGTH_POOR = 1; SIGNAL_STRENGTH_MODERATE = 2; SIGNAL_STRENGTH_GOOD = 3; SIGNAL_STRENGTH_GREAT = 4; } enum ServiceStateEnum { /** * Normal operation condition, the phone is registered * with an operator either in home network or in roaming. */ SERVICE_STATE_IN_SERVICE = 0; /** * Phone is not registered with any operator, the phone * can be currently searching a new operator to register to, or not * searching to registration at all, or registration is denied, or radio * signal is not available. */ SERVICE_STATE_OUT_OF_SERVICE = 1; /** * The phone is registered and locked. Only emergency numbers are allowed. {@more} */ SERVICE_STATE_EMERGENCY_ONLY = 2; /** * Radio of telephony is explicitly powered off. */ SERVICE_STATE_POWER_OFF = 3; } enum SimStateEnum { SIM_STATE_UNKNOWN = 0; /** SIM card state: no SIM card is available in the device */ SIM_STATE_ABSENT = 1; /** SIM card state: Locked: requires the user's SIM PIN to unlock */ SIM_STATE_PIN_REQUIRED = 2; /** SIM card state: Locked: requires the user's SIM PUK to unlock */ SIM_STATE_PUK_REQUIRED = 3; /** SIM card state: Locked: requires a network PIN to unlock */ SIM_STATE_NETWORK_LOCKED = 4; /** SIM card state: Ready */ SIM_STATE_READY = 5; /** SIM card state: SIM Card is NOT READY */ SIM_STATE_NOT_READY = 6; /** SIM card state: SIM Card Error, permanently disabled */ SIM_STATE_PERM_DISABLED = 7; /** SIM card state: SIM Card Error, present but faulty */ SIM_STATE_CARD_IO_ERROR = 8; /** SIM card state: SIM Card restricted, present but not usable due to * carrier restrictions. */ SIM_STATE_CARD_RESTRICTED = 9; /** * SIM card state: Loaded: SIM card applications have been loaded * @hide */ SIM_STATE_LOADED = 10; /** * SIM card state: SIM Card is present * @hide */ SIM_STATE_PRESENT = 11; } // Format of SMS message enum SmsFormatEnum { /** Unknown format */ SMS_FORMAT_UNKNOWN = 0; /** Format compliant with 3GPP TS 23.040 */ SMS_FORMAT_3GPP = 1; /** Format compliant with 3GPP2 TS C.S0015-B */ SMS_FORMAT_3GPP2 = 2; } // Technology used to carry an SMS message enum SmsTechEnum { /** * Unknown SMS technology used to carry the SMS. * This value is also used for injected SMS. */ SMS_TECH_UNKNOWN = 0; /** The SMS was carried over CS bearer in 3GPP network */ SMS_TECH_CS_3GPP = 1; /** The SMS was carried over CS bearer in 3GPP2 network */ SMS_TECH_CS_3GPP2 = 2; /** The SMS was carried over IMS */ SMS_TECH_IMS = 3; } // Types of SMS message enum SmsTypeEnum { /** Normal type. */ SMS_TYPE_NORMAL = 0; /** SMS-PP (point-to-point). */ SMS_TYPE_SMS_PP = 1; /** Voicemail indication. */ SMS_TYPE_VOICEMAIL_INDICATION = 2; /** Type 0 message (3GPP TS 23.040 9.2.3.9). */ SMS_TYPE_ZERO = 3; /** WAP-PUSH message. */ SMS_TYPE_WAP_PUSH = 4; } // Incoming SMS errors enum SmsIncomingErrorEnum { SMS_SUCCESS = 0; SMS_ERROR_GENERIC = 1; SMS_ERROR_NO_MEMORY = 2; SMS_ERROR_NOT_SUPPORTED = 3; } // Outgoing SMS results enum SmsSendResultEnum { // Unknown error SMS_SEND_RESULT_UNKNOWN = 0; // Success SMS_SEND_RESULT_SUCCESS = 1; // Permanent error SMS_SEND_RESULT_ERROR = 2; // Temporary error, retry SMS_SEND_RESULT_ERROR_RETRY = 3; // Error over IMS, retry on CS SMS_SEND_RESULT_ERROR_FALLBACK = 4; } // Data profile of the data call. From // frameworks/base/telephony/java/com/android/internal/telephony/RILConstants.java enum DataProfileEnum { DATA_PROFILE_DEFAULT = 0; DATA_PROFILE_TETHERED = 1; DATA_PROFILE_IMS = 2; DATA_PROFILE_FOTA = 3; DATA_PROFILE_CBS = 4; DATA_PROFILE_OEM_BASE = 1000; DATA_PROFILE_INVALID = -1; } // Reason of data call deactivation. From // frameworks/base/telephony/java/android/telephony/data/DataService.java#DeactivateDataReason enum DataDeactivateReasonEnum { DEACTIVATE_REASON_UNKNOWN = 0; DEACTIVATE_REASON_NORMAL = 1; DEACTIVATE_REASON_RADIO_OFF = 2; DEACTIVATE_REASON_HANDOVER = 3; } // IP type of the data call // see frameworks/base/telephony/java/android/telephony/data/ApnSetting.java#ProtocolType enum ApnProtocolEnum { APN_PROTOCOL_IPV4 = 0; APN_PROTOCOL_IPV6 = 1; APN_PROTOCOL_IPV4V6 = 2; APN_PROTOCOL_PPP = 3; } // Action taken to recover a data call that is stalled. From // frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/DcTracker.java // #RecoveryAction enum DataStallRecoveryActionEnum { RECOVERY_ACTION_GET_DATA_CALL_LIST = 0; RECOVERY_ACTION_CLEANUP = 1; RECOVERY_ACTION_REREGISTER = 2; RECOVERY_ACTION_RADIO_RESTART = 3; } // Codec quality enum CodecQuality { /** Codec quality: unknown */ CODEC_QUALITY_UNKNOWN = 0; /** Codec quality: narrowband */ CODEC_QUALITY_NARROWBAND = 1; /** Codec quality: wideband */ CODEC_QUALITY_WIDEBAND = 2; /** Codec quality: super-wideband */ CODEC_QUALITY_SUPER_WIDEBAND = 3; /** Codec quality: fullband */ CODEC_QUALITY_FULLBAND = 4; } // Result from restore of sim-specific settings. enum SimSpecfifcSettingsRestoreResult { SIM_RESTORE_RESULT_UNKNOWN = 0; // SIM-specific settings were successfully restored. SIM_RESTORE_RESULT_SUCCESS = 1; // SIM-specific settings didn't restore because no matching SIM was // found in backed up data. SIM_RESTORE_RESULT_NONE_MATCH = 2; // No SIM-specific settings were found in backup file SIM_RESTORE_RESULT_ZERO_SIM_IN_BACKUP = 3; } // Case of sim-specific settings restore. enum SimSpecificSettingsRestoreCase { SIM_RESTORE_CASE_UNDEFINED_USE_CASE = 0; // Restore was done during SuW. SIM_RESTORE_CASE_SUW = 1; // Restore was done once sim was inserted. SIM_RESTORE_CASE_SIM_INSERTED = 2; } // Matching criteria for sim-specific settings restore. enum SimSpecificSettingsRestoreMatchingCriteria { SIM_RESTORE_MATCHING_CRITERIA_UNSET= 0; // No match was found. SIM_RESTORE_MATCHING_CRITERIA_NONE = 1; // Restore was done by matching two sims by ICCID. SIM_RESTORE_MATCHING_CRITERIA_ICCID = 2; // Restore was done by matching carrierId and phoneNumber. SIM_RESTORE_MATCHING_CRITERIA_CARRIER_ID_AND_PHONE_NUMBER = 3; // Restore was done by matching carrierId only. SIM_RESTORE_MATCHING_CRITERIA_CARRIER_ID_ONLY = 4; }