We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ce3ac5f + 213c853 commit f0fa841Copy full SHA for f0fa841
telephony/java/com/android/internal/telephony/IccCard.java
@@ -672,12 +672,11 @@ public boolean isApplicationOnIcc(IccCardApplication.AppType type) {
672
* @return true if a ICC card is present
673
*/
674
public boolean hasIccCard() {
675
- boolean isIccPresent;
676
- if (mPhone.getPhoneName().equals("GSM")) {
677
- return mIccCardStatus.getCardState().isCardPresent();
678
- } else {
679
- // TODO: Make work with a CDMA device with a RUIM card.
+ if (mIccCardStatus == null) {
680
return false;
+ } else {
+ // Returns ICC card status for both GSM and CDMA mode
+ return mIccCardStatus.getCardState().isCardPresent();
681
}
682
683
0 commit comments