summaryrefslogtreecommitdiffstats
path: root/ril
diff options
context:
space:
mode:
authorSimon Shields <simon@lineageos.org>2017-02-20 00:36:42 +1100
committerSimon Shields <simon@lineageos.org>2017-02-19 13:39:36 +0000
commita9d8bf6af4035e93ca98e865491cb7f013ee0cff (patch)
tree50380e7fc7e3e58ed0fac79898bb887df73862da /ril
parentdd8a36941b5d2a85911fab8409be8a0928275ae1 (diff)
downloadandroid_hardware_samsung-a9d8bf6af4035e93ca98e865491cb7f013ee0cff.tar.gz
android_hardware_samsung-a9d8bf6af4035e93ca98e865491cb7f013ee0cff.tar.bz2
android_hardware_samsung-a9d8bf6af4035e93ca98e865491cb7f013ee0cff.zip
libril: use responseInts for LAST_CALL_FAIL_CAUSE on Exynos4
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
Diffstat (limited to 'ril')
-rw-r--r--ril/libril/ril_commands.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/ril/libril/ril_commands.h b/ril/libril/ril_commands.h
index 8d02c39..bdb179a 100644
--- a/ril/libril/ril_commands.h
+++ b/ril/libril/ril_commands.h
@@ -32,7 +32,15 @@
{RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE, dispatchVoid, responseVoid},
{RIL_REQUEST_CONFERENCE, dispatchVoid, responseVoid},
{RIL_REQUEST_UDUB, dispatchVoid, responseVoid},
+#ifndef EXYNOS4_ENHANCEMENTS
{RIL_REQUEST_LAST_CALL_FAIL_CAUSE, dispatchVoid, responseFailCause},
+#else
+ /*
+ * Exynos4 devices send an extra int for LAST_CALL_FAIL_CAUSE
+ * which causes responseFailCause to think it's a string and crash.
+ */
+ {RIL_REQUEST_LAST_CALL_FAIL_CAUSE, dispatchVoid, responseInts},
+#endif
{RIL_REQUEST_SIGNAL_STRENGTH, dispatchVoid, responseRilSignalStrength},
{RIL_REQUEST_VOICE_REGISTRATION_STATE, dispatchVoid, responseStrings},
{RIL_REQUEST_DATA_REGISTRATION_STATE, dispatchVoid, responseStrings},