History log of /hardware/ril/reference-ril/reference-ril.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4818c04ca31a6244cc2ab26724f45958a245b0c9 19-Mar-2018 bohu <bohu@google.com> reference-ril: fix asan error

BUG: 74981776

Change-Id: I9e321fd6b34fe2a37a5e22668f7070f6da7d9f46
/hardware/ril/reference-ril/reference-ril.c
0c6d7438566d42bf07d1fcf7bf3460ce406f0ac2 16-Mar-2018 Bo Hu <bohu@google.com> Revert "Emulator: add CSIM authentication support"

This reverts commit 1a0999f5359912a5f8b43ecb242b6fcb1de6c769.

Reason for revert: regression

Change-Id: Iaccff16f66132418e744531db117c7d6af21a90a
BUG: 75284151
/hardware/ril/reference-ril/reference-ril.c
1a0999f5359912a5f8b43ecb242b6fcb1de6c769 04-May-2017 bohu <bohu@google.com> Emulator: add CSIM authentication support

BUG: 72886046
BUG: 37719621
BUG: 70507162

Test: run cts -m CtsCarrierApiTestCases -t
android.carrierapi.cts.CarrierApiTest#testGetIccAuthentication

Change-Id: I4438eab706ba4c0bd360600a1eb7322b186c9e82
Signed-off-by: Roman Kiryanov <rkir@google.com>
/hardware/ril/reference-ril/reference-ril.c
2d9f8af0f6334ded55c7850e5d12d480881fcc8f 02-May-2017 bohu <bohu@google.com> Emulator: use RIL_CellInfo_v12

RIL_CellInfo is deprecated and it fails CTS test

BUG: 72886046
Test: run cts -m CtsTelephonyTestCases -t
android.telephony.cts.CellInfoTest#testCellInfo

Change-Id: I814322824836c91e9a9ad7807a6edb06f2047245
Signed-off-by: Roman Kiryanov <rkir@google.com>
/hardware/ril/reference-ril/reference-ril.c
48170a0b6cac8e791a05a8df4363ba0db579dda6 01-May-2017 bohu <bohu@google.com> Emulator: use APPTYPE_USIM instead of APPTYPE_SIM

The USIM is assumed to be available by default now.
(previously SIM is default)

BUG: 72886046
Test: run cts -m CtsTelephonyTestCases -t
android.telephony.cts.TelephonyManagerTest#testGetForbiddenPlmns

Change-Id: I7161df9eb0317cf2c6978b5b4af2332ce91da8a9
Signed-off-by: Roman Kiryanov <rkir@google.com>
/hardware/ril/reference-ril/reference-ril.c
8c1da5b30cd4e01dd587d0b7ada8383b54b63879 01-May-2017 bohu <bohu@google.com> Emulator: set correct MEID for non-CDMA phone

For GSM phone, the MEID should be empty.

BUG: 72886046
Test: un cts -m CtsTelephonyTestCases -t
android.telephony.cts.TelephonyManagerTest#testGetMeid

Change-Id: Id0cabe87f417fe284b41f5394c755cfbd3bd689c
/hardware/ril/reference-ril/reference-ril.c
efa3401c716b8d090afbd9a6a1022f111a041b9a 01-May-2017 bohu <bohu@google.com> Emulator: support querying device identity

Current reference-ril only support CDMA type;
Changed it to support Non-CDMS type (such as GSM) as well.

BUG: 72886046
Test: run cts -m CtsTelephonyTestCases -t
android.telephony.cts.TelephonyManagerTest#testGetImei

Change-Id: I8a5f61d96568b22f990da2004248436fcef7a51a
Signed-off-by: Roman Kiryanov <rkir@google.com>
/hardware/ril/reference-ril/reference-ril.c
bc497e700e592450c632a898618866221420bf84 28-Jul-2017 Bjoern Johansson <bjoernj@google.com> Use system property gateway if not using WiFi

When running with WiFi the IPv4 gateway for the radio interface is known
and can be hardcoded, even if TAP is enabled. This is because the
gateway is the internal address in the router namespace. Without WiFi
the radio interface is eth0, the public interface. The gateway for this
interface can be dynamic if running with TAP networking so in that case
it can't use a hardcoded gateway the way it used to. The DHCP client
will set the net.eth0.gw system property to the gateway of the host
network so use that property to give the correct gateway to the radio
interface.
Bug: 72886046
Test: manual, build and ran the emulator (steps from CTS tests)
Change-Id: I110a1216cccc846a48befe4c8cb2e602ed63752f
(cherry picked from commit cf111309af68ab095371ef495d2c78e1faf885a6)
(cherry picked from commit 0de94de9dc67db550f50bf2ffe3360b7ce02907d)
/hardware/ril/reference-ril/reference-ril.c
e1ac3f2ad6a85ee2584a8f015e140af4d158dbf6 22-Mar-2017 Bjoern Johansson <bjoernj@google.com> Enable/disable radio interface on setup/deactivate

