[Settings] Refactor MobileNetworkUtils
Code refactor MobileNetworkUtils - reorder the rule within #shouldDisplayNetworkSelectOptions() Bug: 201757298 Test: presubmit pass Change-Id: Idba39ca806263b850fa23aa8bb2dd423860bc043
This commit is contained in:
@@ -468,29 +468,23 @@ public class MobileNetworkUtils {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!isWorldMode(context, subId)) {
|
||||
return isGsmBasicOptions(context, subId);
|
||||
if (isWorldMode(context, subId)) {
|
||||
final int networkMode = getNetworkTypeFromRaf(
|
||||
(int) telephonyManager.getAllowedNetworkTypesForReason(
|
||||
TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_USER));
|
||||
if (networkMode == TelephonyManagerConstants.NETWORK_MODE_LTE_CDMA_EVDO) {
|
||||
return false;
|
||||
}
|
||||
if (shouldSpeciallyUpdateGsmCdma(context, subId)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (networkMode == TelephonyManagerConstants.NETWORK_MODE_LTE_GSM_WCDMA) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
final int networkMode = getNetworkTypeFromRaf(
|
||||
(int) telephonyManager.getAllowedNetworkTypesForReason(
|
||||
TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_USER));
|
||||
if (networkMode == TelephonyManagerConstants.NETWORK_MODE_LTE_CDMA_EVDO) {
|
||||
return false;
|
||||
}
|
||||
if (shouldSpeciallyUpdateGsmCdma(context, subId)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isGsmBasicOptions(context, subId)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (networkMode == TelephonyManagerConstants.NETWORK_MODE_LTE_GSM_WCDMA) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return isGsmBasicOptions(context, subId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user