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