When a RIL request to setup or deactivate data calls the radio interface
would previously be left up. This caused some problems for IPv6 when
switching between WiFi and radio. When WiFi was disable the radio
interface would not send a router solicitation and so the IPv6 router
table would not be populated with a default gateway. Disabling and
enabling the interface solves this since enabling the interface triggers
the router solicitation. Additionally this also makes networking
unavailable when radio data is turned off as one might expect.
Bug: 72886046
Test: manual, build and ran the emulator (steps from CTS tests)
Change-Id: I658ebd8ea6e691a6ffb829e38e1ebbec67002645
(cherry picked from commit 9d552844e9936d03cc5a8856040fca18a2d2f5ac)
(cherry picked from commit 857f2d522c5163d8bbcf4ba5c9394d043fbc5b82)
Signed-off-by: Roman Kiryanov <rkir@google.com>
/hardware/ril/reference-ril/reference-ril.c
a8bec8983b382917b517e97fa09be5afda468b0c 10-Feb-2017 Bjoern Johansson <bjoernj@google.com> Add support for WiFi in the emulator

The way WiFi works in the emulator requires changes to the reference RIL
in setting up interfaces. The interface name and gateway provided by RIL
changes when the emulator indicates support for WiFi. This information
is used to set up default routes which is needed for internet
connectivity.
Exempt-From-Owner-Approval:
Change-Id: I5dface583519ac36d12d16315b059866baaf73a5
(cherry picked from commit 021f5783a6c3c2a9793e3ac46e9ba0c9a6607235)
(cherry picked from commit 4710ed193d827066d08b46d75ce6315a983c7402)
Signed-off-by: Roman Kiryanov <rkir@google.com>
/hardware/ril/reference-ril/reference-ril.c
fe21a1c2d8666026ca411c65cd3bd08baab6e4d6 24-Jan-2018 Tao Wu <lepton@google.com> Merge "Revert "reference-ril: fix emulator gateway""
cdf333731d4bac7855d589137bca7d9411824915 24-Jan-2018 Tao Wu <lepton@google.com> Revert "reference-ril: fix emulator gateway"

This reverts commit 0c389bf755acc18fb44dff5f3a32385352e69656.

Reason for revert: the right fix should be r.android.com/597929

Change-Id: Icc97c003b6dee7ada22748950e08cd5e0d5913c8
/hardware/ril/reference-ril/reference-ril.c
b6f3f7e0bdb439a55ea036866de2ed1feb0b6001 07-Dec-2017 Jim Kaye <jameskaye@google.com> Fix more VTS HAL Radio tests

With VTS 8.0 r4, 16 new VTS failures appeared in the
Emulator. These failures were all due to unexpected
responses (some error, some no-error) from the Radio
Interface Layer.

This CL has reference-ril give the expected responses.

With this CL, 122 of 129 of these tests pass (again).

(The remaining 7 tests still fail. These 7 are
related to SAP.)

The 16 previously-failing tests were in
HidlHalGTest#RadioHidlTest:

setNetworkSelectionModeAutomatic_32bit
startLceService_32bit
pullLceData_32bit
sendSms_32bit
sendSMSExpectMore_32bit
acknowledgeLastIncomingGsmSms_32bit
sendCdmaSms_32bit
writeSmsToSim_32bit
hangup_32bit
hangupWaitingOrBackground_32bit
hangupForegroundResumeBackground_32bit
switchWaitingOrHoldingAndActive_32bit
conference_32bit
rejectCall_32bit
cancelPendingUssd_32bit
separateConnection_32bit

Bug: 62137708

Test: VTS tests: VtsHalRadioV1_0Target

Change-Id: Ic1d89e1d09d8ef1976cb6b78c863a84d7b1505e1
/hardware/ril/reference-ril/reference-ril.c
d0eaef9aaf46fe3e8a54eeb81601200fe39ab07d 18-Oct-2017 Jim Kaye <jameskaye@google.com> Merge "Fix VTS HAL Radio tests" am: 4af7529e39 am: 9e633f3956
am: 61e17974bc

Change-Id: I902e8a3e0c5dd30906c9b93fea64ac563f90ec54
9e633f39569b26a95a1c289e5a6dac9d39ce477f 18-Oct-2017 Jim Kaye <jameskaye@google.com> Merge "Fix VTS HAL Radio tests"
am: 4af7529e39

Change-Id: I6204d090a9d4b527eee00e5ed76ec15cb4769176
d2d820161d534e3423dcc451f9dbb4eee8225131 06-Oct-2017 Jim Kaye <jameskaye@google.com> Fix VTS HAL Radio tests

Get VTS HAL Radio tests working for Emulator.

With this CL, 122 of 129 of these tests pass.

(The remaining 7 tests still fail. These are
related to SAP.)

Bug: 62137708

Test: VTS tests: VtsHalRadioV1_0Target

Merged from If8b100c448f7f6b605d28af6a2ac2f03197c0137

Change-Id: Ieab832ab1a836087ca0f6d542128520000fffc71
/hardware/ril/reference-ril/reference-ril.c
82aa01c94c1530912f6d8c61ba1d5a62cdcbed4e 04-Oct-2017 bohu <bohu@google.com> Merge "reference-ril: fix emulator gateway" am: a66fd94317 am: 82ab4714c8
am: 5d16d0f41f

Change-Id: Ib79c54fd107b418f7a457f04d5284cd7fad0cb78
82ab4714c89faac83236f8c73c9e3ab79a6d1ee6 04-Oct-2017 bohu <bohu@google.com> Merge "reference-ril: fix emulator gateway"
am: a66fd94317

Change-Id: I0d2dd97cf0bd96d4d1a25d51265599c97108fea7
0c389bf755acc18fb44dff5f3a32385352e69656 04-Oct-2017 bohu <bohu@google.com> reference-ril: fix emulator gateway

