Home | History | Annotate | Download | only in telephony
      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;
     18 
     19 import android.os.ServiceManager;
     20 import com.android.internal.telephony.uicc.AdnRecord;
     21 
     22 
     23 import java.util.List;
     24 
     25 
     26 /**
     27  * SimPhoneBookInterfaceManager to provide an inter-process communication to
     28  * access ADN-like SIM records.
     29  */
     30 public class IccPhoneBookInterfaceManagerProxy {
     31     private IccPhoneBookInterfaceManager mIccPhoneBookInterfaceManager;
     32 
     33     public IccPhoneBookInterfaceManagerProxy(IccPhoneBookInterfaceManager
     34             iccPhoneBookInterfaceManager) {
     35         mIccPhoneBookInterfaceManager = iccPhoneBookInterfaceManager;
     36     }
     37 
     38     public void setmIccPhoneBookInterfaceManager(
     39             IccPhoneBookInterfaceManager iccPhoneBookInterfaceManager) {
     40         mIccPhoneBookInterfaceManager = iccPhoneBookInterfaceManager;
     41     }
     42 
     43     public boolean
     44     updateAdnRecordsInEfBySearch (int efid,
     45             String oldTag, String oldPhoneNumber,
     46             String newTag, String newPhoneNumber,
     47             String pin2) {
     48         return mIccPhoneBookInterfaceManager.updateAdnRecordsInEfBySearch(
     49                 efid, oldTag, oldPhoneNumber, newTag, newPhoneNumber, pin2);
     50     }
     51 
     52     public boolean
     53     updateAdnRecordsInEfByIndex(int efid, String newTag,
     54             String newPhoneNumber, int index, String pin2) {
     55         return mIccPhoneBookInterfaceManager.updateAdnRecordsInEfByIndex(efid,
     56                 newTag, newPhoneNumber, index, pin2);
     57     }
     58 
     59     public int[] getAdnRecordsSize(int efid) {
     60         return mIccPhoneBookInterfaceManager.getAdnRecordsSize(efid);
     61     }
     62 
     63     public List<AdnRecord> getAdnRecordsInEf(int efid) {
     64         return mIccPhoneBookInterfaceManager.getAdnRecordsInEf(efid);
     65     }
     66 }
     67