之前git log看过去除4G通话以及去除2G、3G还有4G信号的问题,目前对信号的需求做的比较少,刚好今天做了一个调大信号格数的问题,其实信号强度还是不变的,只是让使用者看起来信号变好了,信号格数变多了(黑心的厂家),下面看修改方法; 在8321_git_13\alps_mssi\frameworks\base\telephony\java\android\telephony路径下有下面几个文件,分别是2G、3G还有4G 这几个文件代表的分别是: CellSignalStrengthGsm.java是2G信号 CellSignalStrengthCdma.java里面是使用CDMA2000通信技术标准的3G信号 CellSignalStrengthTdscdma.java里面是使用TD-SCDMA通信技术标准的3G信号 CellSignalStrengthWcdma.java里面是使用WCDMA通信技术标准的3G信号 CellSignalStrengthLte.java是4G信号 代码修改如下:
diff --git a/alps_mssi/frameworks/base/telephony/java/android/telephony/CellSignalStrengthCdma.java b/alps_mssi/frameworks/base/telephony/java/android/telephony/CellSignalStrengthCdma.java
old mode 100644
new mode 100755
index 5298e67bdf8..cb76c3acba2
--- a/alps_mssi/frameworks/base/telephony/java/android/telephony/CellSignalStrengthCdma.java
+++ b/alps_mssi/frameworks/base/telephony/java/android/telephony/CellSignalStrengthCdma.java
@@ -201,18 +201,18 @@ public final class CellSignalStrengthCdma extends CellSignalStrength implements
int levelEcio;
if (cdmaDbm == CellInfo.UNAVAILABLE) levelDbm = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
- else if (cdmaDbm >= -75) levelDbm = SIGNAL_STRENGTH_GREAT;
- else if (cdmaDbm >= -85) levelDbm = SIGNAL_STRENGTH_GOOD;
- else if (cdmaDbm >= -95) levelDbm = SIGNAL_STRENGTH_MODERATE;
- else if (cdmaDbm >= -100) levelDbm = SIGNAL_STRENGTH_POOR;
+ else if (cdmaDbm >= -100) levelDbm = SIGNAL_STRENGTH_GREAT;
+ else if (cdmaDbm >= -110) levelDbm = SIGNAL_STRENGTH_GOOD;
+ else if (cdmaDbm >= -120) levelDbm = SIGNAL_STRENGTH_MODERATE;
+ else if (cdmaDbm >= -130) levelDbm = SIGNAL_STRENGTH_POOR;
else levelDbm = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
// Ec/Io are in dB*10
if (cdmaEcio == CellInfo.UNAVAILABLE) levelEcio = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
- else if (cdmaEcio >= -90) levelEcio = SIGNAL_STRENGTH_GREAT;
- else if (cdmaEcio >= -110) levelEcio = SIGNAL_STRENGTH_GOOD;
- else if (cdmaEcio >= -130) levelEcio = SIGNAL_STRENGTH_MODERATE;
- else if (cdmaEcio >= -150) levelEcio = SIGNAL_STRENGTH_POOR;
+ else if (cdmaEcio >= -110) levelEcio = SIGNAL_STRENGTH_GREAT;
+ else if (cdmaEcio >= -130) levelEcio = SIGNAL_STRENGTH_GOOD;
+ else if (cdmaEcio >= -150) levelEcio = SIGNAL_STRENGTH_MODERATE;
+ else if (cdmaEcio >= -170) levelEcio = SIGNAL_STRENGTH_POOR;
else levelEcio = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
int level = (levelDbm < levelEcio) ? levelDbm : levelEcio;
@@ -230,10 +230,10 @@ public final class CellSignalStrengthCdma extends CellSignalStrength implements
int levelEvdoSnr;
if (evdoDbm == CellInfo.UNAVAILABLE) levelEvdoDbm = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
- else if (evdoDbm >= -65) levelEvdoDbm = SIGNAL_STRENGTH_GREAT;
- else if (evdoDbm >= -75) levelEvdoDbm = SIGNAL_STRENGTH_GOOD;
- else if (evdoDbm >= -90) levelEvdoDbm = SIGNAL_STRENGTH_MODERATE;
- else if (evdoDbm >= -105) levelEvdoDbm = SIGNAL_STRENGTH_POOR;
+ else if (evdoDbm >= -80) levelEvdoDbm = SIGNAL_STRENGTH_GREAT;
+ else if (evdoDbm >= -90) levelEvdoDbm = SIGNAL_STRENGTH_GOOD;
+ else if (evdoDbm >= -105) levelEvdoDbm = SIGNAL_STRENGTH_MODERATE;
+ else if (evdoDbm >= -130) levelEvdoDbm = SIGNAL_STRENGTH_POOR;
else levelEvdoDbm = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
if (evdoSnr == CellInfo.UNAVAILABLE) levelEvdoSnr = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
diff --git a/alps_mssi/frameworks/base/telephony/java/android/telephony/CellSignalStrengthGsm.java b/alps_mssi/frameworks/base/telephony/java/android/telephony/CellSignalStrengthGsm.java
old mode 100644
new mode 100755
index 7b780843061..64ceac0d564
--- a/alps_mssi/frameworks/base/telephony/java/android/telephony/CellSignalStrengthGsm.java
+++ b/alps_mssi/frameworks/base/telephony/java/android/telephony/CellSignalStrengthGsm.java
@@ -36,11 +36,11 @@ public final class CellSignalStrengthGsm extends CellSignalStrength implements P
private static final boolean DBG = false;
private static final int GSM_RSSI_MAX = -51;
- private static final int GSM_RSSI_GREAT = -89;
- private static final int GSM_RSSI_GOOD = -97;
- private static final int GSM_RSSI_MODERATE = -103;
- private static final int GSM_RSSI_POOR = -107;
- private static final int GSM_RSSI_MIN = -113;
+ private static final int GSM_RSSI_GREAT = -100;
+ private static final int GSM_RSSI_GOOD = -110;
+ private static final int GSM_RSSI_MODERATE = -120;
+ private static final int GSM_RSSI_POOR = -130;
+ private static final int GSM_RSSI_MIN = -140;
private static final int[] sRssiThresholds = new int[] {
GSM_RSSI_POOR, GSM_RSSI_MODERATE, GSM_RSSI_GOOD, GSM_RSSI_GREAT};
diff --git a/alps_mssi/frameworks/base/telephony/java/android/telephony/CellSignalStrengthTdscdma.java b/alps_mssi/frameworks/base/telephony/java/android/telephony/CellSignalStrengthTdscdma.java
old mode 100644
new mode 100755
index 8a7c70ec5ea..b50903748cd
--- a/alps_mssi/frameworks/base/telephony/java/android/telephony/CellSignalStrengthTdscdma.java
+++ b/alps_mssi/frameworks/base/telephony/java/android/telephony/CellSignalStrengthTdscdma.java
@@ -39,11 +39,11 @@ public final class CellSignalStrengthTdscdma extends CellSignalStrength implemen
// These levels are arbitrary but carried over from SignalStrength.java for consistency.
private static final int TDSCDMA_RSCP_MAX = -24;
- private static final int TDSCDMA_RSCP_GREAT = -49;
- private static final int TDSCDMA_RSCP_GOOD = -73;
- private static final int TDSCDMA_RSCP_MODERATE = -97;
- private static final int TDSCDMA_RSCP_POOR = -110;
- private static final int TDSCDMA_RSCP_MIN = -120;
+ private static final int TDSCDMA_RSCP_GREAT = -100;
+ private static final int TDSCDMA_RSCP_GOOD = -110;
+ private static final int TDSCDMA_RSCP_MODERATE = -120;
+ private static final int TDSCDMA_RSCP_POOR = -130;
+ private static final int TDSCDMA_RSCP_MIN = -140;
private int mRssi; // in dBm [-113, -51], CellInfo.UNAVAILABLE
@@ -68,9 +68,9 @@ public final class CellSignalStrengthTdscdma extends CellSignalStrength implemen
* @hide
*/
public CellSignalStrengthTdscdma(int rssi, int ber, int rscp) {
- mRssi = inRangeOrUnavailable(rssi, -113, -51);
+ mRssi = inRangeOrUnavailable(rssi, -140, -51);
mBitErrorRate = inRangeOrUnavailable(ber, 0, 7, 99);
- mRscp = inRangeOrUnavailable(rscp, -120, -24);
+ mRscp = inRangeOrUnavailable(rscp, -140, -24);
updateLevel(null, null);
}
diff --git a/alps_mssi/frameworks/base/telephony/java/android/telephony/CellSignalStrengthWcdma.java b/alps_mssi/frameworks/base/telephony/java/android/telephony/CellSignalStrengthWcdma.java
old mode 100644
new mode 100755
index f30440d9515..8de710bb08f
--- a/alps_mssi/frameworks/base/telephony/java/android/telephony/CellSignalStrengthWcdma.java
+++ b/alps_mssi/frameworks/base/telephony/java/android/telephony/CellSignalStrengthWcdma.java
@@ -39,21 +39,21 @@ public final class CellSignalStrengthWcdma extends CellSignalStrength implements
private static final boolean DBG = false;
private static final int WCDMA_RSSI_MAX = -51;
- private static final int WCDMA_RSSI_GREAT = -77;
- private static final int WCDMA_RSSI_GOOD = -87;
- private static final int WCDMA_RSSI_MODERATE = -97;
- private static final int WCDMA_RSSI_POOR = -107;
- private static final int WCDMA_RSSI_MIN = -113;
+ private static final int WCDMA_RSSI_GREAT = -100;
+ private static final int WCDMA_RSSI_GOOD = -110;
+ private static final int WCDMA_RSSI_MODERATE = -120;
+ private static final int WCDMA_RSSI_POOR = -130;
+ private static final int WCDMA_RSSI_MIN = -140;
private static final int[] sRssiThresholds = new int[]{
WCDMA_RSSI_POOR, WCDMA_RSSI_MODERATE, WCDMA_RSSI_GOOD, WCDMA_RSSI_GREAT};
private static final int WCDMA_RSCP_MAX = -24;
- private static final int WCDMA_RSCP_GREAT = -85;
- private static final int WCDMA_RSCP_GOOD = -95;
- private static final int WCDMA_RSCP_MODERATE = -105;
- private static final int WCDMA_RSCP_POOR = -115;
- private static final int WCDMA_RSCP_MIN = -120;
+ private static final int WCDMA_RSCP_GREAT = -100;
+ private static final int WCDMA_RSCP_GOOD = -110;
+ private static final int WCDMA_RSCP_MODERATE = -120;
+ private static final int WCDMA_RSCP_POOR = -130;
+ private static final int WCDMA_RSCP_MIN = -140;
private static final int[] sRscpThresholds = new int[] {
WCDMA_RSCP_POOR, WCDMA_RSCP_MODERATE, WCDMA_RSCP_GOOD, WCDMA_RSCP_GREAT};
@@ -89,7 +89,7 @@ public final class CellSignalStrengthWcdma extends CellSignalStrength implements
public CellSignalStrengthWcdma(int rssi, int ber, int rscp, int ecno) {
mRssi = inRangeOrUnavailable(rssi, WCDMA_RSSI_MIN, WCDMA_RSSI_MAX);
mBitErrorRate = inRangeOrUnavailable(ber, 0, 7, 99);
- mRscp = inRangeOrUnavailable(rscp, -120, -24);
+ mRscp = inRangeOrUnavailable(rscp, -140, -24);
mEcNo = inRangeOrUnavailable(ecno, -24, 1);
updateLevel(null, null);
}
diff --git a/alps_mssi/vendor/mediatek/proprietary/frameworks/opt/telephony-base/java/mediatek/telephony/SignalStrengthExt.java b/alps_mssi/vendor/mediatek/proprietary/frameworks/opt/telephony-base/java/mediatek/telephony/SignalStrengthExt.java
old mode 100644
new mode 100755
index 166215fd564..df5ae82d3da
--- a/alps_mssi/vendor/mediatek/proprietary/frameworks/opt/telephony-base/java/mediatek/telephony/SignalStrengthExt.java
+++ b/alps_mssi/vendor/mediatek/proprietary/frameworks/opt/telephony-base/java/mediatek/telephony/SignalStrengthExt.java
@@ -68,13 +68,13 @@ public class SignalStrengthExt implements ISignalStrengthExt {
// TDD/FDD mode
if ((UmtsRscp > -25) || (UmtsRscp == SignalStrength.INVALID))
level = SignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
- else if (UmtsRscp >= -72)
+ else if (UmtsRscp >= -100)
level = SignalStrength.SIGNAL_STRENGTH_GREAT;
- else if (UmtsRscp >= -88)
+ else if (UmtsRscp >= -110)
level = SignalStrength.SIGNAL_STRENGTH_GOOD;
- else if (UmtsRscp >= -104)
- level = SignalStrength.SIGNAL_STRENGTH_MODERATE;
else if (UmtsRscp >= -120)
+ level = SignalStrength.SIGNAL_STRENGTH_MODERATE;
+ else if (UmtsRscp >= -130)
level = SignalStrength.SIGNAL_STRENGTH_POOR;
else
level = SignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
@@ -97,13 +97,13 @@ public class SignalStrengthExt implements ISignalStrengthExt {
if (mLteRsrp > -44) {
rsrpIconLevel = -1;
- } else if (mLteRsrp >= -85) {
+ } else if (mLteRsrp >= -100) {
rsrpIconLevel = SignalStrength.SIGNAL_STRENGTH_GREAT;
- } else if (mLteRsrp >= -95) {
+ } else if (mLteRsrp >= -110) {
rsrpIconLevel = SignalStrength.SIGNAL_STRENGTH_GOOD;
- } else if (mLteRsrp >= -105) {
+ } else if (mLteRsrp >= -120) {
rsrpIconLevel = SignalStrength.SIGNAL_STRENGTH_MODERATE;
- } else if (mLteRsrp >= -115) {
+ } else if (mLteRsrp >= -130) {
rsrpIconLevel = SignalStrength.SIGNAL_STRENGTH_POOR;
} else if (mLteRsrp >= -140) {
rsrpIconLevel = SignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
这里面的值范围改的越大,信号显示的格数就越满(实际上信号强度没变,都是骗人的),mssi路径是Android13,mtk对自己的代码和谷歌分开了,但是framework不影响,此方法应该是11到13通用的