Since these were combined into libhidlbase.
Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: Iba2cd20b8b20fac3e7564de6b853b475fd4ebd2a
Test: None
Bug: 122292884
[haggertk: This is only the libril side of this change. We quite
obviously do not carry our own librilutils]
Change-Id: Idb0d56749e41aa97a760dfed5246330041c3da3a
Include MCC/MNC provided by legacy (versions 14 and older) vendor RIL
implementations as part of data registration state, in data registration
state reported to clients of the radio HAL service.
Bug: 119904357
Test: local build and did the local test on Marlin device,
the mcc/mnc value are correct (not -1 and empty string value).
[haggertk: This purposely omits updating the numStrings check in
getDataRegistrationStateResponse(), given that we purposely changed
that check in our libril]
Change-Id: I5a26939402b86d889133e16f3508ab76b8bedddc
RIL_SignalStrength_v10 not support gw.timingAdvance. But default 0 will
be taken as valid value. Set to INT_MAX as invalid value.
Bug: 123096279
Test: Build pass. Correct value for GW timingAdvance in radio log.
01-22 16:22:41.150 1779 1910 V RILJ : [UNSL]< UNSOL_SIGNAL_STRENGTH
SignalStrength:{ mGsm=CellSignalStrengthGsm: rssi=2147483647 ber=99 mTa=2147483647
[haggertk: Upstream commit updated to patch both
convertRilSignalStrengthToHalV8 and convertRilSignalStrengthToHalV10,
as the upstream libril only has a single convertRilSignalStrengthToHal]
Change-Id: I37cc2c246d045a07ffad863fb0cc852d8184c3ca
The index value for GSM/CDMA/IMS application shall be -1 if there is no
relevant application according to the comment written for CardStatus
structure in radio/types.hal, so it shall be initialized to -1.
Bug: 63967442
Test: Confirm that the index values are correctly initialized.
Change-Id: I692e9049145d0f0c3c57879c25d0697879c76b39
Use strlcpy instead of strncpy when copying strings to make sure
the copy is always null-terminated.
Bug:73436938
[haggertk: Our original CAF base had the actual "replace strncpy
with strlcpy" part of this change already. This just adds the
expected sendErrorResponse()]
Change-Id: I12d4883c22a180e2136dc8c85bc0394ddcdcb706
Legacy RIL uses an integer to encode the number of
MNC digits. Because the size is not fixed, leading
zeroes result in ambiguity in the length of the mnc.
This change adds support for passing the number of
encoded digits in the most-significant nibble of the
mnc integer (which is only 10 bits). Thus, on any
implementation that is 16-bits or wider, the mnc info
will be properly encoded and decoded with the
correctly-sized string.
Bug: 111971808
Test: ril::util::mnc::test
Change-Id: I24aeba5328a63f80b0d6b25b068bd19160191dff
Tuned the Binder buffer to 500KB as it is not
going to use the default allocated 1MB which
saves RAM for 32 bit processors.
Change-Id: Ifea2720f8e853643a37912c3459e923168677b1e
CRs-Fixed: 2283052
[haggertk: This is just the libril side up the upstream change]
Use strlcpy instead of strncpy when copying strings to make sure
the copy is always null-terminated.
Change-Id: I12d4883c22a180e2136dc8c85bc0394ddcdcb706
OEM hook is deprecated, so adding a way to disable it to
this radio implementation.
Bug: 75322118
Test: boot device w/ DISABLE_RILD_OEM_HOOK works, lshal
Change-Id: Ie7ade48476d2c330df608e9cc8dab805f84dd81d
If cached value for NITZ is used, the time at which it was
received needs to be cached too.
Test: Basic telephony sanity
Bug: 72283604
Change-Id: I8f443171c4583e3eab9be7973d7714ae6c7ab6af
The payload of a SAP request could be freed twice in certain scenarios.
Also, add null-checks to prevent dereferencing of null pointers.
Bug: 64729356
Test: Manually run the fuzz tests and ensure that there is no crash in
rild
Change-Id: Ib7ae269fa5297d6acea267337b220b8858c82bae
Re-add constant for function pointer table to
RIL_RadioFunctions. Const was accidentally removed
during a warnings cleanup.
Bug: 64231560
Test: compilation
Change-Id: I93675980c51d9162f624495d12fe3c97f1da8031
clang is the default compiler since Android nougat
Change-Id: I0555fa8067352fd43b47aabe80be1224597da17e
Signed-off-by: Lennart Wieboldt <lennart.1997@gmx.de>
Upstream change I732234a22328a1bfcb603bb020547f543b6fd766 makes
RIL_UNSOL_DC_RT_INFO_CHANGED's responseFunction() NULL, without
protecting against it in RIL_onUnsolicitedResponse(), thus crash-
ing at least hammerhead's RIL stack upon mobile data connection.
https://android-review.googlesource.com/#/c/platform/hardware/ril/+/345950/
Change-Id: I6567019cb6daf6492a29e04cc9872e69b2ba456d
Signed-off-by: D. Andrei Măceș <Andrei.Maces@alumni.nd.edu>
(cherry picked from commit e73eafff8695ab28201acbc03a362d5b177047aa)
* All of the libsec-ril*.so libraries reference these symbols, but
Google finally dropped the non-inlined versions from libcutils with
Android 8.0. This could be handled with shims in numerous device
trees, but shim semantics and implementation aren't exactly stable
and we can handle it more cleanly here in one place.
* See LineageOS/android_system_core@103e8f560
Change-Id: I787372b739f3ace0d9cbbc33e4bffafa6876665e
* While msm8974 is not 64 bit, certain users of this libril will be
* A previous revision of this libril had 16 bytes of padding in this
struct for 64-bit platforms (due to word size and struct alignment),
but a change by me to use a long instead of a pointer and an int
broke this padding for 64-bit platforms because a long is still
just 8 bytes on 64-bit platforms, where 16 bytes is necessary
* Use two pointers as padding instead to make 64-bit great again
Change-Id: If599bdb625f7a45e083f5b30df512d12810be79b
* 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
* Sometimes, the modem is sending 1-2 extra fields with
the country mcc, which confuses ServiceStateTracker
* Drop the extra data here, instead of in our RIL class
[haggertk]: Forward port to ril-caf on lineage-15.
Change-Id: Ifbec67bb0dac271226bd8b5471deaf6a2ef33f2b
* Checking numInts and numStrings for strict equality when
we're not looping is dumb, because Samsung is notorious
for sending extra information in their RIL
* Check if there's *enough* data rather than the *exact amount*
to fix a bunch of invalid response errors
Change-Id: I14bc37240e5760b4629fcb74b64f25ad95d4fdfc
* For search, the number of strings returned for
RIL_REQUEST_QUERY_AVAILABLE_NETWORKS should be defined in the system
prop ro.ril.telephony.qan_resp_strings
Change-Id: Ie5bb8ba80c5ac93b7502da3b1bb3d2b4404ecd5e
* Samsung added an int to the end of the RIL_SMS_Response
struct in some of the variants (like vzw) but not all
* The presence of this field was discovered by examining
the stock RIL.java, which conditionally read an extra
int from the parcel, based on the device specific
CscFeature_RIL_SmsErrorClassRetry feature
* This causes SMS messages to show as "failed to send"
in the app, when they actually suceeded in sending
* Allow Samsung's custom struct and AOSP's to fix it
* Forward port to ril-caf on lineage-15.1
Change-Id: I6b3e545c2c42ab2de2ac11e93dfdf9546248080a
***** SIGNAL STRENGTH HACKS NOT PORTED YET *****
[javelinanddart]: Redo this code from 14.1 to include
the proper RIL_Call fixes, no Samsung unsol/request
handling as it was unnecessary, and a extensible way
to remap RIL unsols if necessary for the device
Change-Id: I59bad9925d141e6cefbc24d4eefdc0c79017852a