Loading src/java/com/android/internal/telephony/GsmCdmaPhone.java +2 −3 Original line number Diff line number Diff line Loading @@ -2907,8 +2907,6 @@ public class GsmCdmaPhone extends Phone { break; case EVENT_CARRIER_CONFIG_CHANGED: // Obtain new radio capabilities from the modem, since some are SIM-dependent mCi.getRadioCapability(obtainMessage(EVENT_GET_RADIO_CAPABILITY)); // Only check for the voice radio tech if it not going to be updated by the voice // registration changes. if (!mContext.getResources().getBoolean( Loading @@ -2927,7 +2925,8 @@ public class GsmCdmaPhone extends Phone { updateNrSettingsAfterCarrierConfigChanged(b); loadAllowedNetworksFromSubscriptionDatabase(); updateAllowedNetworkTypes(null); // Obtain new radio capabilities from the modem, since some are SIM-dependent mCi.getRadioCapability(obtainMessage(EVENT_GET_RADIO_CAPABILITY)); break; case EVENT_SET_ROAMING_PREFERENCE_DONE: Loading src/java/com/android/internal/telephony/Phone.java +10 −4 Original line number Diff line number Diff line Loading @@ -458,7 +458,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { private static final String ALLOWED_NETWORK_TYPES_TEXT_ENABLE_2G = "enable_2g"; private static final int INVALID_ALLOWED_NETWORK_TYPES = -1; protected boolean mIsCarrierNrSupported = false; protected boolean mIsAllowedNetworkTypesLoadedFromDb = false; private boolean mUnitTestMode; private CarrierPrivilegesTracker mCarrierPrivilegesTracker = null; Loading Loading @@ -2314,6 +2314,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { * Loads the allowed network type from subscription database. */ public void loadAllowedNetworksFromSubscriptionDatabase() { mIsAllowedNetworkTypesLoadedFromDb = false; // Try to load ALLOWED_NETWORK_TYPES from SIMINFO. if (SubscriptionController.getInstance() == null) { return; Loading Loading @@ -2353,6 +2354,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { } } } mIsAllowedNetworkTypesLoadedFromDb = true; } catch (NumberFormatException e) { Rlog.e(LOG_TAG, "allowedNetworkTypes NumberFormat exception" + e); } Loading Loading @@ -2425,8 +2427,10 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { loge("setAllowedNetworkTypes: Invalid allowed network type reason: " + reason); return; } if (!SubscriptionManager.isUsableSubscriptionId(subId)) { loge("setAllowedNetworkTypes: Invalid subscriptionId: " + subId); if (!SubscriptionManager.isUsableSubscriptionId(subId) || !mIsAllowedNetworkTypesLoadedFromDb) { loge("setAllowedNetworkTypes: no sim or network type is not loaded. SubscriptionId: " + subId + ", isNetworkTypeLoaded" + mIsAllowedNetworkTypesLoadedFromDb); return; } String mapAsString = ""; Loading Loading @@ -4376,7 +4380,9 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { public void sendSubscriptionSettings(boolean restoreNetworkSelection) { // Send settings down if (mIsAllowedNetworkTypesLoadedFromDb) { updateAllowedNetworkTypes(null); } if (restoreNetworkSelection) { restoreSavedNetworkSelection(null); Loading Loading
src/java/com/android/internal/telephony/GsmCdmaPhone.java +2 −3 Original line number Diff line number Diff line Loading @@ -2907,8 +2907,6 @@ public class GsmCdmaPhone extends Phone { break; case EVENT_CARRIER_CONFIG_CHANGED: // Obtain new radio capabilities from the modem, since some are SIM-dependent mCi.getRadioCapability(obtainMessage(EVENT_GET_RADIO_CAPABILITY)); // Only check for the voice radio tech if it not going to be updated by the voice // registration changes. if (!mContext.getResources().getBoolean( Loading @@ -2927,7 +2925,8 @@ public class GsmCdmaPhone extends Phone { updateNrSettingsAfterCarrierConfigChanged(b); loadAllowedNetworksFromSubscriptionDatabase(); updateAllowedNetworkTypes(null); // Obtain new radio capabilities from the modem, since some are SIM-dependent mCi.getRadioCapability(obtainMessage(EVENT_GET_RADIO_CAPABILITY)); break; case EVENT_SET_ROAMING_PREFERENCE_DONE: Loading
src/java/com/android/internal/telephony/Phone.java +10 −4 Original line number Diff line number Diff line Loading @@ -458,7 +458,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { private static final String ALLOWED_NETWORK_TYPES_TEXT_ENABLE_2G = "enable_2g"; private static final int INVALID_ALLOWED_NETWORK_TYPES = -1; protected boolean mIsCarrierNrSupported = false; protected boolean mIsAllowedNetworkTypesLoadedFromDb = false; private boolean mUnitTestMode; private CarrierPrivilegesTracker mCarrierPrivilegesTracker = null; Loading Loading @@ -2314,6 +2314,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { * Loads the allowed network type from subscription database. */ public void loadAllowedNetworksFromSubscriptionDatabase() { mIsAllowedNetworkTypesLoadedFromDb = false; // Try to load ALLOWED_NETWORK_TYPES from SIMINFO. if (SubscriptionController.getInstance() == null) { return; Loading Loading @@ -2353,6 +2354,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { } } } mIsAllowedNetworkTypesLoadedFromDb = true; } catch (NumberFormatException e) { Rlog.e(LOG_TAG, "allowedNetworkTypes NumberFormat exception" + e); } Loading Loading @@ -2425,8 +2427,10 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { loge("setAllowedNetworkTypes: Invalid allowed network type reason: " + reason); return; } if (!SubscriptionManager.isUsableSubscriptionId(subId)) { loge("setAllowedNetworkTypes: Invalid subscriptionId: " + subId); if (!SubscriptionManager.isUsableSubscriptionId(subId) || !mIsAllowedNetworkTypesLoadedFromDb) { loge("setAllowedNetworkTypes: no sim or network type is not loaded. SubscriptionId: " + subId + ", isNetworkTypeLoaded" + mIsAllowedNetworkTypesLoadedFromDb); return; } String mapAsString = ""; Loading Loading @@ -4376,7 +4380,9 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { public void sendSubscriptionSettings(boolean restoreNetworkSelection) { // Send settings down if (mIsAllowedNetworkTypesLoadedFromDb) { updateAllowedNetworkTypes(null); } if (restoreNetworkSelection) { restoreSavedNetworkSelection(null); Loading