BUG: 67221233
Change-Id: I2927d5ca9887f9cd23a810c097b3bbd0756a49b7
/hardware/ril/reference-ril/reference-ril.c
a1ffe3f098ed3d92e0b96b79e9e6630c480a33c3 13-Jul-2017 kun.tang <kun.tang@spreadtrum.com> Merge "Fix VTS test case HidlHalGTest#RadioHidlTest.getIccCardStatus_32bit failed." am: 78b80ee72d am: c7d49fa255 am: 417202e99c
am: 3a533d8882

Change-Id: Ic634e1a7f183f26c27e2a4c926ec2aa8bb205a6a
3a533d8882810503b426676e2969807bdfdf67dd 13-Jul-2017 kun.tang <kun.tang@spreadtrum.com> Merge "Fix VTS test case HidlHalGTest#RadioHidlTest.getIccCardStatus_32bit failed." am: 78b80ee72d am: c7d49fa255
am: 417202e99c

Change-Id: I1772de0212eaa47d55a9bd58e3b5d4db5a64e0a3
c7d49fa2554d0bae9fffcbf8ecaa2f5903bb30f3 13-Jul-2017 kun.tang <kun.tang@spreadtrum.com> Merge "Fix VTS test case HidlHalGTest#RadioHidlTest.getIccCardStatus_32bit failed."
am: 78b80ee72d

Change-Id: Ic3f8b88e1b96d190ba09852f5436e65d017d8442
7bb0022b40f425734fbdebb727a2a8ed9795f311 12-Jul-2017 kun.tang <kun.tang@spreadtrum.com> Fix VTS test case HidlHalGTest#RadioHidlTest.getIccCardStatus_32bit failed.

In the ril.h, the annotation of gsm_umts_subscription_app_index is "value < RIL_CARD_MAX_APPS, -1 if none".
But in the reference-ril.c, the gsm_umts_subscription_app_index is initialized to RIL_CARD_MAX_APPS.
The VTS test case HidlHalGTest#RadioHidlTest.getIccCardStatus_32bit failed with the reason :"Expected: (cardStatus.gsmUmtsSubscriptionAppIndex) < ((int)RadioConst::CARD_MAX_APPS), actual: 8 vs 8"
gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */

Test:build
Change-Id: I3f7ade93e2f0f7099d934a1b50e01ff04c8c01da
/hardware/ril/reference-ril/reference-ril.c
076e68750686a02aafab55def43a0fa9122fa3ec 03-Jul-2017 bohu <bohu@google.com> rild: fix missing simcard in emulator

This CL adds one additional application: ims, in addition to
existing gsm and cdma applications.

Test: build sdk_phone_x86-eng, launch emulator
and the radio should work.

Change-Id: Icc2a2ba77741b4ec504d521f994af666aa168bdc
/hardware/ril/reference-ril/reference-ril.c
ac88f0763311ab55b0c753a94213a7ff06f14a95 01-Jun-2017 Tao Wu <lepton@google.com> Merge "Also setup IPv6 gateway for emulator." am: f75ebd7434 am: 9b42a8c2d1 am: a30b650899
am: 9ee260040c

Change-Id: Ice58078a225b1dbca0636a11d5973a081f4d8c64
9ee260040c4b89a674d68574d0edda4a0e5e6874 01-Jun-2017 Tao Wu <lepton@google.com> Merge "Also setup IPv6 gateway for emulator." am: f75ebd7434 am: 9b42a8c2d1
am: a30b650899

Change-Id: I5ba96bb910231ad261cb0d1620f852f00ddaf889
0c5ad9f4280822ee7f9d60ca4491ce5cbb0299af 22-May-2017 Tao Wu <lepton@google.com> Also setup IPv6 gateway for emulator.

Without this, after switch on/off flight mode, emulator IPv6
network stops working.

Test: manual - switch of/off flight mode and then visit ipv6.google.com
Bug: 38496839
Change-Id: I3f33b0f8784a83ba99e25a0062f1829e9cfc0485
Signed-off-by: Tao Wu <lepton@google.com>
/hardware/ril/reference-ril/reference-ril.c
88961c2a2feb543bc6f63b42eeaa112ddca5d6e3 11-Apr-2017 Tomasz Wasilczyk <twasilczyk@google.com> Fix warnings and set Werror flags to not let them happen again.

Test: it builds.
Bug: b/37159108
Change-Id: I3b0d6376d81615774b60e71a6eebf6f38224df88
/hardware/ril/reference-ril/reference-ril.c
dc9f31be04e81fb411b38cba165bfffdda2ced4b 03-Apr-2017 Jim Kaye <jameskaye@google.com> Allow newer message format indicating signal strength

This code expected v6 of the cellular signal strength
message. The framework allows up to v10, which takes
more memory. In fact, the framework requires that it
be given a buffer that is the right size for a v10
message.

This code now uses a buffer that is sized for v10.
It accepts either a v6 or a v10 message.

Bug: b.android.com/316334

Test: Manually verified correct behavior with Emulator.

Change-Id: Iaf8dda0e441393b6fde899fa30bcc90a4413f0ef
/hardware/ril/reference-ril/reference-ril.c
ba723cee9906bb0979283e7fdc6af47287cbc42c 29-Mar-2017 bohu <bohu@google.com> Revert "Revert "Emulator: adjust reference-ril to the refactored qemu_pipe""

This reverts commit 05bab0b719b75925482ab8631ceefc279ecb8656.

Change-Id: I9064151573cf6fdc6b84f9708b5ae223ef42d318
/hardware/ril/reference-ril/reference-ril.c
05bab0b719b75925482ab8631ceefc279ecb8656 28-Mar-2017 bohu <bohu@google.com> Revert "Emulator: adjust reference-ril to the refactored qemu_pipe"

