This is accomplished by adding hasIccCard to ITelephony and do
the implemenation in PhoneInterfaceManager.java. Then change
TelephonyManager to use getITelephony().hasIccCard().
Change-Id: I26970fdf92a058502b8156a4f52c14e213217fc6
* @return true if a ICC card is present
*/
public boolean hasIccCard() {
- return PhoneFactory.getDefaultPhone().getIccCard().hasIccCard();
+ try {
+ return getITelephony().hasIccCard();
+ } catch (RemoteException ex) {
+ // Assume no ICC card if remote exception which shouldn't happen
+ return false;
+ }
}
/**
* Returns the network type
*/
int getNetworkType();
+
+ /**
+ * Return true if an ICC card is present
+ */
+ boolean hasIccCard();
}