Home | History | Annotate | Download | only in cdma
      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 
     17 package com.android.internal.telephony.cdma;
     18 
     19 import android.os.*;
     20 import android.util.Log;
     21 
     22 import com.android.internal.telephony.IccConstants;
     23 import com.android.internal.telephony.IccException;
     24 import com.android.internal.telephony.IccFileHandler;
     25 import com.android.internal.telephony.IccFileTypeMismatch;
     26 import com.android.internal.telephony.IccIoResult;
     27 import com.android.internal.telephony.IccUtils;
     28 import com.android.internal.telephony.PhoneProxy;
     29 
     30 import java.util.ArrayList;
     31 
     32 /**
     33  * {@hide}
     34  */
     35 public final class RuimFileHandler extends IccFileHandler {
     36     static final String LOG_TAG = "CDMA";
     37 
     38     //***** Instance Variables
     39 
     40     //***** Constructor
     41     RuimFileHandler(CDMAPhone phone) {
     42         super(phone);
     43     }
     44 
     45     public void dispose() {
     46     }
     47 
     48     protected void finalize() {
     49         Log.d(LOG_TAG, "RuimFileHandler finalized");
     50     }
     51 
     52     //***** Overridden from IccFileHandler
     53 
     54     @Override
     55     public void loadEFImgTransparent(int fileid, int highOffset, int lowOffset,
     56             int length, Message onLoaded) {
     57         Message response = obtainMessage(EVENT_READ_ICON_DONE, fileid, 0,
     58                 onLoaded);
     59 
     60         phone.mCM.iccIO(COMMAND_GET_RESPONSE, fileid, "img", 0, 0,
     61                 GET_RESPONSE_EF_IMG_SIZE_BYTES, null, null, response);
     62     }
     63 
     64     @Override
     65     public void handleMessage(Message msg) {
     66 
     67         super.handleMessage(msg);
     68     }
     69 
     70     protected String getEFPath(int efid) {
     71         switch(efid) {
     72         case EF_SMS:
     73         case EF_CST:
     74         case EF_RUIM_SPN:
     75             return MF_SIM + DF_CDMA;
     76         }
     77         return getCommonIccEFPath(efid);
     78     }
     79 
     80     protected void logd(String msg) {
     81         Log.d(LOG_TAG, "[RuimFileHandler] " + msg);
     82     }
     83 
     84     protected void loge(String msg) {
     85         Log.e(LOG_TAG, "[RuimFileHandler] " + msg);
     86     }
     87 
     88 }
     89