Exynos4 devices send two ints as a response to this request,
causing responseFailCause to think the result is a LastCallFailCause struct,
which it then tries to treat as a Java UTF-8 encoded string, causing a
crash.
Work around this by forcing responseInts (the original behaviour)
on Exynos4 devices.
Change-Id: Ied14948db3049066ffc760b6d3df09b4cefa2df0
* Adjusted whitespace to minimize diffs
* Plugged memory leaks
* Fix use-after-free
* Use calloc instead of alloca
* Reworked the Samsung request/response code to be
more readable
Change-Id: Ifd07b525fc84e8a3fca584d4d412785974ca3482
* These workarounds were introduced before http://review.cyanogenmod.org/#/c/159520/
and are no longer needed because the framework now has dynamic QAN element support.
Setting the ro.ril.telephony.mqanelements to a proper value should fix the operator
search on all the devices and these workarounds are no longer required.
* http://review.cyanogenmod.org/#/c/100398/ discards every 5th QAN element which breaks
devices with libsec-ril that returns more than 5 QAN elements. zeroflte and noblelte
return 6 QAN elements and the 5th element was being discarded instead of 6th.
* The code assumes 5 QAN elements per operator which doesn't hold true for all devices.
* In case of devices with 6 QAN elements, the size of the string array was a multiple
of 6, but since we are discarding the 5th element, the contents of the string pertaining
to each operator is a multiple of 5 following by trailing null strings in the array,
which caused issues in the framework while trying to read the strings, since we are
expecting 6 strings per operator and with a discarded string, we only receive 5.
Thanks to Javi Ferrer for diagnosing the issue on zeroflte
Change-Id: I2e99291f3438998a253755a19a063d15a19d63e0
The difference between two libs are very minor,
includes one hack around ucsInfo and the logic
to adjust signal strength. Besides that other
diffs are some logs.
The new version of code is minaly based on xmm6262,
especially the logic to adjust singal strength.
Merge them to easy maintain the code.
Change-Id: I76390541d017576591860c8701bb9763c460b8be
(cherry picked from commit 56b8dcfa3094f93698dda9f6731fa845f00ef287)