Merge "Support Signal strength offset"
This commit is contained in:
@@ -1135,6 +1135,22 @@ public class CarrierConfigManager {
|
|||||||
public static final String KEY_NOTIFY_INTERNATIONAL_CALL_ON_WFC_BOOL =
|
public static final String KEY_NOTIFY_INTERNATIONAL_CALL_ON_WFC_BOOL =
|
||||||
"notify_international_call_on_wfc_bool";
|
"notify_international_call_on_wfc_bool";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Offset to be reduced from rsrp threshold while calculating signal strength level.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public static final String KEY_LTE_EARFCNS_RSRP_BOOST_INT = "lte_earfcns_rsrp_boost_int";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of EARFCN (E-UTRA Absolute Radio Frequency Channel Number,
|
||||||
|
* Reference: 3GPP TS 36.104 5.4.3) inclusive ranges on which lte_rsrp_boost_int
|
||||||
|
* will be applied. Format of the String array is expected to be {"erafcn1_start-earfcn1_end",
|
||||||
|
* "earfcn2_start-earfcn2_end" ... }
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public static final String KEY_BOOSTED_LTE_EARFCNS_STRING_ARRAY =
|
||||||
|
"boosted_lte_earfcns_string_array";
|
||||||
|
|
||||||
/** The default value for every variable. */
|
/** The default value for every variable. */
|
||||||
private final static PersistableBundle sDefaults;
|
private final static PersistableBundle sDefaults;
|
||||||
|
|
||||||
@@ -1341,6 +1357,8 @@ public class CarrierConfigManager {
|
|||||||
sDefaults.putBoolean(KEY_EDITABLE_WFC_ROAMING_MODE_BOOL, false);
|
sDefaults.putBoolean(KEY_EDITABLE_WFC_ROAMING_MODE_BOOL, false);
|
||||||
sDefaults.putBoolean(KEY_SUPPORT_3GPP_CALL_FORWARDING_WHILE_ROAMING_BOOL, true);
|
sDefaults.putBoolean(KEY_SUPPORT_3GPP_CALL_FORWARDING_WHILE_ROAMING_BOOL, true);
|
||||||
sDefaults.putBoolean(KEY_NOTIFY_INTERNATIONAL_CALL_ON_WFC_BOOL, false);
|
sDefaults.putBoolean(KEY_NOTIFY_INTERNATIONAL_CALL_ON_WFC_BOOL, false);
|
||||||
|
sDefaults.putInt(KEY_LTE_EARFCNS_RSRP_BOOST_INT, 0);
|
||||||
|
sDefaults.putStringArray(KEY_BOOSTED_LTE_EARFCNS_STRING_ARRAY, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -243,6 +243,10 @@ public class ServiceState implements Parcelable {
|
|||||||
|
|
||||||
private boolean mIsUsingCarrierAggregation;
|
private boolean mIsUsingCarrierAggregation;
|
||||||
|
|
||||||
|
/* EARFCN stands for E-UTRA Absolute Radio Frequency Channel Number,
|
||||||
|
* Reference: 3GPP TS 36.104 5.4.3 */
|
||||||
|
private int mLteEarfcnRsrpBoost = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get String description of roaming type
|
* get String description of roaming type
|
||||||
* @hide
|
* @hide
|
||||||
@@ -322,6 +326,7 @@ public class ServiceState implements Parcelable {
|
|||||||
mIsEmergencyOnly = s.mIsEmergencyOnly;
|
mIsEmergencyOnly = s.mIsEmergencyOnly;
|
||||||
mIsDataRoamingFromRegistration = s.mIsDataRoamingFromRegistration;
|
mIsDataRoamingFromRegistration = s.mIsDataRoamingFromRegistration;
|
||||||
mIsUsingCarrierAggregation = s.mIsUsingCarrierAggregation;
|
mIsUsingCarrierAggregation = s.mIsUsingCarrierAggregation;
|
||||||
|
mLteEarfcnRsrpBoost = s.mLteEarfcnRsrpBoost;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -351,6 +356,7 @@ public class ServiceState implements Parcelable {
|
|||||||
mIsEmergencyOnly = in.readInt() != 0;
|
mIsEmergencyOnly = in.readInt() != 0;
|
||||||
mIsDataRoamingFromRegistration = in.readInt() != 0;
|
mIsDataRoamingFromRegistration = in.readInt() != 0;
|
||||||
mIsUsingCarrierAggregation = in.readInt() != 0;
|
mIsUsingCarrierAggregation = in.readInt() != 0;
|
||||||
|
mLteEarfcnRsrpBoost = in.readInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void writeToParcel(Parcel out, int flags) {
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
@@ -377,6 +383,7 @@ public class ServiceState implements Parcelable {
|
|||||||
out.writeInt(mIsEmergencyOnly ? 1 : 0);
|
out.writeInt(mIsEmergencyOnly ? 1 : 0);
|
||||||
out.writeInt(mIsDataRoamingFromRegistration ? 1 : 0);
|
out.writeInt(mIsDataRoamingFromRegistration ? 1 : 0);
|
||||||
out.writeInt(mIsUsingCarrierAggregation ? 1 : 0);
|
out.writeInt(mIsUsingCarrierAggregation ? 1 : 0);
|
||||||
|
out.writeInt(mLteEarfcnRsrpBoost);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int describeContents() {
|
public int describeContents() {
|
||||||
@@ -814,7 +821,8 @@ public class ServiceState implements Parcelable {
|
|||||||
+ " DefRoamInd=" + mCdmaDefaultRoamingIndicator
|
+ " DefRoamInd=" + mCdmaDefaultRoamingIndicator
|
||||||
+ " EmergOnly=" + mIsEmergencyOnly
|
+ " EmergOnly=" + mIsEmergencyOnly
|
||||||
+ " IsDataRoamingFromRegistration=" + mIsDataRoamingFromRegistration
|
+ " IsDataRoamingFromRegistration=" + mIsDataRoamingFromRegistration
|
||||||
+ " IsUsingCarrierAggregation=" + mIsUsingCarrierAggregation);
|
+ " IsUsingCarrierAggregation=" + mIsUsingCarrierAggregation
|
||||||
|
+ " mLteEarfcnRsrpBoost=" + mLteEarfcnRsrpBoost);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setNullState(int state) {
|
private void setNullState(int state) {
|
||||||
@@ -842,6 +850,7 @@ public class ServiceState implements Parcelable {
|
|||||||
mIsEmergencyOnly = false;
|
mIsEmergencyOnly = false;
|
||||||
mIsDataRoamingFromRegistration = false;
|
mIsDataRoamingFromRegistration = false;
|
||||||
mIsUsingCarrierAggregation = false;
|
mIsUsingCarrierAggregation = false;
|
||||||
|
mLteEarfcnRsrpBoost = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setStateOutOfService() {
|
public void setStateOutOfService() {
|
||||||
@@ -1016,6 +1025,7 @@ public class ServiceState implements Parcelable {
|
|||||||
mIsEmergencyOnly = m.getBoolean("emergencyOnly");
|
mIsEmergencyOnly = m.getBoolean("emergencyOnly");
|
||||||
mIsDataRoamingFromRegistration = m.getBoolean("isDataRoamingFromRegistration");
|
mIsDataRoamingFromRegistration = m.getBoolean("isDataRoamingFromRegistration");
|
||||||
mIsUsingCarrierAggregation = m.getBoolean("isUsingCarrierAggregation");
|
mIsUsingCarrierAggregation = m.getBoolean("isUsingCarrierAggregation");
|
||||||
|
mLteEarfcnRsrpBoost = m.getInt("LteEarfcnRsrpBoost");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1046,6 +1056,7 @@ public class ServiceState implements Parcelable {
|
|||||||
m.putBoolean("emergencyOnly", mIsEmergencyOnly);
|
m.putBoolean("emergencyOnly", mIsEmergencyOnly);
|
||||||
m.putBoolean("isDataRoamingFromRegistration", mIsDataRoamingFromRegistration);
|
m.putBoolean("isDataRoamingFromRegistration", mIsDataRoamingFromRegistration);
|
||||||
m.putBoolean("isUsingCarrierAggregation", mIsUsingCarrierAggregation);
|
m.putBoolean("isUsingCarrierAggregation", mIsUsingCarrierAggregation);
|
||||||
|
m.putInt("LteEarfcnRsrpBoost", mLteEarfcnRsrpBoost);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
@@ -1080,6 +1091,16 @@ public class ServiceState implements Parcelable {
|
|||||||
mIsUsingCarrierAggregation = ca;
|
mIsUsingCarrierAggregation = ca;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @hide */
|
||||||
|
public int getLteEarfcnRsrpBoost() {
|
||||||
|
return mLteEarfcnRsrpBoost;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @hide */
|
||||||
|
public void setLteEarfcnRsrpBoost(int LteEarfcnRsrpBoost) {
|
||||||
|
mLteEarfcnRsrpBoost = LteEarfcnRsrpBoost;
|
||||||
|
}
|
||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
public void setCssIndicator(int css) {
|
public void setCssIndicator(int css) {
|
||||||
this.mCssIndicator = (css != 0);
|
this.mCssIndicator = (css != 0);
|
||||||
|
|||||||
@@ -64,6 +64,8 @@ public class SignalStrength implements Parcelable {
|
|||||||
private int mLteRsrq;
|
private int mLteRsrq;
|
||||||
private int mLteRssnr;
|
private int mLteRssnr;
|
||||||
private int mLteCqi;
|
private int mLteCqi;
|
||||||
|
private int mLteRsrpBoost; // offset to be reduced from the rsrp threshold while calculating
|
||||||
|
// signal strength level
|
||||||
private int mTdScdmaRscp;
|
private int mTdScdmaRscp;
|
||||||
|
|
||||||
private boolean isGsm; // This value is set by the ServiceStateTracker onSignalStrengthResult
|
private boolean isGsm; // This value is set by the ServiceStateTracker onSignalStrengthResult
|
||||||
@@ -104,6 +106,7 @@ public class SignalStrength implements Parcelable {
|
|||||||
mLteRsrq = INVALID;
|
mLteRsrq = INVALID;
|
||||||
mLteRssnr = INVALID;
|
mLteRssnr = INVALID;
|
||||||
mLteCqi = INVALID;
|
mLteCqi = INVALID;
|
||||||
|
mLteRsrpBoost = 0;
|
||||||
mTdScdmaRscp = INVALID;
|
mTdScdmaRscp = INVALID;
|
||||||
isGsm = true;
|
isGsm = true;
|
||||||
}
|
}
|
||||||
@@ -129,10 +132,27 @@ public class SignalStrength implements Parcelable {
|
|||||||
mLteRsrq = INVALID;
|
mLteRsrq = INVALID;
|
||||||
mLteRssnr = INVALID;
|
mLteRssnr = INVALID;
|
||||||
mLteCqi = INVALID;
|
mLteCqi = INVALID;
|
||||||
|
mLteRsrpBoost = 0;
|
||||||
mTdScdmaRscp = INVALID;
|
mTdScdmaRscp = INVALID;
|
||||||
isGsm = gsmFlag;
|
isGsm = gsmFlag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public SignalStrength(int gsmSignalStrength, int gsmBitErrorRate,
|
||||||
|
int cdmaDbm, int cdmaEcio,
|
||||||
|
int evdoDbm, int evdoEcio, int evdoSnr,
|
||||||
|
int lteSignalStrength, int lteRsrp, int lteRsrq, int lteRssnr, int lteCqi,
|
||||||
|
int lteRsrpBoost, int tdScdmaRscp, boolean gsmFlag) {
|
||||||
|
initialize(gsmSignalStrength, gsmBitErrorRate, cdmaDbm, cdmaEcio,
|
||||||
|
evdoDbm, evdoEcio, evdoSnr, lteSignalStrength, lteRsrp,
|
||||||
|
lteRsrq, lteRssnr, lteCqi, lteRsrpBoost, gsmFlag);
|
||||||
|
mTdScdmaRscp = tdScdmaRscp;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
@@ -145,7 +165,7 @@ public class SignalStrength implements Parcelable {
|
|||||||
int tdScdmaRscp, boolean gsmFlag) {
|
int tdScdmaRscp, boolean gsmFlag) {
|
||||||
initialize(gsmSignalStrength, gsmBitErrorRate, cdmaDbm, cdmaEcio,
|
initialize(gsmSignalStrength, gsmBitErrorRate, cdmaDbm, cdmaEcio,
|
||||||
evdoDbm, evdoEcio, evdoSnr, lteSignalStrength, lteRsrp,
|
evdoDbm, evdoEcio, evdoSnr, lteSignalStrength, lteRsrp,
|
||||||
lteRsrq, lteRssnr, lteCqi, gsmFlag);
|
lteRsrq, lteRssnr, lteCqi, 0, gsmFlag);
|
||||||
mTdScdmaRscp = tdScdmaRscp;
|
mTdScdmaRscp = tdScdmaRscp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -161,7 +181,7 @@ public class SignalStrength implements Parcelable {
|
|||||||
boolean gsmFlag) {
|
boolean gsmFlag) {
|
||||||
initialize(gsmSignalStrength, gsmBitErrorRate, cdmaDbm, cdmaEcio,
|
initialize(gsmSignalStrength, gsmBitErrorRate, cdmaDbm, cdmaEcio,
|
||||||
evdoDbm, evdoEcio, evdoSnr, lteSignalStrength, lteRsrp,
|
evdoDbm, evdoEcio, evdoSnr, lteSignalStrength, lteRsrp,
|
||||||
lteRsrq, lteRssnr, lteCqi, gsmFlag);
|
lteRsrq, lteRssnr, lteCqi, 0, gsmFlag);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -175,7 +195,7 @@ public class SignalStrength implements Parcelable {
|
|||||||
boolean gsmFlag) {
|
boolean gsmFlag) {
|
||||||
initialize(gsmSignalStrength, gsmBitErrorRate, cdmaDbm, cdmaEcio,
|
initialize(gsmSignalStrength, gsmBitErrorRate, cdmaDbm, cdmaEcio,
|
||||||
evdoDbm, evdoEcio, evdoSnr, 99, INVALID,
|
evdoDbm, evdoEcio, evdoSnr, 99, INVALID,
|
||||||
INVALID, INVALID, INVALID, gsmFlag);
|
INVALID, INVALID, INVALID, 0, gsmFlag);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -209,7 +229,7 @@ public class SignalStrength implements Parcelable {
|
|||||||
boolean gsm) {
|
boolean gsm) {
|
||||||
initialize(gsmSignalStrength, gsmBitErrorRate, cdmaDbm, cdmaEcio,
|
initialize(gsmSignalStrength, gsmBitErrorRate, cdmaDbm, cdmaEcio,
|
||||||
evdoDbm, evdoEcio, evdoSnr, 99, INVALID,
|
evdoDbm, evdoEcio, evdoSnr, 99, INVALID,
|
||||||
INVALID, INVALID, INVALID, gsm);
|
INVALID, INVALID, INVALID, 0, gsm);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -227,6 +247,7 @@ public class SignalStrength implements Parcelable {
|
|||||||
* @param lteRsrq
|
* @param lteRsrq
|
||||||
* @param lteRssnr
|
* @param lteRssnr
|
||||||
* @param lteCqi
|
* @param lteCqi
|
||||||
|
* @param lteRsrpBoost
|
||||||
* @param gsm
|
* @param gsm
|
||||||
*
|
*
|
||||||
* @hide
|
* @hide
|
||||||
@@ -235,7 +256,7 @@ public class SignalStrength implements Parcelable {
|
|||||||
int cdmaDbm, int cdmaEcio,
|
int cdmaDbm, int cdmaEcio,
|
||||||
int evdoDbm, int evdoEcio, int evdoSnr,
|
int evdoDbm, int evdoEcio, int evdoSnr,
|
||||||
int lteSignalStrength, int lteRsrp, int lteRsrq, int lteRssnr, int lteCqi,
|
int lteSignalStrength, int lteRsrp, int lteRsrq, int lteRssnr, int lteCqi,
|
||||||
boolean gsm) {
|
int lteRsrpBoost, boolean gsm) {
|
||||||
mGsmSignalStrength = gsmSignalStrength;
|
mGsmSignalStrength = gsmSignalStrength;
|
||||||
mGsmBitErrorRate = gsmBitErrorRate;
|
mGsmBitErrorRate = gsmBitErrorRate;
|
||||||
mCdmaDbm = cdmaDbm;
|
mCdmaDbm = cdmaDbm;
|
||||||
@@ -248,6 +269,7 @@ public class SignalStrength implements Parcelable {
|
|||||||
mLteRsrq = lteRsrq;
|
mLteRsrq = lteRsrq;
|
||||||
mLteRssnr = lteRssnr;
|
mLteRssnr = lteRssnr;
|
||||||
mLteCqi = lteCqi;
|
mLteCqi = lteCqi;
|
||||||
|
mLteRsrpBoost = lteRsrpBoost;
|
||||||
mTdScdmaRscp = INVALID;
|
mTdScdmaRscp = INVALID;
|
||||||
isGsm = gsm;
|
isGsm = gsm;
|
||||||
if (DBG) log("initialize: " + toString());
|
if (DBG) log("initialize: " + toString());
|
||||||
@@ -269,6 +291,7 @@ public class SignalStrength implements Parcelable {
|
|||||||
mLteRsrq = s.mLteRsrq;
|
mLteRsrq = s.mLteRsrq;
|
||||||
mLteRssnr = s.mLteRssnr;
|
mLteRssnr = s.mLteRssnr;
|
||||||
mLteCqi = s.mLteCqi;
|
mLteCqi = s.mLteCqi;
|
||||||
|
mLteRsrpBoost = s.mLteRsrpBoost;
|
||||||
mTdScdmaRscp = s.mTdScdmaRscp;
|
mTdScdmaRscp = s.mTdScdmaRscp;
|
||||||
isGsm = s.isGsm;
|
isGsm = s.isGsm;
|
||||||
}
|
}
|
||||||
@@ -293,6 +316,7 @@ public class SignalStrength implements Parcelable {
|
|||||||
mLteRsrq = in.readInt();
|
mLteRsrq = in.readInt();
|
||||||
mLteRssnr = in.readInt();
|
mLteRssnr = in.readInt();
|
||||||
mLteCqi = in.readInt();
|
mLteCqi = in.readInt();
|
||||||
|
mLteRsrpBoost = in.readInt();
|
||||||
mTdScdmaRscp = in.readInt();
|
mTdScdmaRscp = in.readInt();
|
||||||
isGsm = (in.readInt() != 0);
|
isGsm = (in.readInt() != 0);
|
||||||
}
|
}
|
||||||
@@ -340,6 +364,7 @@ public class SignalStrength implements Parcelable {
|
|||||||
out.writeInt(mLteRsrq);
|
out.writeInt(mLteRsrq);
|
||||||
out.writeInt(mLteRssnr);
|
out.writeInt(mLteRssnr);
|
||||||
out.writeInt(mLteCqi);
|
out.writeInt(mLteCqi);
|
||||||
|
out.writeInt(mLteRsrpBoost);
|
||||||
out.writeInt(mTdScdmaRscp);
|
out.writeInt(mTdScdmaRscp);
|
||||||
out.writeInt(isGsm ? 1 : 0);
|
out.writeInt(isGsm ? 1 : 0);
|
||||||
}
|
}
|
||||||
@@ -415,6 +440,18 @@ public class SignalStrength implements Parcelable {
|
|||||||
isGsm = gsmFlag;
|
isGsm = gsmFlag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param lteRsrpBoost - signal strength offset
|
||||||
|
*
|
||||||
|
* Used by phone to set the lte signal strength offset which will be
|
||||||
|
* reduced from rsrp threshold while calculating signal strength level
|
||||||
|
*
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public void setLteRsrpBoost(int lteRsrpBoost) {
|
||||||
|
mLteRsrpBoost = lteRsrpBoost;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the GSM Signal Strength, valid values are (0-31, 99) as defined in TS
|
* Get the GSM Signal Strength, valid values are (0-31, 99) as defined in TS
|
||||||
* 27.007 8.5
|
* 27.007 8.5
|
||||||
@@ -490,6 +527,11 @@ public class SignalStrength implements Parcelable {
|
|||||||
return mLteCqi;
|
return mLteCqi;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @hide */
|
||||||
|
public int getLteRsrpBoost() {
|
||||||
|
return mLteRsrpBoost;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve an abstract level value for the overall signal strength.
|
* Retrieve an abstract level value for the overall signal strength.
|
||||||
*
|
*
|
||||||
@@ -793,12 +835,19 @@ public class SignalStrength implements Parcelable {
|
|||||||
Log.wtf(LOG_TAG, "getLteLevel - config_lteDbmThresholds has invalid num of elements."
|
Log.wtf(LOG_TAG, "getLteLevel - config_lteDbmThresholds has invalid num of elements."
|
||||||
+ " Cannot evaluate RSRP signal.");
|
+ " Cannot evaluate RSRP signal.");
|
||||||
} else {
|
} else {
|
||||||
if (mLteRsrp > threshRsrp[5]) rsrpIconLevel = -1;
|
if (mLteRsrp > threshRsrp[5]) {
|
||||||
else if (mLteRsrp >= threshRsrp[4]) rsrpIconLevel = SIGNAL_STRENGTH_GREAT;
|
rsrpIconLevel = -1;
|
||||||
else if (mLteRsrp >= threshRsrp[3]) rsrpIconLevel = SIGNAL_STRENGTH_GOOD;
|
} else if (mLteRsrp >= (threshRsrp[4] - mLteRsrpBoost)) {
|
||||||
else if (mLteRsrp >= threshRsrp[2]) rsrpIconLevel = SIGNAL_STRENGTH_MODERATE;
|
rsrpIconLevel = SIGNAL_STRENGTH_GREAT;
|
||||||
else if (mLteRsrp >= threshRsrp[1]) rsrpIconLevel = SIGNAL_STRENGTH_POOR;
|
} else if (mLteRsrp >= (threshRsrp[3] - mLteRsrpBoost)) {
|
||||||
else if (mLteRsrp >= threshRsrp[0]) rsrpIconLevel = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
|
rsrpIconLevel = SIGNAL_STRENGTH_GOOD;
|
||||||
|
} else if (mLteRsrp >= (threshRsrp[2] - mLteRsrpBoost)) {
|
||||||
|
rsrpIconLevel = SIGNAL_STRENGTH_MODERATE;
|
||||||
|
} else if (mLteRsrp >= (threshRsrp[1] - mLteRsrpBoost)) {
|
||||||
|
rsrpIconLevel = SIGNAL_STRENGTH_POOR;
|
||||||
|
} else if (mLteRsrp >= threshRsrp[0]) {
|
||||||
|
rsrpIconLevel = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -816,7 +865,8 @@ public class SignalStrength implements Parcelable {
|
|||||||
snrIconLevel = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
|
snrIconLevel = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
|
||||||
|
|
||||||
if (DBG) log("getLTELevel - rsrp:" + mLteRsrp + " snr:" + mLteRssnr + " rsrpIconLevel:"
|
if (DBG) log("getLTELevel - rsrp:" + mLteRsrp + " snr:" + mLteRssnr + " rsrpIconLevel:"
|
||||||
+ rsrpIconLevel + " snrIconLevel:" + snrIconLevel);
|
+ rsrpIconLevel + " snrIconLevel:" + snrIconLevel
|
||||||
|
+ " lteRsrpBoost:" + mLteRsrpBoost);
|
||||||
|
|
||||||
/* Choose a measurement type to use for notification */
|
/* Choose a measurement type to use for notification */
|
||||||
if (snrIconLevel != -1 && rsrpIconLevel != -1) {
|
if (snrIconLevel != -1 && rsrpIconLevel != -1) {
|
||||||
@@ -939,7 +989,7 @@ public class SignalStrength implements Parcelable {
|
|||||||
+ (mEvdoDbm * primeNum) + (mEvdoEcio * primeNum) + (mEvdoSnr * primeNum)
|
+ (mEvdoDbm * primeNum) + (mEvdoEcio * primeNum) + (mEvdoSnr * primeNum)
|
||||||
+ (mLteSignalStrength * primeNum) + (mLteRsrp * primeNum)
|
+ (mLteSignalStrength * primeNum) + (mLteRsrp * primeNum)
|
||||||
+ (mLteRsrq * primeNum) + (mLteRssnr * primeNum) + (mLteCqi * primeNum)
|
+ (mLteRsrq * primeNum) + (mLteRssnr * primeNum) + (mLteCqi * primeNum)
|
||||||
+ (mTdScdmaRscp * primeNum) + (isGsm ? 1 : 0));
|
+ (mLteRsrpBoost * primeNum) + (mTdScdmaRscp * primeNum) + (isGsm ? 1 : 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -971,6 +1021,7 @@ public class SignalStrength implements Parcelable {
|
|||||||
&& mLteRsrq == s.mLteRsrq
|
&& mLteRsrq == s.mLteRsrq
|
||||||
&& mLteRssnr == s.mLteRssnr
|
&& mLteRssnr == s.mLteRssnr
|
||||||
&& mLteCqi == s.mLteCqi
|
&& mLteCqi == s.mLteCqi
|
||||||
|
&& mLteRsrpBoost == s.mLteRsrpBoost
|
||||||
&& mTdScdmaRscp == s.mTdScdmaRscp
|
&& mTdScdmaRscp == s.mTdScdmaRscp
|
||||||
&& isGsm == s.isGsm);
|
&& isGsm == s.isGsm);
|
||||||
}
|
}
|
||||||
@@ -993,6 +1044,7 @@ public class SignalStrength implements Parcelable {
|
|||||||
+ " " + mLteRsrq
|
+ " " + mLteRsrq
|
||||||
+ " " + mLteRssnr
|
+ " " + mLteRssnr
|
||||||
+ " " + mLteCqi
|
+ " " + mLteCqi
|
||||||
|
+ " " + mLteRsrpBoost
|
||||||
+ " " + mTdScdmaRscp
|
+ " " + mTdScdmaRscp
|
||||||
+ " " + (isGsm ? "gsm|lte" : "cdma"));
|
+ " " + (isGsm ? "gsm|lte" : "cdma"));
|
||||||
}
|
}
|
||||||
@@ -1016,6 +1068,7 @@ public class SignalStrength implements Parcelable {
|
|||||||
mLteRsrq = m.getInt("LteRsrq");
|
mLteRsrq = m.getInt("LteRsrq");
|
||||||
mLteRssnr = m.getInt("LteRssnr");
|
mLteRssnr = m.getInt("LteRssnr");
|
||||||
mLteCqi = m.getInt("LteCqi");
|
mLteCqi = m.getInt("LteCqi");
|
||||||
|
mLteRsrpBoost = m.getInt("lteRsrpBoost");
|
||||||
mTdScdmaRscp = m.getInt("TdScdma");
|
mTdScdmaRscp = m.getInt("TdScdma");
|
||||||
isGsm = m.getBoolean("isGsm");
|
isGsm = m.getBoolean("isGsm");
|
||||||
}
|
}
|
||||||
@@ -1039,6 +1092,7 @@ public class SignalStrength implements Parcelable {
|
|||||||
m.putInt("LteRsrq", mLteRsrq);
|
m.putInt("LteRsrq", mLteRsrq);
|
||||||
m.putInt("LteRssnr", mLteRssnr);
|
m.putInt("LteRssnr", mLteRssnr);
|
||||||
m.putInt("LteCqi", mLteCqi);
|
m.putInt("LteCqi", mLteCqi);
|
||||||
|
m.putInt("lteRsrpBoost", mLteRsrpBoost);
|
||||||
m.putInt("TdScdma", mTdScdmaRscp);
|
m.putInt("TdScdma", mTdScdmaRscp);
|
||||||
m.putBoolean("isGsm", isGsm);
|
m.putBoolean("isGsm", isGsm);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user