Commit graph

88 commits

Author SHA1 Message Date
Sukanya Rajkhowa
70ecc09feb Add support for cdma dynamic address length.
Get the address,sub address,Bearer with dynamic length in the data parcel,
to avoid the OutOfBoundsException with the MAX macro.

BUG=26856156

Change-Id: I1d7437143c1369d77791136b68e06088acd72937
2016-10-24 01:43:13 -07:00
Sanket Padawe
6daeeef766 Fix build failure which occurs after setting macro RILC_LOG.
Bug: 29214796
Change-Id: I5f74981a59344078f900ecf769cc962b1416d5fd
2016-10-12 13:01:23 -07:00
Sooraj Sasindran
cfef9bd422 RIL: release unsol wakelock
Make sure to release unsol wakelock

BUG=28635279
Change-Id: I4bdf0e7b35df4e6aa077b062ab359c6938ce8292
2016-10-12 13:01:10 -07:00
Ajay Nambi
0af7d1c98c Ril Error codes: Voice related messages
This change adds new error codes for messages
related to voice

Bug: 27038563
Change-Id: I61bcc853f8046e6baf6c8000029f7af0f3f894f0
2016-10-12 13:00:58 -07:00
Ajay Nambi
6965975b2a New error codes for SMS/other messages
This gerrit adds error codes for messages related
to SMS and set_mute, get_mute requests

Bug: 27038563
Change-Id: I4991e4a38c81501c39e91cfd5df90d8288f542ad
2016-10-12 13:00:43 -07:00
twen.chang
7dd377ce80 Add RIL Error code list
BUG: 27589497

Change-Id: I9cc8c12364676c3c56dbee57fdc01cf055460816
2016-10-12 13:00:31 -07:00
Sanket Padawe
487784599d Enable integer sanitization in libril.
Bug: 27486276
Change-Id: I5d440099120567f1ecedb898039b5627346c7089
2016-10-12 13:00:17 -07:00
Sanket Padawe
df3dabe4f6 Fixing security vulnerabilities in ril.cpp
Bug: 26522805
Change-Id: I8fa19a202b3ebe13dc617b417218b4f40fa8a702
2016-10-12 13:00:04 -07:00
Sanket Padawe
db5d1e07ad Add OEM specific error code space which can by used to
replace Generic errors.

Bug: 27038563
Change-Id: I4052505ed684067cb9145d165f0e335ad52ed404
2016-10-12 12:59:53 -07:00
Sanket Padawe
6049dec1db Convert newly added error code to string values in ril.cpp.
Bug: 23216719
Change-Id: Ie2202124cb460872a9f5c406e8f1ae94465d9d0b
2016-10-12 12:59:39 -07:00
Sanket Padawe
9f97208a88 Use different response type for unsolicited mesg requiring
wakelock.

+ New type is added as ack from RIL java should be sent only for unsolicited mesgs
which hold wakelock in ril.cpp.

Bug: 22127517

Change-Id: Ib7e920d168ab92665283f80476bad3f5ede033e4
2016-10-12 12:59:28 -07:00
Sanket Padawe
a7c043d6f0 Improve wakelock symantics in RIL.
Bug: 22127517
Change-Id: I13fce25c8c6b27987e576b29a2ca5cd813f5b06f
2016-10-12 12:56:50 -07:00
Sanket Padawe
a79128ab25 Added fields to CELL_INFO_LIST.
Gsm: ta, arfcn, bsic
Wcdma: uarfcn
Lte: earfcn

Bug: 23528586
Change-Id: Iaf7bfaac96bda92d980c566878b9fe481a6d2c21
2016-10-12 12:56:38 -07:00
Sanket Padawe
201aca3682 Use SimRefreshResponse struct in RIL Versions greater than 7
Modify condition to use SimRefreshResponse struct in
all RIL Versions greater than 7.

BUG=21075857

Change-Id: Ifde00434bfcaecf3b4c32392fc4964fe3b43f6b5
2016-10-12 12:56:19 -07:00
Ajay Nambi
e63b4f6986 Add WRITE_SMS_TO_SIM and UNSOL_SUPP_SVC_NOTIFICATION
Add WRITE_SMS_TO_SIM and UNSOL_SUPP_SVC_NOTIFICATION in
requestToString method.

Change-Id: I323f276d4048b168b27669a0aebb58cd9decf9bd
2016-10-12 12:56:03 -07:00
Sanket Padawe
9343e87d59 Improve RIL versioning.
+ Added documentation for new RIL versioning format.
+ Changes associated to new RIl versioning format.

Bug: 25779475
Change-Id: I4e53c6125995064b8ac0cdfc9376ef2cefe69ec8
2016-10-12 12:54:36 -07:00
Dheeraj CVR
48d3f723a5 libril: revert network operator string handling
* 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
2016-10-12 12:54:15 -07:00
Colin Cross
b9e88c8b54 Properly export ril_ex.h
Copying headers makes fixing compile errors hard, and breaks dependency
restrictions.  Move ril_ex.h to an exported include directory instead of
copying it.