This reverts commit 4799b529349e229cba4c2d5fe48454a8b3d32d09.

This change is being reverted because it broke the git_master build
for full-eng and other targets.
/hardware/ril/reference-ril/reference-ril.c
4799b529349e229cba4c2d5fe48454a8b3d32d09 28-Feb-2017 bohu <bohu@google.com> Emulator: adjust reference-ril to the refactored qemu_pipe

qemu_pipe is refactored into a library in system/core/qemu_pipe,
and reference-ril needs to adjust accordingly.

Change-Id: I13160ce6a07a721501fd893dd9c5a9931927e767
(cherry picked from aosp commit 7b7267ac17fa6d557a762f23cb5b7e97de21372f)
/hardware/ril/reference-ril/reference-ril.c
9cec1e06e19af98ac94fc0af6637d1e2cb186814 08-Feb-2017 Wei Wang <wvw@google.com> Fix warning in reference ril

Bug: None
Test: mma
Change-Id: I899adb43c908aefb0bf9cd1c34a3faa16fe1c185
/hardware/ril/reference-ril/reference-ril.c
9f471e2dd80b528a384813210ae64e3ea3527f35 07-Feb-2017 Weilun Du <wdu@google.com> Fix race condition in at_send_command_*

b/34883617

Change-Id: I946125e1c4db44e05afbc0e5d1fb22cc880f1d89
Signed-off-by: Weilun Du <wdu@google.com>
/hardware/ril/reference-ril/reference-ril.c
1fdedbd9aad5bfab82ff024e9432deb84243d5ad 28-Oct-2016 Bjoern Johansson <bjoernj@google.com> Implement support for logical channels

This implements support for RIL_REQUEST_SIM_OPEN_CHANNEL,
RIL_REQUEST_SIM_CLOSE_CHANNEL and RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL
requests, translating these into the proper AT commands.

BUG: 31808032
Change-Id: I0444df4a0a031c429c9128b9df73bf4c6f87e5b6
(cherry picked from commit d800fdcae8786ef65abee53228f14fab817a8146)
/hardware/ril/reference-ril/reference-ril.c
bb43e36633d421a57f5e681b1599339a1ca6f0f9 09-Nov-2016 Naveen Kalla <mrnaveen@google.com> resolve merge conflicts of 56ad8b4 to master

Test: Build successfully

Change-Id: Ie317dca9dccf4d9cb77c821f7c97643fd8f34a19
f93683289174d10281bd5ac4e32a700534bce14e 09-Nov-2016 Naveen Kalla <mrnaveen@google.com> Merge "Remove deprecated RADIO_STATES"
am: b7f1226866

Change-Id: I15c5c754fdcb36391cbe6032fc11ca2dbf138005
2baf72329c43d9e3f7850973f087176f535e31e8 11-Oct-2016 Naveen Kalla <mrnaveen@google.com> Remove deprecated RADIO_STATES

Remove deprecated radio states which carried the SIM state
information. Vendor RILs are not expected to send one of the 3
RADIO states (ON, OFF or UNAVAILABLE) and support the RIL requests
RIL_REQUEST_VOICE_RADIO_TECH and RIL_REQUEST_CDMA_SUBSCRIPTION_SOURCE.

Bug: 32224323
Test: Ensure device boots and camps on network. Basic voice calls and
mobile data works

Change-Id: I2ae4a71c33c43263c64822c294d43363baeb5ad5
/hardware/ril/reference-ril/reference-ril.c
ef5cd0b3882d0cff83fa1518438674ef555cd8eb 14-Oct-2016 Elliott Hughes <enh@google.com> Merge "Retire socket_loopback_client." am: ecc7336e5c am: 14f6f0c59c am: c056e49a99
am: 87e2f3e918

Change-Id: Iafc545ca74cd6b9175ea06e6723c6bcefc4c566f
87e2f3e918d9a1a6e7fdaaf464f77909e17525d3 14-Oct-2016 Elliott Hughes <enh@google.com> Merge "Retire socket_loopback_client." am: ecc7336e5c am: 14f6f0c59c
am: c056e49a99

Change-Id: I862d1d234394ba6e5ef76993cb4a39454f76b478
7e3bbd409d82477c1c85ccc861a79bf174e0e9d8 11-Oct-2016 Elliott Hughes <enh@google.com> Retire socket_loopback_client.

Making the world safe for IPv6.

Bug: http://b/31537253
Test: builds
Change-Id: If8478aec17892f49e856d6220b72e4585ee9c078
/hardware/ril/reference-ril/reference-ril.c
77c194625cf664f6e8569db284eef9cad91a3cd8 23-Sep-2016 Sanket Padawe <sanketpadawe@google.com> Merge "Fix memory leak in requestSendSMS" am: 07b1732d84 am: 3fbcb63219 am: 2ea3dd7197
am: a9a25549dd

Change-Id: Icf3801cfa0a37dca0e9f27fec4c744a3981fc154
a9a25549ddd21218c74449a669d6f2d26ad50c5f 23-Sep-2016 Sanket Padawe <sanketpadawe@google.com> Merge "Fix memory leak in requestSendSMS" am: 07b1732d84 am: 3fbcb63219
am: 2ea3dd7197

