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

Commit 599f207f authored by Wink Saville's avatar Wink Saville Committed by Android Git Automerger
Browse files

am db1b0c54: am 1d40e34c: Merge "Telephony: Remove CdmaLteUicc objects"

* commit 'db1b0c54':
  Telephony: Remove CdmaLteUicc objects
parents 3d5e9bd1 db1b0c54
Loading
Loading
Loading
Loading
+71 −0
Original line number Original line Diff line number Diff line
/*
/*
 * Copyright (C) 2011 The Android Open Source Project
 * Copyright (C) 2006, 2012 The Android Open Source Project
 *
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * you may not use this file except in compliance with the License.
@@ -14,66 +14,58 @@
 * limitations under the License.
 * limitations under the License.
 */
 */


package com.android.internal.telephony.cdma;
package com.android.internal.telephony;


import android.util.Log;
import android.util.Log;


import com.android.internal.telephony.CommandsInterface;
import com.android.internal.telephony.CommandsInterface;
import com.android.internal.telephony.IccCard;
import com.android.internal.telephony.IccConstants;
import com.android.internal.telephony.IccConstants;
import com.android.internal.telephony.IccFileHandler;
import com.android.internal.telephony.IccFileHandler;
import android.os.Message;
import com.android.internal.telephony.UiccCardApplication;


/**
/**
 * {@hide}
 * {@hide}
 * This class should be used to access files in CSIM ADF
 */
 */
public final class CdmaLteUiccFileHandler extends IccFileHandler {
public final class CsimFileHandler extends IccFileHandler implements IccConstants {
    static final String LOG_TAG = "CDMA";
    static final String LOG_TAG = "RIL_CsimFH";


    public CdmaLteUiccFileHandler(IccCard card, String aid, CommandsInterface ci) {
    public CsimFileHandler(UiccCardApplication app, String aid, CommandsInterface ci) {
        super(card, aid, ci);
        super(app, aid, ci);
    }
    }


    @Override
    protected String getEFPath(int efid) {
    protected String getEFPath(int efid) {
        switch(efid) {
        switch(efid) {
        case EF_CSIM_SPN:
        case EF_SMS:
        case EF_CST:
        case EF_FDN:
        case EF_MSISDN:
        case EF_RUIM_SPN:
        case EF_CSIM_LI:
        case EF_CSIM_LI:
        case EF_CSIM_MDN:
        case EF_CSIM_MDN:
        case EF_CSIM_IMSIM:
        case EF_CSIM_IMSIM:
        case EF_CSIM_CDMAHOME:
        case EF_CSIM_CDMAHOME:
        case EF_CSIM_EPRL:
        case EF_CSIM_EPRL:
            return MF_SIM + DF_CDMA;
            return MF_SIM + DF_ADF;
        case EF_AD:
            return MF_SIM + DF_GSM;
        case EF_IMPI:
        case EF_DOMAIN:
        case EF_IMPU:
            return MF_SIM + DF_ADFISIM;
        }
        return getCommonIccEFPath(efid);
        }
        }

        String path = getCommonIccEFPath(efid);
    @Override
        if (path == null) {
    public void loadEFTransparent(int fileid, Message onLoaded) {
            // The EFids in UICC phone book entries are decided by the card manufacturer.
        if (fileid == EF_CSIM_EPRL) {
            // So if we don't match any of the cases above and if its a UICC return
            // Entire PRL could be huge. We are only interested in
            // the global 3g phone book path.
            // the first 4 bytes of the record.
            return MF_SIM + DF_TELECOM + DF_PHONEBOOK;
            mCi.iccIOForApp(COMMAND_READ_BINARY, fileid, getEFPath(fileid),
                            0, 0, 4, null, null, mAid,
                            obtainMessage(EVENT_READ_BINARY_DONE,
                                          fileid, 0, onLoaded));
        } else {
            super.loadEFTransparent(fileid, onLoaded);
        }
        }
        return path;
    }
    }



    @Override
    protected void logd(String msg) {
    protected void logd(String msg) {
        Log.d(LOG_TAG, "[CdmaLteUiccFileHandler] " + msg);
        Log.d(LOG_TAG, msg);
    }
    }


    @Override
    protected void loge(String msg) {
    protected void loge(String msg) {
        Log.e(LOG_TAG, "[CdmaLteUiccFileHandler] " + msg);
        Log.e(LOG_TAG, msg);
    }
    }

}
}
+59 −789

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Original line Diff line number Diff line
@@ -24,7 +24,7 @@ import com.android.internal.telephony.IccCardStatus.PinState;
 *
 *
 * {@hide}
 * {@hide}
 */
 */
