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 com.android.internal.telephony.uicc.IccRecords; 20 21 import java.util.Arrays; 22 import java.util.List; 23 24 /** EF data from brand override. */ 25 public final class BrandOverrideEfData implements EfData { 26 private final String mSpn; 27 private final String mRegisteredPlmn; 28 BrandOverrideEfData(String operatorName, String registeredPlmn)29 public BrandOverrideEfData(String operatorName, String registeredPlmn) { 30 mSpn = operatorName; 31 mRegisteredPlmn = registeredPlmn; 32 } 33 34 @Override getServiceProviderName()35 public String getServiceProviderName() { 36 return mSpn; 37 } 38 39 @Override getServiceProviderNameDisplayCondition(boolean isRoaming)40 public int getServiceProviderNameDisplayCondition(boolean isRoaming) { 41 return IccRecords.CARRIER_NAME_DISPLAY_CONDITION_BITMASK_SPN; 42 } 43 44 @Override getServiceProviderDisplayInformation()45 public List<String> getServiceProviderDisplayInformation() { 46 // Registered PLMN should be regarded as HOME PLMN 47 return Arrays.asList(mRegisteredPlmn); 48 } 49 } 50