1 /* 2 * Copyright (C) 2006, 2012 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.uicc; 18 19 import android.telephony.Rlog; 20 21 import com.android.internal.telephony.CommandsInterface; 22 23 /** 24 * {@hide} 25 * This class should be used to access files in CSIM ADF 26 */ 27 public final class CsimFileHandler extends IccFileHandler implements IccConstants { 28 static final String LOG_TAG = "CsimFH"; 29 30 public CsimFileHandler(UiccCardApplication app, String aid, CommandsInterface ci) { 31 super(app, aid, ci); 32 } 33 34 @Override 35 protected String getEFPath(int efid) { 36 switch(efid) { 37 case EF_SMS: 38 case EF_CST: 39 case EF_FDN: 40 case EF_MSISDN: 41 case EF_RUIM_SPN: 42 case EF_CSIM_LI: 43 case EF_CSIM_MDN: 44 case EF_CSIM_IMSIM: 45 case EF_CSIM_CDMAHOME: 46 case EF_CSIM_EPRL: 47 case EF_CSIM_MIPUPP: 48 return MF_SIM + DF_ADF; 49 } 50 String path = getCommonIccEFPath(efid); 51 if (path == null) { 52 // The EFids in UICC phone book entries are decided by the card manufacturer. 53 // So if we don't match any of the cases above and if its a UICC return 54 // the global 3g phone book path. 55 return MF_SIM + DF_TELECOM + DF_PHONEBOOK; 56 } 57 return path; 58 } 59 60 @Override 61 protected void logd(String msg) { 62 Rlog.d(LOG_TAG, msg); 63 } 64 65 @Override 66 protected void loge(String msg) { 67 Rlog.e(LOG_TAG, msg); 68 } 69 } 70