1/* 2 * Copyright (C) 2008 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.cdma; 18 19import android.os.*; 20import android.util.Log; 21 22import com.android.internal.telephony.CommandsInterface; 23import com.android.internal.telephony.IccFileHandler; 24import com.android.internal.telephony.UiccCardApplication; 25 26/** 27 * {@hide} 28 */ 29public final class RuimFileHandler extends IccFileHandler { 30 static final String LOG_TAG = "CDMA"; 31 32 //***** Instance Variables 33 34 //***** Constructor 35 public RuimFileHandler(UiccCardApplication app, String aid, CommandsInterface ci) { 36 super(app, aid, ci); 37 } 38 39 //***** Overridden from IccFileHandler 40 41 @Override 42 public void loadEFImgTransparent(int fileid, int highOffset, int lowOffset, 43 int length, Message onLoaded) { 44 Message response = obtainMessage(EVENT_READ_ICON_DONE, fileid, 0, 45 onLoaded); 46 47 mCi.iccIOForApp(COMMAND_GET_RESPONSE, fileid, "img", 0, 0, 48 GET_RESPONSE_EF_IMG_SIZE_BYTES, null, null, 49 mAid, response); 50 } 51 52 @Override 53 protected String getEFPath(int efid) { 54 switch(efid) { 55 case EF_SMS: 56 case EF_CST: 57 case EF_RUIM_SPN: 58 case EF_CSIM_LI: 59 case EF_CSIM_MDN: 60 case EF_CSIM_IMSIM: 61 case EF_CSIM_CDMAHOME: 62 case EF_CSIM_EPRL: 63 return MF_SIM + DF_CDMA; 64 } 65 return getCommonIccEFPath(efid); 66 } 67 68 @Override 69 protected void logd(String msg) { 70 Log.d(LOG_TAG, "[RuimFileHandler] " + msg); 71 } 72 73 @Override 74 protected void loge(String msg) { 75 Log.e(LOG_TAG, "[RuimFileHandler] " + msg); 76 } 77 78} 79