Loading src/java/com/android/internal/telephony/uicc/UiccCard.java +2 −2 Original line number Diff line number Diff line Loading @@ -47,8 +47,8 @@ public class UiccCard { "com.android.internal.telephony.uicc.ICC_CARD_ADDED"; // The lock object is created by UiccSlot that owns this UiccCard - this is to share the lock // between UiccSlot, UiccCard and UiccProfile for now. private final Object mLock; // between UiccSlot, UiccCard, EuiccCard, and UiccProfile for now. protected final Object mLock; private CardState mCardState; private String mIccid; protected String mCardId; Loading src/java/com/android/internal/telephony/uicc/UiccProfile.java +2 −0 Original line number Diff line number Diff line Loading @@ -242,6 +242,7 @@ public class UiccProfile extends IccCard { } if (mUiccCard instanceof EuiccCard) { // for RadioConfig<1.1 eid is not known when the EuiccCard is constructed ((EuiccCard) mUiccCard).registerForEidReady(mHandler, EVENT_EID_READY, null); } Loading Loading @@ -423,6 +424,7 @@ public class UiccProfile extends IccCard { } if (mUiccCard instanceof EuiccCard && ((EuiccCard) mUiccCard).getEid() == null) { // for RadioConfig<1.1 the EID is not known when the EuiccCard is constructed if (DBG) log("EID is not ready yet."); return; } Loading src/java/com/android/internal/telephony/uicc/UiccSlot.java +6 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.os.Message; import android.os.PowerManager; import android.telephony.Rlog; import android.telephony.TelephonyManager; import android.text.TextUtils; import android.view.WindowManager; import com.android.internal.R; Loading Loading @@ -115,6 +116,11 @@ public class UiccSlot extends Handler { if (!mIsEuicc) { mUiccCard = new UiccCard(mContext, mCi, ics, mPhoneId, mLock); } else { // The EID should be reported with the card status, but in case it's not we want // to catch that here if (TextUtils.isEmpty(ics.eid)) { loge("update: eid is missing. ics.eid=" + ics.eid); } mUiccCard = new EuiccCard(mContext, mCi, ics, phoneId, mLock); } } else { Loading src/java/com/android/internal/telephony/uicc/euicc/EuiccCard.java +19 −2 Original line number Diff line number Diff line Loading @@ -112,7 +112,6 @@ public class EuiccCard extends UiccCard { } private final ApduSender mApduSender; private final Object mLock = new Object(); private RegistrantList mEidReadyRegistrants; private EuiccSpecVersion mSpecVersion; private volatile String mEid; Loading @@ -122,7 +121,13 @@ public class EuiccCard extends UiccCard { // TODO: Set supportExtendedApdu based on ATR. mApduSender = new ApduSender(ci, ISD_R_AID, false /* supportExtendedApdu */); if (TextUtils.isEmpty(ics.eid)) { loge("no eid given in constructor for phone " + phoneId); loadEidAndNotifyRegistrants(); } else { mEid = ics.eid; mCardId = ics.eid; } } /** Loading Loading @@ -150,6 +155,8 @@ public class EuiccCard extends UiccCard { } } // For RadioConfig<1.1 we don't know the EID when constructing the EuiccCard, so callers may // need to register to be notified when we have the EID @VisibleForTesting(visibility = VisibleForTesting.Visibility.PRIVATE) protected void loadEidAndNotifyRegistrants() { Handler euiccMainThreadHandler = new Handler(); Loading Loading @@ -189,6 +196,16 @@ public class EuiccCard extends UiccCard { (byte[] response) -> mSpecVersion, callback, handler); } @Override public void update(Context c, CommandsInterface ci, IccCardStatus ics) { synchronized (mLock) { if (!TextUtils.isEmpty(ics.eid)) { mEid = ics.eid; } super.update(c, ci, ics); } } @Override protected void updateCardId() { if (TextUtils.isEmpty(mEid)) { Loading Loading
src/java/com/android/internal/telephony/uicc/UiccCard.java +2 −2 Original line number Diff line number Diff line Loading @@ -47,8 +47,8 @@ public class UiccCard { "com.android.internal.telephony.uicc.ICC_CARD_ADDED"; // The lock object is created by UiccSlot that owns this UiccCard - this is to share the lock // between UiccSlot, UiccCard and UiccProfile for now. private final Object mLock; // between UiccSlot, UiccCard, EuiccCard, and UiccProfile for now. protected final Object mLock; private CardState mCardState; private String mIccid; protected String mCardId; Loading
src/java/com/android/internal/telephony/uicc/UiccProfile.java +2 −0 Original line number Diff line number Diff line Loading @@ -242,6 +242,7 @@ public class UiccProfile extends IccCard { } if (mUiccCard instanceof EuiccCard) { // for RadioConfig<1.1 eid is not known when the EuiccCard is constructed ((EuiccCard) mUiccCard).registerForEidReady(mHandler, EVENT_EID_READY, null); } Loading Loading @@ -423,6 +424,7 @@ public class UiccProfile extends IccCard { } if (mUiccCard instanceof EuiccCard && ((EuiccCard) mUiccCard).getEid() == null) { // for RadioConfig<1.1 the EID is not known when the EuiccCard is constructed if (DBG) log("EID is not ready yet."); return; } Loading
src/java/com/android/internal/telephony/uicc/UiccSlot.java +6 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.os.Message; import android.os.PowerManager; import android.telephony.Rlog; import android.telephony.TelephonyManager; import android.text.TextUtils; import android.view.WindowManager; import com.android.internal.R; Loading Loading @@ -115,6 +116,11 @@ public class UiccSlot extends Handler { if (!mIsEuicc) { mUiccCard = new UiccCard(mContext, mCi, ics, mPhoneId, mLock); } else { // The EID should be reported with the card status, but in case it's not we want // to catch that here if (TextUtils.isEmpty(ics.eid)) { loge("update: eid is missing. ics.eid=" + ics.eid); } mUiccCard = new EuiccCard(mContext, mCi, ics, phoneId, mLock); } } else { Loading
src/java/com/android/internal/telephony/uicc/euicc/EuiccCard.java +19 −2 Original line number Diff line number Diff line Loading @@ -112,7 +112,6 @@ public class EuiccCard extends UiccCard { } private final ApduSender mApduSender; private final Object mLock = new Object(); private RegistrantList mEidReadyRegistrants; private EuiccSpecVersion mSpecVersion; private volatile String mEid; Loading @@ -122,7 +121,13 @@ public class EuiccCard extends UiccCard { // TODO: Set supportExtendedApdu based on ATR. mApduSender = new ApduSender(ci, ISD_R_AID, false /* supportExtendedApdu */); if (TextUtils.isEmpty(ics.eid)) { loge("no eid given in constructor for phone " + phoneId); loadEidAndNotifyRegistrants(); } else { mEid = ics.eid; mCardId = ics.eid; } } /** Loading Loading @@ -150,6 +155,8 @@ public class EuiccCard extends UiccCard { } } // For RadioConfig<1.1 we don't know the EID when constructing the EuiccCard, so callers may // need to register to be notified when we have the EID @VisibleForTesting(visibility = VisibleForTesting.Visibility.PRIVATE) protected void loadEidAndNotifyRegistrants() { Handler euiccMainThreadHandler = new Handler(); Loading Loading @@ -189,6 +196,16 @@ public class EuiccCard extends UiccCard { (byte[] response) -> mSpecVersion, callback, handler); } @Override public void update(Context c, CommandsInterface ci, IccCardStatus ics) { synchronized (mLock) { if (!TextUtils.isEmpty(ics.eid)) { mEid = ics.eid; } super.update(c, ci, ics); } } @Override protected void updateCardId() { if (TextUtils.isEmpty(mEid)) { Loading