From a408c25e93fba444995af1ec8070802fb7662495 Mon Sep 17 00:00:00 2001 From: Sungmin Choi Date: Wed, 1 Jul 2015 16:22:46 +0900 Subject: [PATCH] Support backward compatibility of new LAST_CALL_FAIL_CAUSE Previous fail cause returns integer array. New fail cuase returns integer and string. RIL framework uses just integer as causeCode. To support backward compatibility, returns integer instead of integer array as causeCode. Bug: 22204818 Change-Id: I77ca55d99a44d129cf401743c34c03754f38dde2 --- libril/ril.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libril/ril.cpp b/libril/ril.cpp index a27495e..fc4ea51 100644 --- a/libril/ril.cpp +++ b/libril/ril.cpp @@ -2181,7 +2181,12 @@ static int responseFailCause(Parcel &p, void *response, size_t responselen) { } if (responselen == sizeof(int)) { - return responseInts(p, response, responselen); + startResponse; + int *p_int = (int *) response; + appendPrintBuf("%s%d,", printBuf, p_int[0]); + p.writeInt32(p_int[0]); + removeLastChar; + closeResponse; } else if (responselen == sizeof(RIL_LastCallFailCauseInfo)) { startResponse; RIL_LastCallFailCauseInfo *p_fail_cause_info = (RIL_LastCallFailCauseInfo *) response; -- 2.11.0