Change-Id: Ief8d067872534de91c81248594d83386497b3f02
07b1732d841454a3bb0fec2de48c8cdce5b48866 23-Sep-2016 Sanket Padawe <sanketpadawe@google.com> Merge "Fix memory leak in requestSendSMS"
cabf84065f774fdadbf354a01b0af6f6be213e80 01-Jul-2016 Sanket Padawe <sanketpadawe@google.com> Merge commit \'f0c8ca7f09ed9a827e5c79e019526e8f2c77eeb4\' into manual_merge_f0c8ca7
am: 40be36d427

Change-Id: I5b191e1e741a0649a7ba84b15c8ccceda762b5d4
40be36d427f641333832424ab7dc74907d5200c8 01-Jul-2016 Sanket Padawe <sanketpadawe@google.com> Merge commit 'f0c8ca7f09ed9a827e5c79e019526e8f2c77eeb4' into manual_merge_f0c8ca7

Change-Id: I670c9270d5d6fccd4b1a223de142d61e26541b7e
f0c8ca7f09ed9a827e5c79e019526e8f2c77eeb4 01-Jul-2016 Sanket Padawe <sanketpadawe@google.com> Fix build warnings in hardware/ril.

Bug: 29401612
Change-Id: I8473294655ad24ec001cedb84856004ab0ba22a7
/hardware/ril/reference-ril/reference-ril.c
fee63df3d23280da60243e94f3ab084eeca1d38e 23-Jun-2016 David Turner <digit@google.com> resolve merge conflicts of d027477 to nyc-mr1-dev-plus-aosp
am: 5d6ef97672

Change-Id: Id8844f27c56acd111a975d7a74153b5289281bb8
834eca8da7a8fb8f0113367f0e239a2572e8b184 22-Jun-2016 David 'Digit' Turner <digit@google.com> Simplify emulator-specific logic.

Remove any qemu-specific code from rild.c, this now handled
by setting rild.libpath properly in the init.<board>.rc files
for emulator-specific build products.

Also, only the qemu pipe method is really supported since ICS
so remove obsolete schemes.

BUG=25875346

Change-Id: I82296c127b90c230ca1446ee2431f06e78def617
/hardware/ril/reference-ril/reference-ril.c
3b9ec9bb3cf508319a5e01815b37e97817eba92e 21-Jun-2016 David Turner <digit@google.com> Merge \\\\"[qemu]: Use new <system/qemu_pipe.h> header.\\\\" am: 47a81105da am: c963b671f3 am: 12db6c3cf4
am: 8cd152faee

Change-Id: I1bdf3012d376da36683cd79bd52729fc1cd6e281
2e98d891bb5f6cbebc56473a5d77c9554dc1dffd 16-Jun-2016 David 'Digit' Turner <digit@google.com> [qemu]: Use new <system/qemu_pipe.h> header.

BUG=25875346

Change-Id: Ie8649caa43a77a4ea1399df673cce2682773e4df
/hardware/ril/reference-ril/reference-ril.c
2be38acc92b5fcd52b72fa92a844f4da4d2d692d 03-May-2016 Naina Nalluri <nnalluri@codeaurora.org> ril: Fix kw issues

Fix kw issues
Import of partner fix 597883

Change-Id: I21ff028d07bf12d9aff232aeafbb01ec8d019c2a
/hardware/ril/reference-ril/reference-ril.c
e18b85ca88ae5fa67f4d0c8698ceaa64cfda16de 27-Jan-2016 Ivan Krasin <krasin@google.com> Subject: [PATCH] Fix heap-use-after-free in reference-ril.c found by
AddressSaniziter.

BUG=26012424

(cherry picked from commit 7c0165ee3b769ed6a67b58b7c6e2f60bd6f8fbf6)

Change-Id: I108f01229b5fe6a368129e608195ba5833f2ea91
/hardware/ril/reference-ril/reference-ril.c
7c0165ee3b769ed6a67b58b7c6e2f60bd6f8fbf6 04-Dec-2015 Ivan Krasin <krasin@google.com> Fix heap-use-after-free in reference-ril.c found by AddressSaniziter.

BUG=26012424

Change-Id: Ic73f73cd1e2aeadf2d17e039e317b75b69d123c3
/hardware/ril/reference-ril/reference-ril.c
a5c743eedc13fc4ab279a7cf7215d36b09cc96b3 06-May-2015 Daniele Palmas <dnlplm@gmail.com> Fix memory leak in requestSendSMS

This patch fixes a memory leak by freeing memory
allocated by asprintf for commands

Change-Id: I4c7b319a3b0c4a4bbf254e82b65b93f16ad525b5
Signed-off-by: Daniele Palmas <dnlplm@gmail.com>
/hardware/ril/reference-ril/reference-ril.c
b44dda3ea5bbbadb910479019f967b52cf9d69c7 02-Jun-2014 Sukanya Rajkhowa <srajkh@codeaurora.org> Modify RIL_Data_Call_Response to include MTU

Include MTU as part of RIL Data Call Response so that the
framework uses the dynamic MTU value provided by network
and updates LinkProperties accordingly.

Upping RIL version to 11.

bug:18391670
Change-Id: I8a85d7f58c99d73278646cdcb2aa466b85ae9a81
/hardware/ril/reference-ril/reference-ril.c
33bbe435b41e4eead73b775346ecb0e5e8b6c8a9 24-Sep-2013 Chaitanya Saggurthi <csaggurt@codeaurora.org> Reference-ril: Send sms using RIL_REQUEST_SEND_SMS_EXPECT_MORE

