Merge "[PhysicalChannelConfig] Add more useful logs when calculate actual frequency" am: 7ffe1efa71 am: 5d8dc1e08c

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1671793

Change-Id: I36d9a3cf4e25808b87d3b4f50bf3259bce5755ea
This commit is contained in:
Zoey Chen
2021-04-14 18:04:07 +00:00
committed by Automerger Merge Worker
2 changed files with 10 additions and 7 deletions

View File

@@ -637,18 +637,18 @@ public final class AccessNetworkConstants {
this.band = band;
this.downlinkLowKhz = downlinkLowKhz;
this.downlinkOffset = downlinkOffset;
this.downlinkRange = downlinkRange;
this.uplinkLowKhz = uplinkLowKhz;
this.uplinkOffset = uplinkOffset;
this.downlinkRange = downlinkRange;
this.uplinkRange = uplinkRange;
}
int band;
int downlinkLowKhz;
int downlinkOffset;
int downlinkRange;
int uplinkLowKhz;
int uplinkOffset;
int downlinkRange;
int uplinkRange;
}

View File

@@ -598,7 +598,8 @@ public class AccessNetworkUtils {
: earfcnFrequency.downlinkOffset;
break;
} else {
Log.e(TAG, "Band and the range of EARFCN are not consistent.");
Rlog.w(TAG,"Band and the range of EARFCN are not consistent: band = " + band
+ " ,earfcn = " + earfcn + " ,isUplink = " + isUplink);
return INVALID_FREQUENCY;
}
}
@@ -617,7 +618,7 @@ public class AccessNetworkUtils {
}
private static boolean isInEarfcnRange(int earfcn, EutranBandArfcnFrequency earfcnFrequency,
boolean isUplink) {
boolean isUplink) {
if (isUplink) {
return earfcn >= earfcnFrequency.uplinkOffset && earfcn <= earfcnFrequency.uplinkRange;
} else {
@@ -640,7 +641,8 @@ public class AccessNetworkUtils {
: uarfcnFrequency.downlinkOffset;
break;
} else {
Log.e(TAG, "Band and the range of UARFCN are not consistent.");
Rlog.w(TAG,"Band and the range of UARFCN are not consistent: band = " + band
+ " ,uarfcn = " + uarfcn + " ,isUplink = " + isUplink);
return INVALID_FREQUENCY;
}
}
@@ -716,7 +718,8 @@ public class AccessNetworkUtils {
arfcnOffset);
break;
} else {
Log.e(TAG, "Band and the range of ARFCN are not consistent.");
Rlog.w(TAG,"Band and the range of ARFCN are not consistent: band = " + band
+ " ,arfcn = " + arfcn + " ,isUplink = " + isUplink);
return INVALID_FREQUENCY;
}
}
@@ -733,7 +736,7 @@ public class AccessNetworkUtils {
* Downlink actual frequency(kHz) = Uplink actual frequency + 10
*/
private static int convertArfcnToFrequency(int arfcn, int uplinkFrequencyFirstKhz,
int arfcnOffset) {
int arfcnOffset) {
return uplinkFrequencyFirstKhz + 200 * (arfcn - arfcnOffset);
}