msm8974-common: libril: Add hacks for spliting of index

* This is based on how it was done in cm-14.1, but redone
  because the old code completely ignored signedness
* Samsung, in their stock RIL.java, reads index as an int,
  sets the first 8 bits to index, the next 8 bits to call_id,
  and ignores the upper 16 bytes of the int parcelled up
* This emulates that behavior here, except it only sends the
  first 8 bits so that AOSP's RIL.java doesn't get confused

Change-Id: I5c78447fdef7d5fd7fc39addb970300ee1188cd1
This commit is contained in:
Paul Keith 2018-02-08 03:40:20 +01:00
parent dc5d57cf0a
commit 71900d444e

View File

@ -421,7 +421,10 @@ typedef struct {
typedef struct { typedef struct {
RIL_CallState state; RIL_CallState state;
int index; /* Connection Index for use with, eg, AT+CHLD */ unsigned char index; /* Connection Index for use with, eg, AT+CHLD */
unsigned char call_id; /* Samsung field */
unsigned char pad; /* Unsigned gap padding */
char pad1; /* Signed gap padding */
int toa; /* type of address, eg 145 = intl */ int toa; /* type of address, eg 145 = intl */
char isMpty; /* nonzero if is mpty call */ char isMpty; /* nonzero if is mpty call */
char isMT; /* nonzero if call is mobile terminated */ char isMT; /* nonzero if call is mobile terminated */