Add support for RIL_REQUEST_SEND_SMS_EXPECT_MORE in reference-ril

Bug: 17570854
Change-Id: Ie8f42ea6fdf69ac73a02708de8f274d9ac38fbca
/hardware/ril/reference-ril/reference-ril.c
a65a16a2e81b11762fd9e4233e1a212effcfee82 01-Aug-2014 Naveen Kalla <nkalla@codeaurora.org> Add RIL_REQUEST_SHUTDOWN to notify RIL that device is shutting down

When device is in airplane mode, SIM card and modem may be powered on.
RIL can use RIL_REQUEST_SHUTDOWN to shutdown the modem and SIM card
gracefully.

Bug: 9773278
Change-Id: I6afa9e810cefc7855f7ae42e51f39cc51fa2aa6e
/hardware/ril/reference-ril/reference-ril.c
11f27940d5928f9e6cfb0784fcc1285fe2870702 10-Jul-2014 Sandeep Gutta <sangutta@codeaurora.org> Add switch case for '-c' in reference-ril

Currently reference-ril not handling the '-c' option
that RILD is sending as part of "RIL_Init" arguments and
due to that reference-ril initialisation failing for emulator.

To fix this add switch case statement to handle '-c' option.

Change-Id: Ia2430cb1df91b42d51af7bf820ff42b8ce2b5066
/hardware/ril/reference-ril/reference-ril.c
d365219a1873e42d2ff669e13a9fe6ce6973bd51 20-Jun-2014 Etan Cohen <etancohen@google.com> Merge kwd to master

Change-Id: Id33008507cbafc88288b6483c7691d6db34cc5c3
/hardware/ril/reference-ril/reference-ril.c
ba58c2064a7fed98bb4864f9c7332c3311b49839 12-Mar-2014 Mark Salyzyn <salyzyn@google.com> [RIL] 64-bit compile issues

- size_t use %zu format
- All in RLOG, so zero functional impact
- suppress unused argument warnings

Change-Id: I99d7221a13de6f12bfcf93ef8fe4521669f1f783
/hardware/ril/reference-ril/reference-ril.c
5cba4885b9f41dfcc0cb35639f64cdab232380e5 06-Feb-2014 Colin Cross <ccross@android.com> reference-ril: fix LP64 warnings

Use %p to print pointers

Change-Id: I5ad8e349a0dc0b471eb693f87b088edb555a48a7
/hardware/ril/reference-ril/reference-ril.c
81d1485152e4ce69b534e969180b0dd691ca5351 04-Dec-2013 Alex Yakavenka <ayakav@codeaurora.org> Send unsol_sim_status on radio_state change

Sim status changes based on radio state.
Need to notify new sim state whenever radio state changes

Change-Id: I8fef3a6ddf601647107e3059f2b2eb89a67242cf
/hardware/ril/reference-ril/reference-ril.c
a18b9d1e1a014290691d63a7f335085dadc83e46 10-Sep-2013 Sukanya Rajkhowa <srajkh@codeaurora.org> RIL: Support SMS over IMS

RIL_REQUEST_IMS_REGISTRATION_STATE is used to aquire IMS registration state.
RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED is called when IMS registration
state has changed.
RIL_REQUEST_IMS_SEND_SMS is used to send MO SMS over IMS. However, if retry
field is set in case of failure, RIL_REQUEST_IMS_SEND_SMS sets messageRef from
RIL_SMS_RESPONSE of corresponding failed MO SMS, and sets retry field to
non-zero. If voice is available, sends RIL_REQUEST_IMS_SEND_SMS retries with
data encoded based on voice tech available.

Bug: 9626411

Change-Id: If0ecc9fa47661f6560171e472f3c464713e97968
/hardware/ril/reference-ril/reference-ril.c
5802701949894c743dc95731091af94307c54bd0 30-Jul-2013 Jun Tian <jun.j.tian@intel.com> Fix libril.so crash issue caused by wrong switch logic of onRequest in reference-ril.c

If the tech is not CDMA, it will fall-through to the default case.
But the new added RIL_REQUEST_GET_CELL_INFO_LIST and RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE
cases will intercept it and cause the request call into wrong request functions.
Move these two new requests before the CDMA cases to fix the logic issue.

Bug: 9193696
Change-Id: I2cb03cbdb6be8eb1afd92c01c764e87b6aa62796

Signed-off-by: Jun Tian <jun.j.tian@intel.com>
Signed-off-by: Panfeng Chang <panfengx.chang@intel.com>
Signed-off-by: Yanglin Zhu <yanglinx.zhu@intel.com>
Signed-off-by: Jackie Wu <jackie.wu@intel.com>
/hardware/ril/reference-ril/reference-ril.c
8a9e02161271505de274db0c3a88087056dd5dfc 09-Apr-2013 Wink Saville <wink@google.com> Add support for CellInfo RIL commands.

These commands allow for more precise location determination.

To support CellInfo I created librilutils which adds ril_nano_time
over time librilutils will be expanded to have other common methods
that would be used by ril implementations.

Bug: 8235566
Change-Id: I7ad7dabc4b6c38bfba4461b08e6e30d0eb9efea1
/hardware/ril/reference-ril/reference-ril.c
4dcab4f90d2d49e40100e4888b1411dfbd1c9783 20-Nov-2012 Wink Saville <wink@google.com> Add RLOGx

This will eventually allow us to remove the code in
logd_write.c#__android_log_write which uses the tag
to direct logs to the radio buffer.

