UiccPhoneBookControllerpublic 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.List | getAdnRecordsInEf(int efid)
return getAdnRecordsInEfForSubscriber(getDefaultSubscription(), efid);
| public java.util.List | getAdnRecordsInEfForSubscriber(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 int | getDefaultSubscription()
return PhoneFactory.getDefaultSubscription();
| private com.android.internal.telephony.IccPhoneBookInterfaceManagerProxy | getIccPhoneBookInterfaceManagerProxy(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 boolean | updateAdnRecordsInEfByIndex(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 boolean | updateAdnRecordsInEfByIndexForSubscriber(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 boolean | updateAdnRecordsInEfBySearch(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 boolean | updateAdnRecordsInEfBySearchForSubscriber(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;
}
|
|