diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2015-10-22 16:20:51 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2015-10-23 16:02:55 +0200 |
commit | d806de9248f4be87115416caee5af242594cf369 (patch) | |
tree | 3d4925d3780e9df34e4e57f7e41661efa92ee652 /ril | |
parent | 2f04f843664bf0b395d40f01456cbf72ab341148 (diff) | |
download | android_hardware_samsung-d806de9248f4be87115416caee5af242594cf369.tar.gz android_hardware_samsung-d806de9248f4be87115416caee5af242594cf369.tar.bz2 android_hardware_samsung-d806de9248f4be87115416caee5af242594cf369.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>
Diffstat (limited to 'ril')
-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 e2a1c8b..3217014 100644 --- a/ril/libril/ril.cpp +++ b/ril/libril/ril.cpp @@ -68,6 +68,7 @@ namespace android { #define ANDROID_WAKE_LOCK_USECS 200000 #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) @@ -2307,7 +2308,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); } |