public class IccCardApplication {
public class IccCardApplicationStatus {
    public enum AppType{
    public enum AppType{
        APPTYPE_UNKNOWN,
        APPTYPE_UNKNOWN,
        APPTYPE_SIM,
        APPTYPE_SIM,
+690 −0

File added.

Preview size limit exceeded, changes collapsed.

+17 −62
Original line number Original line Diff line number Diff line
@@ -57,19 +57,13 @@ public class IccCardStatus {
        }
        }
    }
    }


    private CardState  mCardState;
    public CardState  mCardState;
    private PinState   mUniversalPinState;
    public PinState   mUniversalPinState;
    private int        mGsmUmtsSubscriptionAppIndex;
    public int        mGsmUmtsSubscriptionAppIndex;
    private int        mCdmaSubscriptionAppIndex;
    public int        mCdmaSubscriptionAppIndex;
    private int        mImsSubscriptionAppIndex;
    public int        mImsSubscriptionAppIndex;
    private int        mNumApplications;


    public IccCardApplicationStatus[] mApplications;
    private ArrayList<IccCardApplication> mApplications =
            new ArrayList<IccCardApplication>(CARD_MAX_APPS);

    public CardState getCardState() {
        return mCardState;
    }


    public void setCardState(int state) {
    public void setCardState(int state) {
        switch(state) {
        switch(state) {
@@ -87,10 +81,6 @@ public class IccCardStatus {
        }
        }
    }
    }


    public PinState getUniversalPinState() {
        return mUniversalPinState;
    }

    public void setUniversalPinState(int state) {
    public void setUniversalPinState(int state) {
        switch(state) {
        switch(state) {
        case 0:
        case 0:
@@ -116,69 +106,34 @@ public class IccCardStatus {
        }
        }
    }
    }


    public int getGsmUmtsSubscriptionAppIndex() {
        return mGsmUmtsSubscriptionAppIndex;
    }

    public void setGsmUmtsSubscriptionAppIndex(int gsmUmtsSubscriptionAppIndex) {
        mGsmUmtsSubscriptionAppIndex = gsmUmtsSubscriptionAppIndex;
    }

    public int getCdmaSubscriptionAppIndex() {
        return mCdmaSubscriptionAppIndex;
    }

    public void setCdmaSubscriptionAppIndex(int cdmaSubscriptionAppIndex) {
        mCdmaSubscriptionAppIndex = cdmaSubscriptionAppIndex;
    }

    public int getImsSubscriptionAppIndex() {
        return mImsSubscriptionAppIndex;
    }

    public void setImsSubscriptionAppIndex(int imsSubscriptionAppIndex) {
        mImsSubscriptionAppIndex = imsSubscriptionAppIndex;
    }

    public int getNumApplications() {
        return mNumApplications;
    }

    public void setNumApplications(int numApplications) {
        mNumApplications = numApplications;
    }

    public void addApplication(IccCardApplication application) {
        mApplications.add(application);
    }

    public IccCardApplication getApplication(int index) {
        return mApplications.get(index);
    }

    @Override
    @Override
    public String toString() {
    public String toString() {
        IccCardApplication app;
        IccCardApplicationStatus app;


        StringBuilder sb = new StringBuilder();
        StringBuilder sb = new StringBuilder();
        sb.append("IccCardState {").append(mCardState).append(",")
        sb.append("IccCardState {").append(mCardState).append(",")
        .append(mUniversalPinState)
        .append(mUniversalPinState)
        .append(",num_apps=").append(mNumApplications)
        .append(",num_apps=").append(mApplications.length)
        .append(",gsm_id=").append(mGsmUmtsSubscriptionAppIndex);
        .append(",gsm_id=").append(mGsmUmtsSubscriptionAppIndex);
        if (mGsmUmtsSubscriptionAppIndex >=0
        if (mGsmUmtsSubscriptionAppIndex >=0
                && mGsmUmtsSubscriptionAppIndex <CARD_MAX_APPS) {
                && mGsmUmtsSubscriptionAppIndex <CARD_MAX_APPS) {
            app = getApplication(mGsmUmtsSubscriptionAppIndex);
            app = mApplications[mGsmUmtsSubscriptionAppIndex];
            sb.append(app == null ? "null" : app);
            sb.append(app == null ? "null" : app);
        }
        }


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


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


        sb.append("}");
        sb.append("}");


Loading