Change-Id: I7a6a966bc12e59a3ec68a56a41dd681fb325dfd8
/hardware/ril/reference-ril/reference-ril.c
e9645049ba5ec9081b208f92400669613c2a8aa7 29-Aug-2012 Jaime A Lopez-Sollano <jaimel@codeaurora.org> Add CDMA and multimode support to reference-ril

Reference RIL will query emulator modem the supported radio technologies
and the current radio technology and respond to telephony with the
information. Support for basic CDMA RIL request messages and messages
to set and query preferred network mode to be able to switch between
radio technologies.

Change-Id: I950d36691f3e4029f42efe265dc1bb0016b0f410
/hardware/ril/reference-ril/reference-ril.c
9efcac5782b93564d47c1687e67e85849c72afed 09-Aug-2012 Uma Maheswari Ramalingam <umam@codeaurora.org> Workaround for LTE RSRP -ve values in Signal

Ril version 6 and below sends negative values
for lte rsrp in signalstrength.
Workaround to maintain backward compatibility
and convert this to positive
values in compliance with ril.h

Support for processing all fields in
SignalStrength in reference-ril

Change-Id: I4d480aa2f607cd617b18681f722de246a7894348
/hardware/ril/reference-ril/reference-ril.c
28059051b016c4c13f3b81398ba78fbbb3bb1f95 29-Apr-2012 Chih-Wei Huang <cwhuang@linux.org.tw> Fix the signal strength errors

Change the response to RIL_SignalStrength_v6 format.

Change-Id: Id7797969e3433fe422625c902f54c965e806cb16
/hardware/ril/reference-ril/reference-ril.c
170fbdad83cba7ec4c67873bbafda389d9bec4cb 08-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF)

Change-Id: Ib10d100087fd0239c075e1dfee9e77a903c00b4a
/hardware/ril/reference-ril/reference-ril.c
b4e26162dd18f8db7308393ec8a63dfd5fd8b4ac 05-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF)

Change-Id: Ib429c9b5f0eb14786231e203738a8062d718e5b0
/hardware/ril/reference-ril/reference-ril.c
20cd1140431e2d4013fe3be529e14e45d973bec4 20-Dec-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF)

Change-Id: I9a87ab49edcee3281e419366ced3cbbb5ead8bc2
/hardware/ril/reference-ril/reference-ril.c
d8ad6c98086c410243e0e8ad8285f02d6b696bd6 08-Aug-2011 Vladimir Chtchetkine <vchtchetkine@google.com> resolved conflicts for merge of 988d3d71 to honeycomb-plus-aosp

Change-Id: I85178afbca0b8b51eb3890958b063a70a1b33b96
385a73934b05fd28915e0ae17020dbfe3b20afd4 04-Aug-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Enable QEMUD pipe connection

Change-Id: I8cdeda261ebaf203310262951e8253cb8a42c8c6
/hardware/ril/reference-ril/reference-ril.c
250eb3c8c3adbbbaf49c30ee09a061268d9a491a 22-Jun-2011 Wink Saville <wink@google.com> Initialize new field RIL_Data_Call_Response_v6.suggestedRetryTime.

Change-Id: Idd3c9665785322a2a3fe013db459d9c8302a48d6
/hardware/ril/reference-ril/reference-ril.c
2c1fb3a4e7aa8039bdefacceec98aa43cfe5784c 19-Mar-2011 Wink Saville <wink@google.com> Change mock-ril and reference-ril to use include/telephony/ril.h

I've done this by change the copy to a symbolic link, this allows
us to easily change from using the common include/telephony/ril.h
to a separate instance when ril.h is evolving.

Bug: 3457628
Bug: 4132203
Change-Id: Idd8029e57dd0b2afc16c2659dbbc3e587b438f0a
/hardware/ril/reference-ril/reference-ril.c
9a9fbd294bf8a7465cf10480935edea8304ef661 16-Feb-2011 Wink Saville <wink@google.com> Use local copy of ril.h for reference-ril and mock-ril.

This allows for greater stability while we're changing the ril
interface, as defined by ril.h. An example is that the emulator
will continue to run using an older ril while we upgrade to
newer rils.

After the new ril has stabilized and these modules updated the
changes should be reverted and we should use
include/telephony/ril.h

Change-Id: If5011ccbe64bcb65f98b02060165f899b6d4b5f9
/hardware/ril/reference-ril/reference-ril.c
af1298d72fd6a8b2d5bed7db15f6d181240fce83 04-Feb-2011 David 'Digit' Turner <digit@google.com> ril: Fix telephony under emulation.

This patch fixes several regressions that were introduced in
a recent rewrite of the native RIL support code, and which
prevent networking from working under emulation.

- 'apn' and 'type' were incorrectly swapped in the
AT+CGDCONT= command string, so the command was
never executed properly by the emulated modem.

- The PDP context type was not properly written to the
parcel in responseDataCallList() in libril/ril.cpp.
Due to this the Java RIL code ignored the response.

- The dns list returned by requestOrSendDataCallList()
was an empty string, which caused the Java RIL code to
fail with a "unknown host" exception when trying to setup
net.dns1

Change-Id: I7f4e6f6f45d197960ecb20e7e8592272921fe694
Note: You also need to apply this emulator patch to verify
this one: http://review.source.android.com//#change,20965

