From 2250038fe07e923daa9fc4118d92717d56137f64 Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Thu, 15 Oct 2020 08:24:47 +0200 Subject: Convert to use separate SIM status In 2001, in the RIL repository[1], the SIM states were separated from the radio states by the following commit: 2bc78d614e349574426d198c37e51ccb7455b5bb 2bc78d61 Separate SIM states from Radio States Then in 2016 the SIM states were removed from the RADIO_STATES by the following commit: 2baf72329c43d9e3f7850973f087176f535e31e8 2baf7232 Remove deprecated RADIO_STATES So to be compatible with recent rild, we need to convert the code to use separate SIM states. TODO: - Test this code with Replicant 4.2!!!! [1]https://android.googlesource.com/platform/hardware/ril Signed-off-by: Denis 'GNUtoo' Carikli --- ss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ss.c') diff --git a/ss.c b/ss.c index 76dbe2a..4d89fde 100644 --- a/ss.c +++ b/ss.c @@ -124,7 +124,7 @@ int ril_request_send_ussd(void *data, size_t size, RIL_Token token) if (data == NULL || size < sizeof(char *)) goto error; - rc = ril_radio_has_reached_state(RADIO_STATE_SIM_NOT_READY); + rc = ril_radio_has_reached_state(RADIO_STATE_ON); if (rc < 0) return RIL_REQUEST_UNHANDLED; @@ -224,7 +224,7 @@ int ril_request_cancel_ussd(__attribute__((unused)) void *data, struct ipc_ss_ussd_header ussd; int rc; - rc = ril_radio_has_reached_state(RADIO_STATE_SIM_NOT_READY); + rc = ril_radio_has_reached_state(RADIO_STATE_ON); if (rc < 0) return RIL_REQUEST_UNHANDLED; -- cgit v1.2.3