diff options
author | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | 2023-05-09 16:24:21 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2023-05-09 16:24:21 +0000 |
commit | 644ab12d1040c6c95c967f5bb93aa2d924501e50 (patch) | |
tree | c71e6d6b9be17ccce6c35eeb1388a5eb3771c813 | |
parent | e5cdf7b0bfd38c5135f7e221d0ce5375a71e3e60 (diff) | |
parent | ceeca2946eec8d5cf9064345d5ef95233b13a7f3 (diff) | |
download | telephony-644ab12d1040c6c95c967f5bb93aa2d924501e50.tar.gz |
Merge "The CL moves the FDN fetching logic from SimRecords to IccRecord base class" into udc-dev
3 files changed, 20 insertions, 20 deletions
diff --git a/src/java/com/android/internal/telephony/uicc/IccRecords.java b/src/java/com/android/internal/telephony/uicc/IccRecords.java index fa00b16ca8..f80369675a 100644 --- a/src/java/com/android/internal/telephony/uicc/IccRecords.java +++ b/src/java/com/android/internal/telephony/uicc/IccRecords.java @@ -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)); + } + } } diff --git a/src/java/com/android/internal/telephony/uicc/SIMRecords.java b/src/java/com/android/internal/telephony/uicc/SIMRecords.java index daf7842a9e..a97b00bdae 100644 --- a/src/java/com/android/internal/telephony/uicc/SIMRecords.java +++ b/src/java/com/android/internal/telephony/uicc/SIMRecords.java @@ -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; diff --git a/src/java/com/android/internal/telephony/uicc/UiccCardApplication.java b/src/java/com/android/internal/telephony/uicc/UiccCardApplication.java index 4eaf7a6e83..fe19e991cb 100644 --- a/src/java/com/android/internal/telephony/uicc/UiccCardApplication.java +++ b/src/java/com/android/internal/telephony/uicc/UiccCardApplication.java @@ -271,7 +271,7 @@ public class UiccCardApplication { loge("Bogus facility lock response"); } if (mIccFdnEnabled && mIccFdnAvailable) { - ((SIMRecords) mIccRecords).loadFdnRecords(); + mIccRecords.loadFdnRecords(); } } } |