Merge "[PhysicalChannelConfig] Add more useful logs when calculate actual frequency"
This commit is contained in:
@@ -637,18 +637,18 @@ public final class AccessNetworkConstants {
|
|||||||
this.band = band;
|
this.band = band;
|
||||||
this.downlinkLowKhz = downlinkLowKhz;
|
this.downlinkLowKhz = downlinkLowKhz;
|
||||||
this.downlinkOffset = downlinkOffset;
|
this.downlinkOffset = downlinkOffset;
|
||||||
|
this.downlinkRange = downlinkRange;
|
||||||
this.uplinkLowKhz = uplinkLowKhz;
|
this.uplinkLowKhz = uplinkLowKhz;
|
||||||
this.uplinkOffset = uplinkOffset;
|
this.uplinkOffset = uplinkOffset;
|
||||||
this.downlinkRange = downlinkRange;
|
|
||||||
this.uplinkRange = uplinkRange;
|
this.uplinkRange = uplinkRange;
|
||||||
}
|
}
|
||||||
|
|
||||||
int band;
|
int band;
|
||||||
int downlinkLowKhz;
|
int downlinkLowKhz;
|
||||||
int downlinkOffset;
|
int downlinkOffset;
|
||||||
|
int downlinkRange;
|
||||||
int uplinkLowKhz;
|
int uplinkLowKhz;
|
||||||
int uplinkOffset;
|
int uplinkOffset;
|
||||||
int downlinkRange;
|
|
||||||
int uplinkRange;
|
int uplinkRange;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -598,7 +598,8 @@ public class AccessNetworkUtils {
|
|||||||
: earfcnFrequency.downlinkOffset;
|
: earfcnFrequency.downlinkOffset;
|
||||||
break;
|
break;
|
||||||
} else {
|
} 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;
|
return INVALID_FREQUENCY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -617,7 +618,7 @@ public class AccessNetworkUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isInEarfcnRange(int earfcn, EutranBandArfcnFrequency earfcnFrequency,
|
private static boolean isInEarfcnRange(int earfcn, EutranBandArfcnFrequency earfcnFrequency,
|
||||||
boolean isUplink) {
|
boolean isUplink) {
|
||||||
if (isUplink) {
|
if (isUplink) {
|
||||||
return earfcn >= earfcnFrequency.uplinkOffset && earfcn <= earfcnFrequency.uplinkRange;
|
return earfcn >= earfcnFrequency.uplinkOffset && earfcn <= earfcnFrequency.uplinkRange;
|
||||||
} else {
|
} else {
|
||||||
@@ -640,7 +641,8 @@ public class AccessNetworkUtils {
|
|||||||
: uarfcnFrequency.downlinkOffset;
|
: uarfcnFrequency.downlinkOffset;
|
||||||
break;
|
break;
|
||||||
} else {
|
} 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;
|
return INVALID_FREQUENCY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -716,7 +718,8 @@ public class AccessNetworkUtils {
|
|||||||
arfcnOffset);
|
arfcnOffset);
|
||||||
break;
|
break;
|
||||||
} else {
|
} 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;
|
return INVALID_FREQUENCY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -733,7 +736,7 @@ public class AccessNetworkUtils {
|
|||||||
* Downlink actual frequency(kHz) = Uplink actual frequency + 10
|
* Downlink actual frequency(kHz) = Uplink actual frequency + 10
|
||||||
*/
|
*/
|
||||||
private static int convertArfcnToFrequency(int arfcn, int uplinkFrequencyFirstKhz,
|
private static int convertArfcnToFrequency(int arfcn, int uplinkFrequencyFirstKhz,
|
||||||
int arfcnOffset) {
|
int arfcnOffset) {
|
||||||
return uplinkFrequencyFirstKhz + 200 * (arfcn - arfcnOffset);
|
return uplinkFrequencyFirstKhz + 200 * (arfcn - arfcnOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user