From 71fa17cf5342830d5882673cdb1b7a226257cf0d Mon Sep 17 00:00:00 2001 From: Ricardo Cerqueira Date: Sat, 15 Aug 2015 00:03:52 +0100 Subject: SignalStrength: Allow for custom signal buckets in LTE STRICT levels are too low, LENIENT levels are too high. Let us use something in between... Change-Id: I134774ed471e1805eac95cfbf8af957378fd8293 --- telephony/java/android/telephony/SignalStrength.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'telephony') diff --git a/telephony/java/android/telephony/SignalStrength.java b/telephony/java/android/telephony/SignalStrength.java index c941a28..1bb7b3a 100644 --- a/telephony/java/android/telephony/SignalStrength.java +++ b/telephony/java/android/telephony/SignalStrength.java @@ -53,6 +53,7 @@ public class SignalStrength implements Parcelable { public static final int INVALID = 0x7FFFFFFF; private static final int RSRP_THRESH_TYPE_STRICT = 0; + private static final int RSRP_THRESH_TYPE_CUSTOM = 2; private static final int[] RSRP_THRESH_STRICT = new int[] {-140, -115, -105, -95, -85, -44}; private static final int[] RSRP_THRESH_LENIENT = new int[] {-140, -128, -118, -108, -98, -44}; @@ -811,6 +812,9 @@ public class SignalStrength implements Parcelable { int[] threshRsrp; if (rsrpThreshType == RSRP_THRESH_TYPE_STRICT) { threshRsrp = RSRP_THRESH_STRICT; + } else if (rsrpThreshType == RSRP_THRESH_TYPE_CUSTOM) { + threshRsrp = Resources.getSystem().getIntArray(com.android.internal.R.array. + config_LTE_RSRP_custom_levels); } else { threshRsrp = RSRP_THRESH_LENIENT; } -- cgit v1.1