am ccc41a26: Merge change 23870 into eclair

Merge commit 'ccc41a26b8e1d702c1ccec1642758bde52e1b435' into eclair-plus-aosp

* commit 'ccc41a26b8e1d702c1ccec1642758bde52e1b435':
  Allow hasIccCard to be useable by any processes.
This commit is contained in:
Wink Saville
2009-09-03 15:56:10 -07:00
committed by Android Git Automerger
2 changed files with 11 additions and 1 deletions

View File

@@ -484,7 +484,12 @@ public class TelephonyManager {
* @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;
}
}
/**

View File

@@ -252,5 +252,10 @@ interface ITelephony {
* Returns the network type
*/
int getNetworkType();
/**
* Return true if an ICC card is present
*/
boolean hasIccCard();
}