The code in requestOrSendDataCallList() assumes that
AT+CGACT? and AT+CGDCONT? will have answers with exactly
the same number of lines (this wasn't the case before
the emulator fix).
/hardware/ril/reference-ril/reference-ril.c
4380897c6cdc99486a061b819943e3b290ebcf09 14-Jan-2011 Wink Saville <wink@google.com> RIL v5 RIL_REQUEST_SETUP_DATA_CALL.

Change-Id: I30531e103416b1b817b9370304e3301a1c641cf5
/hardware/ril/reference-ril/reference-ril.c
4f81dcf2a9bc84cbfbb6d3d658c452c22e9b6e83 02-Sep-2010 Lorenzo Colitti <lorenzo@google.com> RIL changes for IPv6 / IPv4v6 data calls.

- Add a PDP type parameter to REQUEST_SETUP_DATA_CALL.
Make this backwards compatible: if we're called with a PDP type parameter and
the RIL doesn't support it, remove the parameter from the request so the RIL
never sees it.
- Change the description of the address field in the RIL_Data_Call_Response
structure and in the response to RIL_REQUEST_SETUP_DATA_CALL from an address
to a space-separated list of addresses. This preserves both source and binary
compatibility but allows new RILs to return both an IPv4 and an IPv6 address
for dual-stack data calls.

Change-Id: I0a77fc57c042bedfd18068c7faf7637a46f476d5
/hardware/ril/reference-ril/reference-ril.c
f838ede4a7c8b5994a84b92de8c2bcb346379be4 16-Jul-2010 Robert Greenwalt <robdroid@android.com> Fix reference ril to pass correct interface name

Restores connectivity to emulator.

Change-Id: I95e2026b16c78ebf70f5fd22ff2554751f90f0c9
/hardware/ril/reference-ril/reference-ril.c
74fa38884320698c1623764850e3131b9769dff0 23-Dec-2009 Wink Saville <wink@google.com> ril interface: Add support for User-User Signaling Information during call setup

Define the UUS data structures and add a pointer to it in RIL_Call for
MT Calls and RIL_Dial for MO calls. UUS information can be used to pass
the skypeId on some networks. Make the corresponding changes to
serialize and deserialize the data at the RIL interface.

Change-Id: Ibbd471cd062910fd4c365f76e809cfb224bd34a2
/hardware/ril/reference-ril/reference-ril.c
309ac294bd529ff5a71f1c1e62cd493df1010271 30-Jul-2009 John Wang <johnwang@google.com> Clean RIL_SIM_* in ril.h

GET_SIM_STATUS returns structure RIL_CardStatus instead of an integer of RIL_SIM_*. Update reference-ril for RIL_CardStatus and cleanup RIL_SIM_*.

modified: include/telephony/ril.h
modified: reference-ril/reference-ril.c
/hardware/ril/reference-ril/reference-ril.c
6f189a6a1b53adfa9570cf5911c3f81ef1b1fcf8 30-Jun-2009 John Wang <johnwang@google.com> Fix bug 1687659 - cell id in reference ril.

The LAC and CID of RIL_REQUEST_REGISTRATION_STATE should be in the hex format. The valid LAC are from 0x0000 to 0xffff and Valid CID are from 0x00000000 to 0xffffffff. reference-ril should return hex value instead of decimal one.

modified: reference-ril/reference-ril.c
/hardware/ril/reference-ril/reference-ril.c
7f8568086f2ea14885b0091c793e14c2656f0da2 09-Jun-2009 Wink Saville <wink@google.com> Cleanup whitespace.
/hardware/ril/reference-ril/reference-ril.c
fdf825f9d0dc639787b8523638bb61874ed0b540 23-May-2009 johnwang <johnwang@google.com> Enable new libhtc_ril which supporting new CDMA ril interface.

1) Enable new libhtc_ril and support new RIL_Call structure 2) Remove "#define NEWRIL".
/hardware/ril/reference-ril/reference-ril.c
3d54e74bc450bb40977e3ae6fab6185fe687bdae 19-May-2009 Wink Saville <wink@google.com> Teleca 2b changes.
/hardware/ril/reference-ril/reference-ril.c
f6aa7c1c8a9531a254970f85860d74cdd033821c 30-Apr-2009 Wink Saville <wink@google.com> Handle RIL_REQUEST_GET_SIM_STATUS as per the new ril.h specification.
/hardware/ril/reference-ril/reference-ril.c
4a24d11778bff3f2b4b99eb03b0dfafa6c3c059c 30-Apr-2009 Wink Saville <wink@google.com> Partially fix 1820187 by using RIL_CallOld since we're not
yet fully switched to the new ril.h.

This is only partially fixed because there is an opposite
problem with getSIMStatus in reference-ril.c. Here we should
be returning the new RIL_CardStatus but we're returning the
just the integer. This will be fixed in a subsequent Change.
/hardware/ril/reference-ril/reference-ril.c
f4c4d36c410a3501d282dd7de1c7c3350734f27e 02-Apr-2009 Wink Saville <> AI 144185: Integrate cdma into the main code base.

Automated import of CL 144185
/hardware/ril/reference-ril/reference-ril.c
e6e6fb2ebbaae681ab45b866bb9bba57aff1c33c 19-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake_rel/...@140373
/hardware/ril/reference-ril/reference-ril.c
00f06fc3fdb05d4276e76091cacb42b6f6862222 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/hardware/ril/reference-ril/reference-ril.c
c2efc51d848d68147320a5983954f9c76428885c 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/hardware/ril/reference-ril/reference-ril.c
dbbb392e15b5ace6f19e76c49c80ea14292e8a4d 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/hardware/ril/reference-ril/reference-ril.c