diff options
author | Scott Lobdell <slobdell@google.com> | 2021-08-04 03:02:11 +0000 |
---|---|---|
committer | Scott Lobdell <slobdell@google.com> | 2021-08-06 17:25:21 +0000 |
commit | 9d10272031d3f400d399db45927abf3be739b074 (patch) | |
tree | b9a3f179cf0abb8f6986f4c2268a617a34d663c8 /telephony/java | |
parent | 22fd7d8dfaf39ca6b15bd360409f3fa580adf2f6 (diff) | |
parent | b3abfad71a54152026b023b831ddd1793f361fa8 (diff) |
Merge SP1A.210803.001
Change-Id: I09253f8614e9ee85a59460f3ef25f17dd98cac80
Diffstat (limited to 'telephony/java')
4 files changed, 30 insertions, 10 deletions
diff --git a/telephony/java/android/telephony/AccessNetworkUtils.java b/telephony/java/android/telephony/AccessNetworkUtils.java index 6b820459be98..b5d97abdd3eb 100644 --- a/telephony/java/android/telephony/AccessNetworkUtils.java +++ b/telephony/java/android/telephony/AccessNetworkUtils.java @@ -567,6 +567,10 @@ public class AccessNetworkUtils { */ public static int getFrequencyFromNrArfcn(int nrArfcn) { + if (nrArfcn == PhysicalChannelConfig.CHANNEL_NUMBER_UNKNOWN) { + return PhysicalChannelConfig.FREQUENCY_UNKNOWN; + } + int globalKhz = 0; int rangeOffset = 0; int arfcnOffset = 0; @@ -632,6 +636,10 @@ public class AccessNetworkUtils { */ public static int getFrequencyFromUarfcn(int band, int uarfcn, boolean isUplink) { + if (uarfcn == PhysicalChannelConfig.CHANNEL_NUMBER_UNKNOWN) { + return PhysicalChannelConfig.FREQUENCY_UNKNOWN; + } + int offsetKhz = 0; for (UtranBandArfcnFrequency uarfcnFrequency : AccessNetworkConstants. UtranBandArfcnFrequency.values()) { @@ -702,6 +710,10 @@ public class AccessNetworkUtils { */ public static int getFrequencyFromArfcn(int band, int arfcn, boolean isUplink) { + if (arfcn == PhysicalChannelConfig.CHANNEL_NUMBER_UNKNOWN) { + return PhysicalChannelConfig.FREQUENCY_UNKNOWN; + } + int uplinkFrequencyFirst = 0; int arfcnOffset = 0; int downlinkOffset = 0; diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index 10f8463029fa..aa61229ecc24 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -3581,7 +3581,7 @@ public class CarrierConfigManager { "nr_advanced_capable_pco_id_int"; /** - * This configuration allows the framework to use user data communication to detect RRC state, + * This configuration allows the framework to use user data communication to detect Idle state, * and this is used on the 5G icon. * * There is a new way for for RRC state detection at Android 12. If @@ -3589,16 +3589,23 @@ public class CarrierConfigManager { * {@link TelephonyManager#CAPABILITY_PHYSICAL_CHANNEL_CONFIG_1_6_SUPPORTED}) returns true, * then framework can use PHYSICAL_CHANNEL_CONFIG for RRC state detection. Based on this * condition, some carriers want to use the legacy behavior that way is using user data - * communication to detect the RRC state. Therefore, this configuration allows the framework - * to use user data communication to detect RRC state. + * communication to detect the Idle state. Therefore, this configuration allows the framework + * to use user data communication to detect Idle state. * - * The precondition is + * There are 3 situations reflects the carrier define Idle state. + * 1. using PHYSICAL_CHANNEL_CONFIG to detect RRC Idle + * 2. using all of data connections to detect RRC Idle. + * 3. using data communication(consider internet data connection only) to detect data Idle. + * + * How to setup for above 3 cases? + * For below part, we call the condition#1 is device support * {@link android.telephony.TelephonyManager#isRadioInterfaceCapabilitySupported}( - * {@link TelephonyManager#CAPABILITY_PHYSICAL_CHANNEL_CONFIG_1_6_SUPPORTED}) returns true, - * otherwise this config is not working. - * If this is true, framework uses the user data communication for RRC state detection. - * If this is false, framework uses the PHYSICAL_CHANNEL_CONFIG for RRC state detection. + * {@link TelephonyManager#CAPABILITY_PHYSICAL_CHANNEL_CONFIG_1_6_SUPPORTED}). + * The condition#2 is carrier enable the KEY_LTE_ENDC_USING_USER_DATA_FOR_RRC_DETECTION_BOOL. * + * For case#1, the condition#1 is true and the condition#2 is false. + * For case#2, the condition#1 is false and the condition#2 is false. + * For case#3, the condition#2 is true. * @hide */ public static final String KEY_LTE_ENDC_USING_USER_DATA_FOR_RRC_DETECTION_BOOL = diff --git a/telephony/java/android/telephony/CellSignalStrengthNr.java b/telephony/java/android/telephony/CellSignalStrengthNr.java index 72150ddf8597..6ada32e1a86d 100644 --- a/telephony/java/android/telephony/CellSignalStrengthNr.java +++ b/telephony/java/android/telephony/CellSignalStrengthNr.java @@ -178,7 +178,7 @@ public final class CellSignalStrengthNr extends CellSignalStrength implements Pa mCsiSinr = inRangeOrUnavailable(csiSinr, -23, 23); mCsiCqiTableIndex = inRangeOrUnavailable(csiCqiTableIndex, 1, 3); mCsiCqiReport = csiCqiReport.stream() - .map(cqi -> new Integer(inRangeOrUnavailable(Byte.toUnsignedInt(cqi), 1, 3))) + .map(cqi -> new Integer(inRangeOrUnavailable(Byte.toUnsignedInt(cqi), 0, 15))) .collect(Collectors.toList()); mSsRsrp = inRangeOrUnavailable(ssRsrp, -140, -44); mSsRsrq = inRangeOrUnavailable(ssRsrq, -43, 20); diff --git a/telephony/java/android/telephony/PhysicalChannelConfig.java b/telephony/java/android/telephony/PhysicalChannelConfig.java index 8df41fb6b288..d250088c2f10 100644 --- a/telephony/java/android/telephony/PhysicalChannelConfig.java +++ b/telephony/java/android/telephony/PhysicalChannelConfig.java @@ -338,7 +338,8 @@ public final class PhysicalChannelConfig implements Parcelable { private void setUplinkFrequency() { switch (mNetworkType){ case TelephonyManager.NETWORK_TYPE_NR: - mUplinkFrequency = mDownlinkFrequency; + mUplinkFrequency = AccessNetworkUtils.getFrequencyFromNrArfcn( + mUplinkChannelNumber); break; case TelephonyManager.NETWORK_TYPE_LTE: mUplinkFrequency = AccessNetworkUtils.getFrequencyFromEarfcn( |