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

Commit 17a99fb6 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Improve the Safety Checks on IccCardStatus.toString()" into oc-dr1-dev

parents cd7d8320 216973ae
Loading
Loading
Loading
Loading
+12 −9
Original line number Diff line number Diff line
@@ -116,30 +116,33 @@ public class IccCardStatus {
        StringBuilder sb = new StringBuilder();
        sb.append("IccCardState {").append(mCardState).append(",")
        .append(mUniversalPinState)
        .append(",num_apps=").append(mApplications.length)
        .append(",gsm_id=").append(mGsmUmtsSubscriptionAppIndex);
        if (mGsmUmtsSubscriptionAppIndex >=0
                && mGsmUmtsSubscriptionAppIndex <CARD_MAX_APPS) {
        .append(",num_apps=").append(mApplications.length);

        sb.append(",gsm_id=").append(mGsmUmtsSubscriptionAppIndex);
        if (mApplications != null
                && mGsmUmtsSubscriptionAppIndex >= 0
                && mGsmUmtsSubscriptionAppIndex < mApplications.length) {
            app = mApplications[mGsmUmtsSubscriptionAppIndex];
            sb.append(app == null ? "null" : app);
        }

        sb.append(",cdma_id=").append(mCdmaSubscriptionAppIndex);
        if (mCdmaSubscriptionAppIndex >=0
                && mCdmaSubscriptionAppIndex <CARD_MAX_APPS) {
        if (mApplications != null
                && mCdmaSubscriptionAppIndex >= 0
                && mCdmaSubscriptionAppIndex < mApplications.length) {
            app = mApplications[mCdmaSubscriptionAppIndex];
            sb.append(app == null ? "null" : app);
        }

        sb.append(",ims_id=").append(mImsSubscriptionAppIndex);
        if (mImsSubscriptionAppIndex >=0
                && mImsSubscriptionAppIndex <CARD_MAX_APPS) {
        if (mApplications != null
                && mImsSubscriptionAppIndex >= 0
                && mImsSubscriptionAppIndex < mApplications.length) {
            app = mApplications[mImsSubscriptionAppIndex];
            sb.append(app == null ? "null" : app);
        }

        sb.append("}");

        return sb.toString();
    }