diff options
| author | Paul Keith <javelinanddart@gmail.com> | 2018-12-30 10:03:24 -0600 |
|---|---|---|
| committer | Ćukasz Patron <priv.luk@gmail.com> | 2018-12-30 20:48:39 +0100 |
| commit | c5da51a3a497965f0e5c647ffc72b2df78a73818 (patch) | |
| tree | 5d0cf9f240d3247cf8bce515eeeffd3b54a85746 | |
| parent | 000358bbafb88b7419d388b7450123c2dc48348d (diff) | |
kirin970-common: ril: Actually query CarrierConfig thresholds for signal strength
* CarrierConfigManager.getDefaultConfig() is great as a fallback, but it
just returns the OS default settings rather than the settings for the
carrier config of the default subscription ID on the phone
* In order to actually query the thresholds per-carrier, try to get the
config per-subscription ID via the CarrierConfigManager service
* Cleanup an unused import while we're at it
Change-Id: I8ab979456219beb0da20033ae9ca0ebddcf0256d
| -rw-r--r-- | ril/src/com/qualcomm/qti/internal/telephony/HwRIL.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/ril/src/com/qualcomm/qti/internal/telephony/HwRIL.java b/ril/src/com/qualcomm/qti/internal/telephony/HwRIL.java index 96fc856..f5852a3 100644 --- a/ril/src/com/qualcomm/qti/internal/telephony/HwRIL.java +++ b/ril/src/com/qualcomm/qti/internal/telephony/HwRIL.java @@ -17,9 +17,9 @@ package com.qualcomm.qti.internal.telephony; import android.content.Context; -import android.content.res.Resources; import android.hardware.radio.V1_0.RadioResponseInfo; import android.os.Message; +import android.os.PersistableBundle; import android.os.Registrant; import android.os.SystemProperties; import android.telephony.CarrierConfigManager; @@ -155,6 +155,16 @@ public class HwRIL extends RIL { int[] threshRsrp = CarrierConfigManager.getDefaultConfig().getIntArray( CarrierConfigManager.KEY_LTE_RSRP_THRESHOLDS_INT_ARRAY); + CarrierConfigManager ccm = (CarrierConfigManager) + ril.mContext.getSystemService(Context.CARRIER_CONFIG_SERVICE); + if (ccm != null) { + PersistableBundle cc = ccm.getConfigForSubId(subId); + if (cc != null) { + threshRsrp = cc.getIntArray( + CarrierConfigManager.KEY_LTE_RSRP_THRESHOLDS_INT_ARRAY); + } + } + if (sSignalCust != null && threshRsrp.length == 4) { switch (radioTech) { case NETWORK_TYPE_LTE_CA: |
