Loading src/java/com/android/internal/telephony/Phone.java +8 −3 Original line number Original line Diff line number Diff line Loading @@ -2404,8 +2404,13 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { */ */ public void setAllowedNetworkTypes(@TelephonyManager.AllowedNetworkTypesReason int reason, public void setAllowedNetworkTypes(@TelephonyManager.AllowedNetworkTypesReason int reason, @TelephonyManager.NetworkTypeBitMask long networkTypes, Message response) { @TelephonyManager.NetworkTypeBitMask long networkTypes, Message response) { int subId = getSubId(); if (!TelephonyManager.isValidAllowedNetworkTypesReason(reason)) { if (!TelephonyManager.isValidAllowedNetworkTypesReason(reason)) { Rlog.e(LOG_TAG, "Invalid allowed network type reason: " + reason); loge("setAllowedNetworkTypes: Invalid allowed network type reason: " + reason); return; } if (!SubscriptionManager.isUsableSubscriptionId(subId)) { loge("setAllowedNetworkTypes: Invalid subscriptionId: " + subId); return; return; } } String mapAsString = ""; String mapAsString = ""; Loading @@ -2416,10 +2421,10 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { + mAllowedNetworkTypesForReasons.get(key)) + mAllowedNetworkTypesForReasons.get(key)) .collect(Collectors.joining(",")); .collect(Collectors.joining(",")); } } SubscriptionManager.setSubscriptionProperty(getSubId(), SubscriptionManager.setSubscriptionProperty(subId, SubscriptionManager.ALLOWED_NETWORK_TYPES, SubscriptionManager.ALLOWED_NETWORK_TYPES, mapAsString); mapAsString); logd("SubId" + getSubId() + ",setAllowedNetworkTypes " + mapAsString); logd("setAllowedNetworkTypes: SubId" + subId + ",setAllowedNetworkTypes " + mapAsString); updateAllowedNetworkTypes(response); updateAllowedNetworkTypes(response); notifyAllowedNetworkTypesChanged(reason); notifyAllowedNetworkTypesChanged(reason); Loading Loading
src/java/com/android/internal/telephony/Phone.java +8 −3 Original line number Original line Diff line number Diff line Loading @@ -2404,8 +2404,13 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { */ */ public void setAllowedNetworkTypes(@TelephonyManager.AllowedNetworkTypesReason int reason, public void setAllowedNetworkTypes(@TelephonyManager.AllowedNetworkTypesReason int reason, @TelephonyManager.NetworkTypeBitMask long networkTypes, Message response) { @TelephonyManager.NetworkTypeBitMask long networkTypes, Message response) { int subId = getSubId(); if (!TelephonyManager.isValidAllowedNetworkTypesReason(reason)) { if (!TelephonyManager.isValidAllowedNetworkTypesReason(reason)) { Rlog.e(LOG_TAG, "Invalid allowed network type reason: " + reason); loge("setAllowedNetworkTypes: Invalid allowed network type reason: " + reason); return; } if (!SubscriptionManager.isUsableSubscriptionId(subId)) { loge("setAllowedNetworkTypes: Invalid subscriptionId: " + subId); return; return; } } String mapAsString = ""; String mapAsString = ""; Loading @@ -2416,10 +2421,10 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { + mAllowedNetworkTypesForReasons.get(key)) + mAllowedNetworkTypesForReasons.get(key)) .collect(Collectors.joining(",")); .collect(Collectors.joining(",")); } } SubscriptionManager.setSubscriptionProperty(getSubId(), SubscriptionManager.setSubscriptionProperty(subId, SubscriptionManager.ALLOWED_NETWORK_TYPES, SubscriptionManager.ALLOWED_NETWORK_TYPES, mapAsString); mapAsString); logd("SubId" + getSubId() + ",setAllowedNetworkTypes " + mapAsString); logd("setAllowedNetworkTypes: SubId" + subId + ",setAllowedNetworkTypes " + mapAsString); updateAllowedNetworkTypes(response); updateAllowedNetworkTypes(response); notifyAllowedNetworkTypesChanged(reason); notifyAllowedNetworkTypesChanged(reason); Loading