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