Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 213c853f authored by Naveen Kalla's avatar Naveen Kalla
Browse files

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
parent dd1880ee
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -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();
        }
    }