Loading telephony/java/android/telephony/SignalStrength.java +16 −3 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.telephony; import android.os.Bundle; import android.os.Parcel; import android.os.Parcelable; import android.os.SystemProperties; import android.util.Log; /** Loading Loading @@ -435,6 +436,15 @@ public class SignalStrength implements Parcelable { return mLteCqi; } public boolean needsOldRilFeature(String feature) { String[] features = SystemProperties.get("ro.telephony.ril.v3", "").split(","); for (String found: features) { if (found.equals(feature)) return true; } return false; } /** * Get signal level as an int from 0..4 * Loading @@ -444,8 +454,9 @@ public class SignalStrength implements Parcelable { int level; if (isGsm) { boolean oldRil = needsOldRilFeature("signalstrength"); level = getLteLevel(); if (level == SIGNAL_STRENGTH_NONE_OR_UNKNOWN) { if (level == SIGNAL_STRENGTH_NONE_OR_UNKNOWN || oldRil) { level = getGsmLevel(); } } else { Loading Loading @@ -474,7 +485,8 @@ public class SignalStrength implements Parcelable { public int getAsuLevel() { int asuLevel; if (isGsm) { if (getLteLevel() == SIGNAL_STRENGTH_NONE_OR_UNKNOWN) { boolean oldRil = needsOldRilFeature("signalstrength"); if (getLteLevel() == SIGNAL_STRENGTH_NONE_OR_UNKNOWN || oldRil) { asuLevel = getGsmAsuLevel(); } else { asuLevel = getLteAsuLevel(); Loading Loading @@ -506,7 +518,8 @@ public class SignalStrength implements Parcelable { int dBm; if(isGsm()) { if (getLteLevel() == SIGNAL_STRENGTH_NONE_OR_UNKNOWN) { boolean oldRil = needsOldRilFeature("signalstrength"); if (getLteLevel() == SIGNAL_STRENGTH_NONE_OR_UNKNOWN || oldRil) { dBm = getGsmDbm(); } else { dBm = getLteDbm(); Loading Loading
telephony/java/android/telephony/SignalStrength.java +16 −3 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.telephony; import android.os.Bundle; import android.os.Parcel; import android.os.Parcelable; import android.os.SystemProperties; import android.util.Log; /** Loading Loading @@ -435,6 +436,15 @@ public class SignalStrength implements Parcelable { return mLteCqi; } public boolean needsOldRilFeature(String feature) { String[] features = SystemProperties.get("ro.telephony.ril.v3", "").split(","); for (String found: features) { if (found.equals(feature)) return true; } return false; } /** * Get signal level as an int from 0..4 * Loading @@ -444,8 +454,9 @@ public class SignalStrength implements Parcelable { int level; if (isGsm) { boolean oldRil = needsOldRilFeature("signalstrength"); level = getLteLevel(); if (level == SIGNAL_STRENGTH_NONE_OR_UNKNOWN) { if (level == SIGNAL_STRENGTH_NONE_OR_UNKNOWN || oldRil) { level = getGsmLevel(); } } else { Loading Loading @@ -474,7 +485,8 @@ public class SignalStrength implements Parcelable { public int getAsuLevel() { int asuLevel; if (isGsm) { if (getLteLevel() == SIGNAL_STRENGTH_NONE_OR_UNKNOWN) { boolean oldRil = needsOldRilFeature("signalstrength"); if (getLteLevel() == SIGNAL_STRENGTH_NONE_OR_UNKNOWN || oldRil) { asuLevel = getGsmAsuLevel(); } else { asuLevel = getLteAsuLevel(); Loading Loading @@ -506,7 +518,8 @@ public class SignalStrength implements Parcelable { int dBm; if(isGsm()) { if (getLteLevel() == SIGNAL_STRENGTH_NONE_OR_UNKNOWN) { boolean oldRil = needsOldRilFeature("signalstrength"); if (getLteLevel() == SIGNAL_STRENGTH_NONE_OR_UNKNOWN || oldRil) { dBm = getGsmDbm(); } else { dBm = getLteDbm(); Loading