Merge "For NR (non-standalone), use LTE signal strength as primary rule" into rvc-dev am: 6cfdd46d4b am: e9d02dec18
Change-Id: I2614da985ca72816d382d1b51a448e305497b5de
This commit is contained in:
@@ -2556,6 +2556,16 @@ public class CarrierConfigManager {
|
||||
public static final String KEY_PARAMETERS_USE_FOR_5G_NR_SIGNAL_BAR_INT =
|
||||
"parameters_use_for_5g_nr_signal_bar_int";
|
||||
|
||||
/**
|
||||
* There are two signal strengths, NR and LTE signal strength, during NR (non-standalone).
|
||||
* Boolean indicating whether to use LTE signal strength as primary during NR (non-standalone).
|
||||
* By default this value is true.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public static final String KEY_SIGNAL_STRENGTH_NR_NSA_USE_LTE_AS_PRIMARY_BOOL =
|
||||
"signal_strength_nr_nsa_use_lte_as_primary_bool";
|
||||
|
||||
/**
|
||||
* String array of default bandwidth values per network type.
|
||||
* The entries should be of form "network_name:downstream,upstream", with values in Kbps.
|
||||
@@ -4134,6 +4144,7 @@ public class CarrierConfigManager {
|
||||
});
|
||||
sDefaults.putInt(KEY_PARAMETERS_USE_FOR_5G_NR_SIGNAL_BAR_INT,
|
||||
CellSignalStrengthNr.USE_SSRSRP);
|
||||
sDefaults.putBoolean(KEY_SIGNAL_STRENGTH_NR_NSA_USE_LTE_AS_PRIMARY_BOOL, true);
|
||||
sDefaults.putStringArray(KEY_BANDWIDTH_STRING_ARRAY, new String[]{
|
||||
"GPRS:24,24", "EDGE:70,18", "UMTS:115,115", "CDMA-IS95A:14,14", "CDMA-IS95B:14,14",
|
||||
"1xRTT:30,30", "EvDo-rev.0:750,48", "EvDo-rev.A:950,550", "HSDPA:4300,620",
|
||||
|
||||
@@ -82,6 +82,8 @@ public class SignalStrength implements Parcelable {
|
||||
// Effectively final. Timestamp is set during construction of SignalStrength
|
||||
private long mTimestampMillis;
|
||||
|
||||
private boolean mLteAsPrimaryInNrNsa = true;
|
||||
|
||||
CellSignalStrengthCdma mCdma;
|
||||
CellSignalStrengthGsm mGsm;
|
||||
CellSignalStrengthWcdma mWcdma;
|
||||
@@ -188,6 +190,10 @@ public class SignalStrength implements Parcelable {
|
||||
private CellSignalStrength getPrimary() {
|
||||
// This behavior is intended to replicate the legacy behavior of getLevel() by prioritizing
|
||||
// newer faster RATs for default/for display purposes.
|
||||
|
||||
if (mLteAsPrimaryInNrNsa) {
|
||||
if (mLte.isValid()) return mLte;
|
||||
}
|
||||
if (mNr.isValid()) return mNr;
|
||||
if (mLte.isValid()) return mLte;
|
||||
if (mCdma.isValid()) return mCdma;
|
||||
@@ -268,6 +274,10 @@ public class SignalStrength implements Parcelable {
|
||||
|
||||
/** @hide */
|
||||
public void updateLevel(PersistableBundle cc, ServiceState ss) {
|
||||
if (cc != null) {
|
||||
mLteAsPrimaryInNrNsa = cc.getBoolean(
|
||||
CarrierConfigManager.KEY_SIGNAL_STRENGTH_NR_NSA_USE_LTE_AS_PRIMARY_BOOL, true);
|
||||
}
|
||||
mCdma.updateLevel(cc, ss);
|
||||
mGsm.updateLevel(cc, ss);
|
||||
mWcdma.updateLevel(cc, ss);
|
||||
|
||||
Reference in New Issue
Block a user