diff options
author | Sungmin Choi <sungmin.choi@lge.com> | 2015-07-01 16:22:46 +0900 |
---|---|---|
committer | Chao Liu <yjl@google.com> | 2015-07-06 12:52:00 -0700 |
commit | a408c25e93fba444995af1ec8070802fb7662495 (patch) | |
tree | 965f383c6bed2c1ef3c8a9f2672a6a0155455959 | |
parent | 548a81ee5d5d2cb58925ce62564ac9dfbb90431c (diff) | |
download | android_hardware_ril-a408c25e93fba444995af1ec8070802fb7662495.tar.gz android_hardware_ril-a408c25e93fba444995af1ec8070802fb7662495.tar.bz2 android_hardware_ril-a408c25e93fba444995af1ec8070802fb7662495.zip |
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
-rw-r--r-- | libril/ril.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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; |