Bug: 18903857
Change-Id: I4b59a01e442db0d3198def69a5a5ff17b2a41c66
2016-09-12 13:49:06 -07:00
Hyejin
e942c33156 Fix build error with RILC_LOG on
Change-Id: Ib724e6db3c7fb4e46e7d62706cf53cc944faf797
2016-09-12 13:47:25 -07:00
Ajay Nambi
323c882404 Fix for rild crash becasue of buffer overflow
There is a buffer overflow which causing rild crash. For
appendPrintBuf, "sprintf" is replaced with "snprintf" for
the safe copy operation.

Bug:23289936
Change-Id: I25430a5c6f2a8b19a3271235323499b6ee802746
2016-09-11 01:59:53 +02:00
Christopher N. Hesse
022eadd458 libril: Export headers
Change-Id: Ie61d8eb47f19fd825713357a538754f05b89d11a
2016-09-11 01:57:52 +02:00
Christopher N. Hesse
f9e2a71f89 libril: Remove unused include
If someone needs this, it has to be fixed to read
TARGET_OUT_HEADERS (notice the extra 's').
We are only getting away with it right now because M ignores empty
include paths, but N will barf on this.

Change-Id: I7f010398a40ebaf6811a58a121590944445fbcba
2016-07-30 22:07:11 +02:00
Christopher N. Hesse
fb599edb50 ril: Restore alphabetical order for modem barrier
Change-Id: Iae8f7cb6500c16d5b88d8e60d4e7e97ee6539a19
2016-04-15 18:54:31 +02:00
messi2050
06ba105272 libril: add initial support for tss310 modem
- j7elte use tss310

Change-Id: I9bea333de037d4d1c8a9bc2111a3455f56b61c9a
Signed-off-by: messi2050 <mino_forever@yahoo.com>
2016-04-14 22:22:53 +05:30
Andreas Schneider
6d6daf94bc libril: Use a board flag for video call field
xmm7260 on SLTE doesn't have this flag anymore. Devices which need it
should specify the flag.

Change-Id: I166f579274667919756d3bb90e0b182165525975
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-04-11 20:50:51 +02:00
Christopher N. Hesse
5608dcba4c libril: Remove RIL_REQUEST_DIAL_EMERGENCY
This is not part of the standard API, so remove it.
Samsung devices almost always use the RIL_REQUEST_DIAL_EMERGENCY_CALL
hook, so devices should implement that in their specific RIL subclass.

Change-Id: I2cf9eee00a4b5b02e998d8efcbefa87a9ca7b7b4
2016-03-29 09:49:50 -07:00
Andreas Blaesius
d82d1d66d0 ril: fix libril if we don't overwrite the header in our device tree
Change-Id: Ic580b80b28c738828f4c19aeb54421d9f98c7d40
2016-03-29 00:53:08 +02:00
Christopher N. Hesse
c694ff0dac libril: Move vendor commands header
Devices can now override this header in the device tree.

Change-Id: I6e3814342ee22513e556ba92264b0c2651722af3
2016-03-28 13:40:00 -07:00
Christopher N. Hesse
57eaccad6b libsecril-client: Use the correct incall audio paths
The modems used in recent Samsung devices use different paths
than older devices apparently.

These values were extracted from hexdumps at the correct data
positions from the device specific libsecril-client.so blobs.

Change-Id: I0547cb1de40130843fee3f1310e1e6aed95195c7
2016-03-08 15:50:23 +01:00
Christopher N. Hesse
621e63ea3e libril: Make ST-E Thor M7450 and Intel XMM7260 next gen modems as well
Change-Id: I7cacda8cdaf9e285688c06c42ccf6629efc2af9d
2016-03-06 14:18:06 +01:00
Pavel Zhamaitsiak
6eec81990d Fix memory leaks and use of uninitialized pointers.
Bug: 23187886
Change-Id: Ic15a02a902b591362b5c52c20afabe511fb0bbb7
2016-02-22 21:41:15 +01:00
Simon Shields
1f58ecac5e ril: fix $(filter ...) derp
Change-Id: Ic2be936268701bd5f40056e5993ef35f5bd3969d
2016-02-17 21:10:26 +11:00
Brandon McAnsh
12e3f2684a ril: Group next gen Samsung modem's in same CFLAG
* Sprint variant of zeroflte uses mdm9x35 instead of ss333

Change-Id: Ifa7c1ea51dd57ea4fbeb41560c3a7c4fa65a85c8
Signed-off-by: Brandon McAnsh <brandon.mcansh@gmail.com>
2016-02-15 07:11:03 -08:00
Say
d1052770c5 libril: add initial support for ss333 modem
zeroflte uses ss333

Change-Id: If3c9d34ea31c06ce23bd8d0236a9f2ddbab3ddc4
Signed-off-by: Say <sktjdgns1189@naver.com>
2016-02-09 16:46:09 -05:00
Android-Andi
40afadb663 libsecril-client: spell AUDIO correctly
Change-Id: I10c3a4bdeb71685049f641018d7a5ef593f999a6
2016-01-07 11:53:10 +01:00
Christopher N. Hesse
b8400a23f5 ril: Unify network elements property check
frameworks/opt/telephony is using a slightly different named property
to check for the QANElements count.
Align the check here to the frameworks one to avoid redundancies.

