FileDocCategorySizeDatePackage
UiccPhoneBookController.javaAPI DocAndroid 5.1 API6204Thu Mar 12 22:22:54 GMT 2015com.android.internal.telephony

UiccPhoneBookController

public class UiccPhoneBookController extends IIccPhoneBook.Stub

Fields Summary
private static final String
TAG
private com.android.internal.telephony.Phone[]
mPhone
Constructors Summary
public UiccPhoneBookController(com.android.internal.telephony.Phone[] phone)


    /* only one UiccPhoneBookController exists */
       
        if (ServiceManager.getService("simphonebook") == null) {
               ServiceManager.addService("simphonebook", this);
        }
        mPhone = phone;
    
Methods Summary
public java.util.ListgetAdnRecordsInEf(int efid)

        return getAdnRecordsInEfForSubscriber(getDefaultSubscription(), efid);
    
public java.util.ListgetAdnRecordsInEfForSubscriber(int subId, int efid)

        IccPhoneBookInterfaceManagerProxy iccPbkIntMgrProxy =
                             getIccPhoneBookInterfaceManagerProxy(subId);
        if (iccPbkIntMgrProxy != null) {
            return iccPbkIntMgrProxy.getAdnRecordsInEf(efid);
        } else {
            Rlog.e(TAG,"getAdnRecordsInEf iccPbkIntMgrProxy is" +
                      "null for Subscription:"+subId);
            return null;
        }
    
public int[]getAdnRecordsSize(int efid)

        return getAdnRecordsSizeForSubscriber(getDefaultSubscription(), efid);
    
public int[]getAdnRecordsSizeForSubscriber(int subId, int efid)

        IccPhoneBookInterfaceManagerProxy iccPbkIntMgrProxy =
                             getIccPhoneBookInterfaceManagerProxy(subId);
        if (iccPbkIntMgrProxy != null) {
            return iccPbkIntMgrProxy.getAdnRecordsSize(efid);
        } else {
            Rlog.e(TAG,"getAdnRecordsSize iccPbkIntMgrProxy is" +
                      " null for Subscription:"+subId);
            return null;
        }
    
private intgetDefaultSubscription()

        return PhoneFactory.getDefaultSubscription();
    
private com.android.internal.telephony.IccPhoneBookInterfaceManagerProxygetIccPhoneBookInterfaceManagerProxy(int subId)
get phone book interface manager proxy object based on subscription.


        int phoneId = SubscriptionController.getInstance().getPhoneId(subId);
        try {
            return ((PhoneProxy)mPhone[(int)phoneId]).getIccPhoneBookInterfaceManagerProxy();
        } catch (NullPointerException e) {
            Rlog.e(TAG, "Exception is :"+e.toString()+" For subscription :"+subId );
            e.printStackTrace(); //To print stack trace
            return null;
        } catch (ArrayIndexOutOfBoundsException e) {
            Rlog.e(TAG, "Exception is :"+e.toString()+" For subscription :"+subId );
            e.printStackTrace();
            return null;
        }
    
public booleanupdateAdnRecordsInEfByIndex(int efid, java.lang.String newTag, java.lang.String newPhoneNumber, int index, java.lang.String pin2)

        return updateAdnRecordsInEfByIndexForSubscriber(getDefaultSubscription(), efid, newTag,
                newPhoneNumber, index, pin2);
    
public booleanupdateAdnRecordsInEfByIndexForSubscriber(int subId, int efid, java.lang.String newTag, java.lang.String newPhoneNumber, int index, java.lang.String pin2)

        IccPhoneBookInterfaceManagerProxy iccPbkIntMgrProxy =
                             getIccPhoneBookInterfaceManagerProxy(subId);
        if (iccPbkIntMgrProxy != null) {
            return iccPbkIntMgrProxy.updateAdnRecordsInEfByIndex(efid, newTag,
                    newPhoneNumber, index, pin2);
        } else {
            Rlog.e(TAG,"updateAdnRecordsInEfByIndex iccPbkIntMgrProxy is" +
                      " null for Subscription:"+subId);
            return false;
        }
    
public booleanupdateAdnRecordsInEfBySearch(int efid, java.lang.String oldTag, java.lang.String oldPhoneNumber, java.lang.String newTag, java.lang.String newPhoneNumber, java.lang.String pin2)

        return updateAdnRecordsInEfBySearchForSubscriber(getDefaultSubscription(), efid, oldTag,
                oldPhoneNumber, newTag, newPhoneNumber, pin2);
    
public booleanupdateAdnRecordsInEfBySearchForSubscriber(int subId, int efid, java.lang.String oldTag, java.lang.String oldPhoneNumber, java.lang.String newTag, java.lang.String newPhoneNumber, java.lang.String pin2)

        IccPhoneBookInterfaceManagerProxy iccPbkIntMgrProxy =
                             getIccPhoneBookInterfaceManagerProxy(subId);
        if (iccPbkIntMgrProxy != null) {
            return iccPbkIntMgrProxy.updateAdnRecordsInEfBySearch(efid, oldTag,
                    oldPhoneNumber, newTag, newPhoneNumber, pin2);
        } else {
            Rlog.e(TAG,"updateAdnRecordsInEfBySearch iccPbkIntMgrProxy is" +
                      " null for Subscription:"+subId);
            return false;
        }