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

Commit 8f446114 authored by yanxue.xu's avatar yanxue.xu
Browse files

Get isim card data use subId.

Get isim card data is obtained the default card data instead of the corresponding card data.
It is necessary to obtain the card data according to the subid.
Test: Get isim card data use subId.

Change-Id: I7d455740fa293203ba158135e18c4bb718fd9885
parent 7d64fae5
Loading
Loading
Loading
Loading
+75 −35
Original line number Diff line number Diff line
@@ -331,8 +331,12 @@ public class PhoneSubInfoController extends IPhoneSubInfo.Stub {
    }


    public String getIsimImpi() {
        Phone phone = getPhone(getDefaultSubscription());
    /**
    * get the Isim Impi based on subId
    */
    public String getIsimImpi(int subId) {
        Phone phone = getPhone(subId);
        if (phone != null) {
            mContext.enforceCallingOrSelfPermission(READ_PRIVILEGED_PHONE_STATE,
                    "Requires READ_PRIVILEGED_PHONE_STATE");
            IsimRecords isim = phone.getIsimRecords();
@@ -341,10 +345,18 @@ public class PhoneSubInfoController extends IPhoneSubInfo.Stub {
            } else {
                return null;
            }
        } else {
            loge("getIsimImpi phone is null for Subscription:" + subId);
            return null;
        }
    }

    public String getIsimDomain() {
        Phone phone = getPhone(getDefaultSubscription());
    /**
    * get the Isim Domain based on subId
    */
    public String getIsimDomain(int subId) {
        Phone phone = getPhone(subId);
        if (phone != null) {
            mContext.enforceCallingOrSelfPermission(READ_PRIVILEGED_PHONE_STATE,
                    "Requires READ_PRIVILEGED_PHONE_STATE");
            IsimRecords isim = phone.getIsimRecords();
@@ -353,10 +365,18 @@ public class PhoneSubInfoController extends IPhoneSubInfo.Stub {
            } else {
                return null;
            }
        } else {
            loge("getIsimDomain phone is null for Subscription:" + subId);
            return null;
        }
    }

    public String[] getIsimImpu() {
        Phone phone = getPhone(getDefaultSubscription());
    /**
    * get the Isim Impu based on subId
    */
    public String[] getIsimImpu(int subId) {
        Phone phone = getPhone(subId);
        if (phone != null) {
            mContext.enforceCallingOrSelfPermission(READ_PRIVILEGED_PHONE_STATE,
                    "Requires READ_PRIVILEGED_PHONE_STATE");
            IsimRecords isim = phone.getIsimRecords();
@@ -365,10 +385,18 @@ public class PhoneSubInfoController extends IPhoneSubInfo.Stub {
            } else {
                return null;
            }
        } else {
            loge("getIsimImpu phone is null for Subscription:" + subId);
            return null;
        }
    }

    public String getIsimIst() throws RemoteException {
        Phone phone = getPhone(getDefaultSubscription());
    /**
    * get the Isim Ist based on subId
    */
    public String getIsimIst(int subId) throws RemoteException {
        Phone phone = getPhone(subId);
        if (phone != null) {
            mContext.enforceCallingOrSelfPermission(READ_PRIVILEGED_PHONE_STATE,
                    "Requires READ_PRIVILEGED_PHONE_STATE");
            IsimRecords isim = phone.getIsimRecords();
@@ -377,10 +405,18 @@ public class PhoneSubInfoController extends IPhoneSubInfo.Stub {
            } else {
                return null;
            }
        } else {
            loge("getIsimIst phone is null for Subscription:" + subId);
            return null;
        }
    }

    public String[] getIsimPcscf() throws RemoteException {
        Phone phone = getPhone(getDefaultSubscription());
    /**
    * get the Isim Pcscf based on subId
    */
    public String[] getIsimPcscf(int subId) throws RemoteException {
        Phone phone = getPhone(subId);
        if (phone != null) {
            mContext.enforceCallingOrSelfPermission(READ_PRIVILEGED_PHONE_STATE,
                    "Requires READ_PRIVILEGED_PHONE_STATE");
            IsimRecords isim = phone.getIsimRecords();
@@ -389,6 +425,10 @@ public class PhoneSubInfoController extends IPhoneSubInfo.Stub {
            } else {
                return null;
            }
        } else {
            loge("getIsimPcscf phone is null for Subscription:" + subId);
            return null;
        }
    }

    public String getIsimChallengeResponse(String nonce) throws RemoteException {