diff options
| -rw-r--r-- | core/res/res/values/cm_strings.xml | 9 | ||||
| -rw-r--r-- | core/res/res/values/strings.xml | 8 | ||||
| -rw-r--r-- | telephony/java/android/telephony/SignalStrength.java | 11 |
3 files changed, 16 insertions, 12 deletions
diff --git a/core/res/res/values/cm_strings.xml b/core/res/res/values/cm_strings.xml index 33f07f0..4e43675 100644 --- a/core/res/res/values/cm_strings.xml +++ b/core/res/res/values/cm_strings.xml @@ -181,4 +181,13 @@ intercept an outgoing SMS. Malicious apps may use this to prevent outgoing SMS messages.</string> + <!-- Title of policy access to start enforcing SELinux policy [CHAR LIMIT=30]--> + <string name="policylab_enforceSelinux">Enforce SELinux</string> + <!-- Description of policy access to start enforcing SELinux policy [CHAR LIMIT=110]--> + <string name="policydesc_enforceSelinux">Toggle SELinux policy enforcing or permissive mode.</string> + <!-- Title of policy access to start enforcing MMAC policy [CHAR LIMIT=30]--> + <string name="policylab_enforceMmac">Enforce MMAC</string> + <!-- Description of policy access to start enforcing MMAC policy [CHAR LIMIT=110]--> + <string name="policydesc_enforceMmac">Toggle MMAC policy enforcing or permissive mode.</string> + </resources> diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index 34e6f48..e061032 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -1820,14 +1820,6 @@ <string name="policylab_disableKeyguardFeatures">Disable features in keyguard</string> <!-- Description of policy access to disable all device cameras [CHAR LIMIT=110]--> <string name="policydesc_disableKeyguardFeatures">Prevent use of some features in keyguard.</string> - <!-- Title of policy access to start enforcing SELinux policy [CHAR LIMIT=30]--> - <string name="policylab_enforceSelinux">Enforce SELinux</string> - <!-- Description of policy access to start enforcing SELinux policy [CHAR LIMIT=110]--> - <string name="policydesc_enforceSelinux">Toggle SELinux policy enforcing or permissive mode.</string> - <!-- Title of policy access to start enforcing MMAC policy [CHAR LIMIT=30]--> - <string name="policylab_enforceMmac">Enforce MMAC</string> - <!-- Description of policy access to start enforcing MMAC policy [CHAR LIMIT=110]--> - <string name="policydesc_enforceMmac">Toggle MMAC policy enforcing or permissive mode.</string> <!-- The order of these is important, don't reorder without changing Contacts.java --> <skip /> <!-- Phone number types from android.provider.Contacts. This could be used when adding a new phone number for a contact, for example. --> diff --git a/telephony/java/android/telephony/SignalStrength.java b/telephony/java/android/telephony/SignalStrength.java index c063290..098a3a5 100644 --- a/telephony/java/android/telephony/SignalStrength.java +++ b/telephony/java/android/telephony/SignalStrength.java @@ -336,7 +336,7 @@ public class SignalStrength implements Parcelable { mCdmaEcio = (mCdmaEcio > 0) ? -mCdmaEcio : -160; mEvdoDbm = (mEvdoDbm > 0) ? -mEvdoDbm : -120; - mEvdoEcio = (mEvdoEcio > 0) ? -mEvdoEcio : -1; + mEvdoEcio = (mEvdoEcio >= 0) ? -mEvdoEcio : -1; mEvdoSnr = ((mEvdoSnr > 0) && (mEvdoSnr <= 8)) ? mEvdoSnr : -1; // TS 36.214 Physical Layer Section 5.1.3, TS 36.331 RRC @@ -455,9 +455,10 @@ public class SignalStrength implements Parcelable { int level; if (isGsm) { + boolean lteChecks = (getLteRsrp() == INVALID && getLteRsrq() == INVALID && getLteRssnr() == INVALID && getLteSignalStrenght() == 99); boolean oldRil = needsOldRilFeature("signalstrength"); level = getLteLevel(); - if (level == SIGNAL_STRENGTH_NONE_OR_UNKNOWN || oldRil) { + if ((level == SIGNAL_STRENGTH_NONE_OR_UNKNOWN && getGsmAsuLevel() != 99 && lteChecks) || oldRil) { level = getGsmLevel(); } } else { @@ -487,7 +488,8 @@ public class SignalStrength implements Parcelable { int asuLevel; if (isGsm) { boolean oldRil = needsOldRilFeature("signalstrength"); - if (getLteLevel() == SIGNAL_STRENGTH_NONE_OR_UNKNOWN || oldRil) { + boolean lteChecks = (getLteRsrp() == INVALID && getLteRsrq() == INVALID && getLteRssnr() == INVALID && getLteSignalStrenght() == 99); + if ((getLteLevel() == SIGNAL_STRENGTH_NONE_OR_UNKNOWN && getGsmAsuLevel() != 99 && lteChecks) || oldRil) { asuLevel = getGsmAsuLevel(); } else { asuLevel = getLteAsuLevel(); @@ -520,7 +522,8 @@ public class SignalStrength implements Parcelable { if(isGsm()) { boolean oldRil = needsOldRilFeature("signalstrength"); - if (getLteLevel() == SIGNAL_STRENGTH_NONE_OR_UNKNOWN || oldRil) { + boolean lteChecks = (getLteRsrp() == INVALID && getLteRsrq() == INVALID && getLteRssnr() == INVALID && getLteSignalStrenght() == 99); + if ((getLteLevel() == SIGNAL_STRENGTH_NONE_OR_UNKNOWN && getGsmAsuLevel() != 99 && lteChecks) || oldRil) { dBm = getGsmDbm(); } else { dBm = getLteDbm(); |