Change-Id: I22f7cf070953026798d0ae4759e3c9845dba767c
2015-12-12 11:49:45 +01:00
forkbomb
e0568e128b libril: fix compilation with debugging enabled
Change-Id: Iac159175a23b2810e56c38fb82cae58c20dddb8e
2015-11-23 18:57:25 +11:00
Andreas Schneider
822b70bd53 ril: Use debug log level and not error
Change-Id: I8f017cb181967790260183fd06d1226d303bd2b8
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-10-23 16:03:40 +02:00
Andreas Schneider
d806de9248 ril: Fix network operator search
Newer RIL versions have more QAN elements so we need a way
to adjust them to the correct value.

This needs to be set to same value as mQANElements in the RIL Telephony
class.

Change-Id: Icfad9c0acf1b95f63c232b6c4c49ed52bd4e3aa4
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-10-23 16:02:55 +02:00
Nathan Harold
d6306fa7d2 Modify RIL Unsol Message Wakelock to 200ms
bug: 22456054

Change-Id: Id41e001f98b455bec5f004438f5d8498b17aaf2d
2015-10-19 12:16:41 -07:00
Prerepa Viswanadham
8e75559929 Modem activity info
Change-Id: Iab8fbdeae0867c6e9cb9027b08317b1b5a2c9dfc
2015-10-19 12:16:41 -07:00
Chih-Hung Hsieh
e7ed8c8130 Add missing extern "C" declaration.
BUG: 20891299
Change-Id: Iedfd2e8e5bd32014f011352898763bcc0887b6b9
2015-10-19 12:16:41 -07:00
Robert Greenwalt
bc29c43988 Remove verbose logs
Several things are redundent except for the fact
messages are reaching rilc.  Left in in case we need to debug
the layer, but blocked out with #if VDBG

Reduces startup logging to radio buffer by 20%

Change-Id: I95099457ea365ee108e7da8e1f81434531b6b9f0
2015-10-19 12:16:41 -07:00
fenglu
9bdede058f Link Capacity Estimation - RIL support
Change-Id: I9c4d4901d823d719be2b8bdec64f08eda342de53
2015-10-19 12:16:41 -07:00
Vinit Deshpande
5257b14d60 Fix build issues after the merge
Change-Id: Ia856311187a0b2168cb859bd8b2300ff59df6569
2015-10-19 12:16:41 -07:00
Mark Salyzyn
961fd02e9b libril: tag RILC messages to radio log
Change-Id: Ia3234aa933249eb9f383c7e45c3f67b3c0c50634
2015-10-19 12:16:41 -07:00
Dheeraj Shetty
cc231015f2 Introduction of the new SAP-UIM socket
Added new socket connection for communication between the SAP module
in Telephony and User Identity Module with DSDA support.

New classes added are:

RilSocket
---------
Base class(virtual) for any type of socket. Has listen
and commands callbacks similar to that of the existing
telephony->rild socket.

RilSapSocket
------------
Derived class for socket for communication between BT SAP
and the sim module in the modem. It initialises
socket, calls Sap_Uim_Init to get the handles and
starts the socket thread.

rilSocketQueue
--------------
Queue for managing socket requests.

Change-Id: I8828173941d6ae76f1f9cc0d567efaf41a77d175
2015-10-19 12:16:41 -07:00
Nanik Tolaram
6187ef8378 Removal of dead code and adding log messages to make it easier
for debugging

- Add more logging using ALOGD(..) for function dispatchSmsWrite,
dispatchDial, dispatchSIM_IO, dispatchSIM_APDU, dispatchCallForward,
dispatchRaw and dispatchCdmaSmsAck. To make it easier for debugging.

- Remove commented log message inside wakeTimeoutCallback () function
and remove the else clause as it's dead not used for anything.

- Modify log message inside removeFromList and removeWatch using +
and - to make it consistent with the other log message.

Change-Id: Ife0212e6a4724d8b06a1dd767484bfdf98b8e1a6
Signed-off-by: Nanik Tolaram <nanikjava@gmail.com>
2015-10-19 12:16:41 -07:00
Elliott Hughes
4c4ae39dec We have POSIX clocks.
We're probably not running the RIL on a Mac.

Change-Id: Ib6be56cd26d67e2b72b559cb364b1e34ab613016
2015-10-19 12:16:41 -07:00
Andreas Schneider
84093984f3 ril: Support new sound manger RIL responses
New version of Samsung RIL do not use RIL_UNSOL_WB_AMR_STATE anymore.
There is a Sound Manager (SND-MGR) which has its own response base
(20000). So to be able to register a handler for

RIL_UNSOL_SNDMGR_WB_AMR_REPORT

with libsecril-client we need to know about it. This allows us to
register a callback in the audio HAL to turn WB support on.

WB_AMR_REPORT report 0x00, 0x01 or 0x02. I guess 0x01 is WB ON and
0x02 is WB + NS ON.

Change-Id: I403c86781551fc3b08354187322e8443402d56f6
2015-09-16 16:54:08 +02:00