1 /* 2 * Copyright (C) 2019 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 package com.android.internal.telephony.cdnr; 18 19 import android.annotation.IntDef; 20 21 import com.android.internal.telephony.uicc.IccRecords; 22 import com.android.internal.telephony.uicc.IccRecords.CarrierNameDisplayConditionBitmask; 23 import com.android.internal.telephony.uicc.IccRecords.OperatorPlmnInfo; 24 import com.android.internal.telephony.uicc.IccRecords.PlmnNetworkName; 25 26 import java.lang.annotation.Retention; 27 import java.lang.annotation.RetentionPolicy; 28 import java.util.List; 29 30 /** Interface of EF fileds container. */ 31 public interface EfData { 32 @Retention(RetentionPolicy.SOURCE) 33 @IntDef(prefix = {"EF_SOURCE_"}, value = { 34 EF_SOURCE_CARRIER_API, 35 EF_SOURCE_CARRIER_CONFIG, 36 EF_SOURCE_USIM, 37 EF_SOURCE_SIM, 38 EF_SOURCE_CSIM, 39 EF_SOURCE_RUIM, 40 EF_SOURCE_VOICE_OPERATOR_SIGNALLING, 41 EF_SOURCE_DATA_OPERATOR_SIGNALLING, 42 EF_SOURCE_MODEM_CONFIG, 43 EF_SOURCE_ERI 44 }) 45 @interface EFSource {} 46 47 int EF_SOURCE_CARRIER_CONFIG = 1; 48 int EF_SOURCE_CARRIER_API = 2; 49 int EF_SOURCE_USIM = 3; 50 int EF_SOURCE_SIM = 4; 51 int EF_SOURCE_CSIM = 5; 52 int EF_SOURCE_RUIM = 6; 53 int EF_SOURCE_VOICE_OPERATOR_SIGNALLING = 7; 54 int EF_SOURCE_DATA_OPERATOR_SIGNALLING = 8; 55 int EF_SOURCE_MODEM_CONFIG = 9; 56 int EF_SOURCE_ERI = 10; 57 58 /** 59 * Get the service provider name for the registered PLMN. 60 * 61 * Reference: 3GPP TS 131.102 Section 4.2.12 EF_SPN. 62 * 63 * @return service provider name or {@code null} if it's not existed. 64 */ getServiceProviderName()65 default String getServiceProviderName() { 66 return null; 67 } 68 69 /** 70 * Get the display condition of service provider name and PLMN network name. The display 71 * condition has two bits(lsb). Service provider name display is required if the first bit 72 * is set to 1. PLMN network name display is required if the second bit is set to 1. 73 * 74 * @see {@link IccRecords#CARRIER_NAME_DISPLAY_CONDITION_BITMASK_PLMN} 75 * @see {@link IccRecords#CARRIER_NAME_DISPLAY_CONDITION_BITMASK_SPN} 76 * 77 * Reference: 3GPP TS 131.102 Section 4.2.12 EF_SPN 78 * 79 * @retrun the bitmask of display condition or {@link com.android.internal.telephony.uicc 80 * .IccRecords.INVALID_CARRIER_NAME_DISPLAY_CONDITION_BITMASK} if it's not existed. 81 */ 82 @CarrierNameDisplayConditionBitmask getServiceProviderNameDisplayCondition()83 default int getServiceProviderNameDisplayCondition() { 84 return IccRecords.INVALID_CARRIER_NAME_DISPLAY_CONDITION_BITMASK; 85 } 86 87 /** 88 * Get the service provider display information. This is a list of PLMNs in which the 89 * service provider name shall be displayed. 90 * 91 * Reference: 3GPP TS 131.102 Section 4.2.66 EF_SPDI 92 * 93 * @return a list of PLMNs or {@code null} if it's not existed. 94 */ getServiceProviderDisplayInformation()95 default List<String> getServiceProviderDisplayInformation() { 96 return null; 97 } 98 99 /** 100 * Get the list of full and short form versions of the network name for the registered PLMN. 101 * 102 * Reference: 3GPP TS 131.102 Section 4.2.58 EF_PNN. 103 * 104 * @return a list of {@link PlmnNetworkName} or {@code null} if it's not existed. 105 */ getPlmnNetworkNameList()106 default List<PlmnNetworkName> getPlmnNetworkNameList() { 107 return null; 108 } 109 110 /** 111 * Get the list of equivalent HPLMN. 112 * 113 * Reference: 3GPP TS 31.102 v15.2.0 Section 4.2.84 EF_EHPLMN 114 * Reference: 3GPP TS 23.122 v15.6.0 Section 1.2 Equivalent HPLMN list 115 * 116 * @return a list of PLMN that indicates the equivalent HPLMN or {@code null} if it's not 117 * existed. 118 */ getEhplmnList()119 default List<String> getEhplmnList() { 120 return null; 121 } 122 123 /** 124 * Get the list of operator PLMN information. 125 * 126 * Reference: 3GPP TS 131.102 Section 4.2.59 EF_OPL. 127 * 128 * @return a list of {@link OperatorPlmnInfo} or {@code null} if it's not existed. 129 */ getOperatorPlmnList()130 default List<OperatorPlmnInfo> getOperatorPlmnList() { 131 return null; 132 } 133 } 134