Make hasIccCard return true if RUIM card is present.

Currently hasIccCard method works only for GSM phones with SIM/USIM
cards. Extend that to RUIM as well.

Change-Id: Iefbfc35025074e7414f4abdffea844e9e0325053
This commit is contained in:
Naveen Kalla
2010-06-26 22:52:39 -07:00
parent dd1880ee5b
commit 213c853f40

View File

@@ -672,12 +672,11 @@ public abstract class IccCard {
* @return true if a ICC card is present
*/
public boolean hasIccCard() {
boolean isIccPresent;
if (mPhone.getPhoneName().equals("GSM")) {
return mIccCardStatus.getCardState().isCardPresent();
} else {
// TODO: Make work with a CDMA device with a RUIM card.
if (mIccCardStatus == null) {
return false;
} else {
// Returns ICC card status for both GSM and CDMA mode
return mIccCardStatus.getCardState().isCardPresent();
}
}