Loading src/java/com/android/internal/telephony/PhoneFactory.java +14 −1 Original line number Diff line number Diff line Loading @@ -330,9 +330,22 @@ public class PhoneFactory { public static int calculatePreferredNetworkType(Context context, int phoneSubId) { int networkType = android.provider.Settings.Global.getInt(context.getContentResolver(), android.provider.Settings.Global.PREFERRED_NETWORK_MODE + phoneSubId, RILConstants.PREFERRED_NETWORK_MODE); -1 /* invalid network mode */); Rlog.d(LOG_TAG, "calculatePreferredNetworkType: phoneSubId = " + phoneSubId + " networkType = " + networkType); if (networkType == -1) { networkType = RILConstants.PREFERRED_NETWORK_MODE; try { networkType = TelephonyManager.getIntAtIndex(context.getContentResolver(), android.provider.Settings.Global.PREFERRED_NETWORK_MODE, SubscriptionController.getInstance().getPhoneId(phoneSubId)); } catch (SettingNotFoundException retrySnfe) { Rlog.e(LOG_TAG, "Settings Exception Reading Value At Index for " + "Settings.Global.PREFERRED_NETWORK_MODE"); } } return networkType; } Loading src/java/com/android/internal/telephony/SubscriptionInfoUpdater.java +9 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ import android.os.ServiceManager; import android.preference.PreferenceManager; import android.provider.Settings; import android.provider.Settings.Global; import android.provider.Settings.SettingNotFoundException; import android.service.euicc.EuiccProfileInfo; import android.service.euicc.EuiccService; import android.service.euicc.GetEuiccProfileInfoListResult; Loading Loading @@ -464,6 +465,14 @@ public class SubscriptionInfoUpdater extends Handler { if (networkType == -1) { networkType = RILConstants.PREFERRED_NETWORK_MODE; try { networkType = TelephonyManager.getIntAtIndex( mContext.getContentResolver(), Settings.Global.PREFERRED_NETWORK_MODE, slotId); } catch (SettingNotFoundException retrySnfe) { Rlog.e(LOG_TAG, "Settings Exception Reading Value At Index for " + "Settings.Global.PREFERRED_NETWORK_MODE"); } Settings.Global.putInt( mPhone[slotId].getContext().getContentResolver(), Global.PREFERRED_NETWORK_MODE + subId, Loading Loading
src/java/com/android/internal/telephony/PhoneFactory.java +14 −1 Original line number Diff line number Diff line Loading @@ -330,9 +330,22 @@ public class PhoneFactory { public static int calculatePreferredNetworkType(Context context, int phoneSubId) { int networkType = android.provider.Settings.Global.getInt(context.getContentResolver(), android.provider.Settings.Global.PREFERRED_NETWORK_MODE + phoneSubId, RILConstants.PREFERRED_NETWORK_MODE); -1 /* invalid network mode */); Rlog.d(LOG_TAG, "calculatePreferredNetworkType: phoneSubId = " + phoneSubId + " networkType = " + networkType); if (networkType == -1) { networkType = RILConstants.PREFERRED_NETWORK_MODE; try { networkType = TelephonyManager.getIntAtIndex(context.getContentResolver(), android.provider.Settings.Global.PREFERRED_NETWORK_MODE, SubscriptionController.getInstance().getPhoneId(phoneSubId)); } catch (SettingNotFoundException retrySnfe) { Rlog.e(LOG_TAG, "Settings Exception Reading Value At Index for " + "Settings.Global.PREFERRED_NETWORK_MODE"); } } return networkType; } Loading
src/java/com/android/internal/telephony/SubscriptionInfoUpdater.java +9 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ import android.os.ServiceManager; import android.preference.PreferenceManager; import android.provider.Settings; import android.provider.Settings.Global; import android.provider.Settings.SettingNotFoundException; import android.service.euicc.EuiccProfileInfo; import android.service.euicc.EuiccService; import android.service.euicc.GetEuiccProfileInfoListResult; Loading Loading @@ -464,6 +465,14 @@ public class SubscriptionInfoUpdater extends Handler { if (networkType == -1) { networkType = RILConstants.PREFERRED_NETWORK_MODE; try { networkType = TelephonyManager.getIntAtIndex( mContext.getContentResolver(), Settings.Global.PREFERRED_NETWORK_MODE, slotId); } catch (SettingNotFoundException retrySnfe) { Rlog.e(LOG_TAG, "Settings Exception Reading Value At Index for " + "Settings.Global.PREFERRED_NETWORK_MODE"); } Settings.Global.putInt( mPhone[slotId].getContext().getContentResolver(), Global.PREFERRED_NETWORK_MODE + subId, Loading