1 /* 2 * Copyright (C) 2006 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 com.android.internal.telephony.CommandsInterface; 20 import com.android.telephony.Rlog; 21 22 /** 23 * {@hide} 24 */ 25 public final class SIMFileHandler extends IccFileHandler implements IccConstants { 26 static final String LOG_TAG = "SIMFileHandler"; 27 28 //***** Instance Variables 29 30 //***** Constructor 31 SIMFileHandler(UiccCardApplication app, String aid, CommandsInterface ci)32 public SIMFileHandler(UiccCardApplication app, String aid, CommandsInterface ci) { 33 super(app, aid, ci); 34 } 35 36 //***** Overridden from IccFileHandler 37 38 @Override getEFPath(int efid)39 protected String getEFPath(int efid) { 40 // TODO(): DF_GSM can be 7F20 or 7F21 to handle backward compatibility. 41 // Implement this after discussion with OEMs. 42 switch(efid) { 43 case EF_SMS: 44 return MF_SIM + DF_TELECOM; 45 46 case EF_EXT6: 47 case EF_MWIS: 48 case EF_MBI: 49 case EF_SPN: 50 case EF_AD: 51 case EF_MBDN: 52 case EF_PNN: 53 case EF_SPDI: 54 case EF_SST: 55 case EF_CFIS: 56 case EF_GID1: 57 case EF_GID2: 58 case EF_MAILBOX_CPHS: 59 case EF_VOICE_MAIL_INDICATOR_CPHS: 60 case EF_CFF_CPHS: 61 case EF_SPN_CPHS: 62 case EF_SPN_SHORT_CPHS: 63 case EF_INFO_CPHS: 64 case EF_CSP_CPHS: 65 return MF_SIM + DF_GSM; 66 } 67 String path = getCommonIccEFPath(efid); 68 if (path == null) { 69 Rlog.e(LOG_TAG, "Error: EF Path being returned in null"); 70 } 71 return path; 72 } 73 74 @Override logd(String msg)75 protected void logd(String msg) { 76 Rlog.d(LOG_TAG, msg); 77 } 78 79 @Override loge(String msg)80 protected void loge(String msg) { 81 Rlog.e(LOG_TAG, msg); 82 } 83 } 84