[Settings] Refactor MobileNetworkUtils
Code refactor MobileNetworkUtils - move isWorldMode() detection to the first line within shouldSpeciallyUpdateGsmCdma() Bug: 201757298 Test: presubmit pass Change-Id: Iccffca52b2e0e48ff62ec749c0cf3faa273b0e18
This commit is contained in:
@@ -582,6 +582,9 @@ public class MobileNetworkUtils {
|
||||
*/
|
||||
@VisibleForTesting
|
||||
static boolean shouldSpeciallyUpdateGsmCdma(Context context, int subId) {
|
||||
if (!isWorldMode(context, subId)) {
|
||||
return false;
|
||||
}
|
||||
final TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class)
|
||||
.createForSubscriptionId(subId);
|
||||
final int networkMode = getNetworkTypeFromRaf(
|
||||
@@ -594,7 +597,7 @@ public class MobileNetworkUtils {
|
||||
|| networkMode
|
||||
== TelephonyManagerConstants.NETWORK_MODE_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA
|
||||
|| networkMode == TelephonyManagerConstants.NETWORK_MODE_LTE_CDMA_EVDO_GSM_WCDMA) {
|
||||
if (!isTdscdmaSupported(context, subId) && isWorldMode(context, subId)) {
|
||||
if (!isTdscdmaSupported(context, subId)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user