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

Commit 69de0b26 authored by Maanasa Gopal's avatar Maanasa Gopal Committed by Gerrit - the friendly Code Review server
Browse files

Fetch FDN record on SIM ready or SIM refresh

To avoid loading fdn contacts from sim to ADN cache when an MT call arives,
the FDN records are read and cached in AdnRecordCache while all other records
are read with sim state as ready or refresh.
This improves the time taken for querying FDN records.

Change-Id: I8c75515fe34550260160f3cc94ba85de336bc0a9
CRs-Fixed: 798105
parent 872f1079
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -169,6 +169,7 @@ public class SIMRecords extends IccRecords {
    private static final int EVENT_GET_CSP_CPHS_DONE = 33;
    private static final int EVENT_GET_GID1_DONE = 34;
    private static final int EVENT_APP_LOCKED = 35;
    private static final int EVENT_READ_FDN_DONE = 36;

    // Lookup table for carriers known to produce SIMs which incorrectly indicate MNC length.

@@ -1196,6 +1197,10 @@ public class SIMRecords extends IccRecords {

                break;

            case EVENT_READ_FDN_DONE:
                if (DBG) log("FDN records loaded");
                break;

            default:
                super.handleMessage(msg);   // IccRecords handles generic record load responses

@@ -1601,6 +1606,15 @@ public class SIMRecords extends IccRecords {
            mRecordsToLoad++;
        }

        if (mContext.getResources()
                    .getBoolean(com.android.internal.R.bool.config_fdn_contact_search)) {
            if (DBG) log("read FDN");
            mAdnCache.requestLoadAllAdnLike(IccConstants.EF_FDN,
                    mAdnCache.extensionEfForEf(IccConstants.EF_FDN), null,
                    obtainMessage(EVENT_READ_FDN_DONE));
            mRecordsToLoad++;
        }

        if (CRASH_RIL) {
            String sms = "0107912160130310f20404d0110041007030208054832b0120"
                         + "fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"