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

Commit 33aff171 authored by Arun kumar Voddu's avatar Arun kumar Voddu Committed by Automerger Merge Worker
Browse files

Merge "Load the FDN records when the USIM initializes and the SIM refreshes"...

Merge "Load the FDN records when the USIM initializes and the SIM refreshes" am: d611558f am: c9d4ccf8

Original change: https://android-review.googlesource.com/c/platform/frameworks/opt/telephony/+/2475270



Change-Id: I15bcea5160ef3c59a4cf0d017b0d74614c5a7063
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents df3ed5aa c9d4ccf8
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -190,6 +190,7 @@ public class SIMRecords extends IccRecords {
    private static final int EVENT_SET_FPLMN_DONE = 43 + SIM_RECORD_EVENT_BASE;
    protected static final int EVENT_GET_SMSS_RECORD_DONE = 46 + SIM_RECORD_EVENT_BASE;
    protected static final int EVENT_GET_PSISMSC_DONE = 47 + SIM_RECORD_EVENT_BASE;
    protected static final int EVENT_GET_FDN_DONE = 48 + SIM_RECORD_EVENT_BASE;

    // ***** Constructor

@@ -283,6 +284,7 @@ public class SIMRecords extends IccRecords {
    private int getExtFromEf(int ef) {
        int ext;
        switch (ef) {
            case EF_FDN: return EF_EXT2;
            case EF_MSISDN:
                /* For USIM apps use EXT5. (TS 31.102 Section 4.2.37) */
                if (mParentApp.getType() == AppType.APPTYPE_USIM) {
@@ -1326,6 +1328,15 @@ public class SIMRecords extends IccRecords {
                    }
                    break;

                case EVENT_GET_FDN_DONE:
                    ar = (AsyncResult) msg.obj;
                    if (ar.exception != null) {
                        loge("Failed to read USIM EF_FDN field error=" + ar.exception);
                    } else {
                        log("EF_FDN read successfully");
                    }
                    break;

                default:
                    super.handleMessage(msg);   // IccRecords handles generic record load responses
            }
@@ -2151,6 +2162,15 @@ public class SIMRecords extends IccRecords {
        log("[CSP] Value Added Service Group (0xC0), not found!");
    }

    public void loadFdnRecords() {
        if (mParentApp != null && mParentApp.getIccFdnEnabled()
                && mParentApp.getIccFdnAvailable()) {
            log("Loading FdnRecords");
            mAdnCache.requestLoadAllAdnLike(IccConstants.EF_FDN, getExtFromEf(IccConstants.EF_FDN),
                    obtainMessage(EVENT_GET_FDN_DONE));
        }
    }

    @Override
    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        pw.println("SIMRecords: " + this);
+3 −0
Original line number Diff line number Diff line
@@ -266,6 +266,9 @@ public class UiccCardApplication {
            } else {
                loge("Bogus facility lock response");
            }
            if (mIccFdnEnabled && mIccFdnAvailable) {
                ((SIMRecords) mIccRecords).loadFdnRecords();
            }
        }
    }