hi,
Android Framework thinks there is LTE signal, even there is GSM signal only as the below.
"frameworks/base/telephony/java/android/telephony/SignalStrength.java"
level = getLteLevel(); | |
if (level == SIGNAL_STRENGTH_NONE_OR_UNKNOWN) { | |
level = getGsmLevel(); // <--- Won't enter this line, even GSM signal only. | |
} |
You can add some conditions to let getLteLevel() return SIGNAL_STRENGTH_NONE_OR_UNKNOWN. The following is for reference.
--
diff --git a/telephony/java/android/telephony/SignalStrength.java b/telephony/java/android/telephony/SignalStrengt
index f998935..88fd379 100644
--- a/telephony/java/android/telephony/SignalStrength.java
+++ b/telephony/java/android/telephony/SignalStrength.java
@@ -743,6 +743,9 @@ public class SignalStrength implements Parcelable {
if (DBG) log("getLTELevel - rsrp:" + mLteRsrp + " snr:" + mLteRssnr + " rsrpIconLevel:"
+ rsrpIconLevel + " snrIconLevel:" + snrIconLevel);
+
+ if (mLteRsrp == SignalStrength.INVALID) return
+ SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
+
/* Choose a measurement type to use for notification */
if (snrIconLevel != -1 && rsrpIconLevel != -1) {
/*
---
Regards,
Max
hi,
Android Framework thinks there is LTE signal, even there is GSM signal only as the below.
"frameworks/base/telephony/java/android/telephony/SignalStrength.java"
level = getLteLevel(); | |
if (level == SIGNAL_STRENGTH_NONE_OR_UNKNOWN) { | |
level = getGsmLevel(); // <--- Won't enter this line, even GSM signal only. | |
} |
You can add some conditions to let getLteLevel() return SIGNAL_STRENGTH_NONE_OR_UNKNOWN. The following is for reference.
--
diff --git a/telephony/java/android/telephony/SignalStrength.java b/telephony/java/android/telephony/SignalStrengt
index f998935..88fd379 100644
--- a/telephony/java/android/telephony/SignalStrength.java
+++ b/telephony/java/android/telephony/SignalStrength.java
@@ -743,6 +743,9 @@ public class SignalStrength implements Parcelable {
if (DBG) log("getLTELevel - rsrp:" + mLteRsrp + " snr:" + mLteRssnr + " rsrpIconLevel:"
+ rsrpIconLevel + " snrIconLevel:" + snrIconLevel);
+
+ if (mLteRsrp == SignalStrength.INVALID) return
+ SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
+
/* Choose a measurement type to use for notification */
if (snrIconLevel != -1 && rsrpIconLevel != -1) {
/*
---
Regards,
Max