Loading src/java/com/android/internal/telephony/PhoneFactory.java +4 −0 Original line number Diff line number Diff line Loading @@ -552,4 +552,8 @@ public class PhoneFactory { } return phoneId; } public static SubInfoRecordUpdater getSubInfoRecordUpdater() { return sSubInfoRecordUpdater; } } src/java/com/android/internal/telephony/SubInfoRecordUpdater.java +17 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ public class SubInfoRecordUpdater extends Handler { private static final int EVENT_ICC_CHANGED = 2; private static final int EVENT_STACK_READY = 3; private static final String ICCID_STRING_FOR_NO_SIM = ""; private static final String ICCID_STRING_FOR_NV = "DUMMY_NV_ID"; /** * int[] sInsertSimState maintains all slots' SIM inserted status currently, * it may contain 4 kinds of values: Loading Loading @@ -95,6 +96,7 @@ public class SubInfoRecordUpdater extends Handler { private static TelephonyManager sTelephonyMgr = null; // To prevent repeatedly update flow every time receiver SIM_STATE_CHANGE private static boolean sNeedUpdate = true; private boolean isNVSubAvailable = false; public SubInfoRecordUpdater(Context context, Phone[] phoneProxy, CommandsInterface[] ci) { logd("Constructor invoked"); Loading Loading @@ -295,6 +297,10 @@ public class SubInfoRecordUpdater extends Handler { UiccCard newCard = mUiccController.getUiccCard(slotId); if (newCard != null) { newState = newCard.getCardState(); if (!newState.isCardPresent() && isNVSubAvailable) { Rlog.i(LOG_TAG, "updateIccAvailability: Returning NV mode "); return; } } else { // Uicc Card is null return from here, this would be called // again after reading the SIM Card status from RIL. Loading Loading @@ -367,6 +373,17 @@ public class SubInfoRecordUpdater extends Handler { } } public void updateSubIdForNV(int slotId) { sIccId[slotId] = ICCID_STRING_FOR_NV; sNeedUpdate = true; logd("[updateSubIdForNV]+ Start"); if (isAllIccIdQueryDone()) { logd("[updateSubIdForNV]+ updating"); updateSimInfoByIccId(); isNVSubAvailable = true; } } synchronized public void updateSimInfoByIccId() { logd("[updateSimInfoByIccId]+ Start"); sNeedUpdate = false; Loading src/java/com/android/internal/telephony/cdma/CDMAPhone.java +6 −0 Original line number Diff line number Diff line Loading @@ -57,10 +57,12 @@ import com.android.internal.telephony.MmiCode; import com.android.internal.telephony.OperatorInfo; import com.android.internal.telephony.PhoneBase; import com.android.internal.telephony.PhoneConstants; import com.android.internal.telephony.PhoneFactory; import com.android.internal.telephony.PhoneNotifier; import com.android.internal.telephony.PhoneProxy; import com.android.internal.telephony.PhoneSubInfo; import com.android.internal.telephony.ServiceStateTracker; import com.android.internal.telephony.SubInfoRecordUpdater; import com.android.internal.telephony.SubscriptionController; import com.android.internal.telephony.TelephonyIntents; import com.android.internal.telephony.TelephonyProperties; Loading Loading @@ -1371,6 +1373,10 @@ public class CDMAPhone extends PhoneBase { log("notifyMessageWaitingChanged"); mNotifier.notifyMessageWaitingChanged(this); updateVoiceMail(); SubInfoRecordUpdater subInfoRecordUpdater = PhoneFactory.getSubInfoRecordUpdater(); if (subInfoRecordUpdater != null) { subInfoRecordUpdater.updateSubIdForNV (mPhoneId); } } break; Loading Loading
src/java/com/android/internal/telephony/PhoneFactory.java +4 −0 Original line number Diff line number Diff line Loading @@ -552,4 +552,8 @@ public class PhoneFactory { } return phoneId; } public static SubInfoRecordUpdater getSubInfoRecordUpdater() { return sSubInfoRecordUpdater; } }
src/java/com/android/internal/telephony/SubInfoRecordUpdater.java +17 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ public class SubInfoRecordUpdater extends Handler { private static final int EVENT_ICC_CHANGED = 2; private static final int EVENT_STACK_READY = 3; private static final String ICCID_STRING_FOR_NO_SIM = ""; private static final String ICCID_STRING_FOR_NV = "DUMMY_NV_ID"; /** * int[] sInsertSimState maintains all slots' SIM inserted status currently, * it may contain 4 kinds of values: Loading Loading @@ -95,6 +96,7 @@ public class SubInfoRecordUpdater extends Handler { private static TelephonyManager sTelephonyMgr = null; // To prevent repeatedly update flow every time receiver SIM_STATE_CHANGE private static boolean sNeedUpdate = true; private boolean isNVSubAvailable = false; public SubInfoRecordUpdater(Context context, Phone[] phoneProxy, CommandsInterface[] ci) { logd("Constructor invoked"); Loading Loading @@ -295,6 +297,10 @@ public class SubInfoRecordUpdater extends Handler { UiccCard newCard = mUiccController.getUiccCard(slotId); if (newCard != null) { newState = newCard.getCardState(); if (!newState.isCardPresent() && isNVSubAvailable) { Rlog.i(LOG_TAG, "updateIccAvailability: Returning NV mode "); return; } } else { // Uicc Card is null return from here, this would be called // again after reading the SIM Card status from RIL. Loading Loading @@ -367,6 +373,17 @@ public class SubInfoRecordUpdater extends Handler { } } public void updateSubIdForNV(int slotId) { sIccId[slotId] = ICCID_STRING_FOR_NV; sNeedUpdate = true; logd("[updateSubIdForNV]+ Start"); if (isAllIccIdQueryDone()) { logd("[updateSubIdForNV]+ updating"); updateSimInfoByIccId(); isNVSubAvailable = true; } } synchronized public void updateSimInfoByIccId() { logd("[updateSimInfoByIccId]+ Start"); sNeedUpdate = false; Loading
src/java/com/android/internal/telephony/cdma/CDMAPhone.java +6 −0 Original line number Diff line number Diff line Loading @@ -57,10 +57,12 @@ import com.android.internal.telephony.MmiCode; import com.android.internal.telephony.OperatorInfo; import com.android.internal.telephony.PhoneBase; import com.android.internal.telephony.PhoneConstants; import com.android.internal.telephony.PhoneFactory; import com.android.internal.telephony.PhoneNotifier; import com.android.internal.telephony.PhoneProxy; import com.android.internal.telephony.PhoneSubInfo; import com.android.internal.telephony.ServiceStateTracker; import com.android.internal.telephony.SubInfoRecordUpdater; import com.android.internal.telephony.SubscriptionController; import com.android.internal.telephony.TelephonyIntents; import com.android.internal.telephony.TelephonyProperties; Loading Loading @@ -1371,6 +1373,10 @@ public class CDMAPhone extends PhoneBase { log("notifyMessageWaitingChanged"); mNotifier.notifyMessageWaitingChanged(this); updateVoiceMail(); SubInfoRecordUpdater subInfoRecordUpdater = PhoneFactory.getSubInfoRecordUpdater(); if (subInfoRecordUpdater != null) { subInfoRecordUpdater.updateSubIdForNV (mPhoneId); } } break; Loading