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