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

Commit a9f1c99e authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "The CL moves the FDN fetching logic from SimRecords to IccRecord base...

Merge "The CL moves the FDN fetching logic from SimRecords to IccRecord base class" into udc-dev am: 644ab12d am: 298e3add

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



Change-Id: Ib535a41e0de10148091ec7a97b07e531ee99c827
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 40bc272c 298e3add
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -257,6 +257,8 @@ public abstract class IccRecords extends Handler implements IccConstants {
    // call back received on this upon EF_SMSS record update.
    public static final int EVENT_SET_SMSS_RECORD_DONE = 201;

    private static final int EVENT_GET_FDN_DONE = 202;

    /**
     * There are two purposes for this class. First, each instance of AuthAsyncResponse acts as a
     * lock to for calling thead to wait in getIccSimChallengeResponse(). Second, pass the IMS
@@ -999,6 +1001,15 @@ public abstract class IccRecords extends Handler implements IccConstants {
                }
                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);
        }
@@ -1674,4 +1685,12 @@ public abstract class IccRecords extends Handler implements IccConstants {
            return mMsg;
        }
    }

    public void loadFdnRecords() {
        if (mParentApp != null) {
            log("Loading FdnRecords");
            mAdnCache.requestLoadAllAdnLike(IccConstants.EF_FDN, EF_EXT2,
                    obtainMessage(EVENT_GET_FDN_DONE));
        }
    }
}
+0 −19
Original line number Diff line number Diff line
@@ -191,7 +191,6 @@ 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

@@ -1360,15 +1359,6 @@ 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
            }
@@ -2194,15 +2184,6 @@ 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));
        }
    }

    @VisibleForTesting
    public void setMailboxIndex(int mailboxIndex) {
        mMailboxIndex = mailboxIndex;
+1 −1
Original line number Diff line number Diff line
@@ -271,7 +271,7 @@ public class UiccCardApplication {
                loge("Bogus facility lock response");
            }
            if (mIccFdnEnabled && mIccFdnAvailable) {
                ((SIMRecords) mIccRecords).loadFdnRecords();
                mIccRecords.loadFdnRecords();
            }
        }
    }