diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2015-10-22 16:20:51 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2015-10-22 16:23:34 +0200 |
commit | 7f60587448e1a8c2ae969dca17a651245e84def1 (patch) | |
tree | 60778b305cdeb8e20c4c369aad34740c7732e44b | |
parent | 84093984f3e50cfac5e0b66a1adc05870184b0ea (diff) | |
download | android_hardware_samsung-7f60587448e1a8c2ae969dca17a651245e84def1.tar.gz android_hardware_samsung-7f60587448e1a8c2ae969dca17a651245e84def1.tar.bz2 android_hardware_samsung-7f60587448e1a8c2ae969dca17a651245e84def1.zip |
ril: Fix network operator search
Newer RIL versions have more QAN elements so we need a way
to adjust them to the correct value.
This needs to be set to same value as mQANElements in the RIL Telephony
class.
Change-Id: Icfad9c0acf1b95f63c232b6c4c49ed52bd4e3aa4
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r-- | ril/libril/ril.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ril/libril/ril.cpp b/ril/libril/ril.cpp index 890e738..3275332 100644 --- a/ril/libril/ril.cpp +++ b/ril/libril/ril.cpp @@ -67,6 +67,7 @@ namespace android { #define PROPERTY_RIL_IMPL "gsm.version.ril-impl" +#define PROPERTY_QAN_ELEMENTS "ro.ril.qanelements" // match with constant in RIL.java #define MAX_COMMAND_BYTES (8 * 1024) @@ -2297,7 +2298,14 @@ static int responseStrings(Parcel &p, void *response, size_t responselen, bool n numStrings = responselen / sizeof(char *); if (network_search) { - p.writeInt32 ((numStrings / 5) * 4); + int32_t QANElements; + + /* + * This needs to be set to same value as mQANElements in the RIL + * Telephony class. + */ + QANElements = property_get_int32(PROPERTY_QAN_ELEMENTS, 4); + p.writeInt32 ((numStrings / 5) * QANElements); } else { p.writeInt32 (numStrings); } |