diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2020-10-15 08:24:47 +0200 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2021-01-01 23:54:56 +0100 |
commit | e593f410d7c3f0924033e71c84dcb1ace32fd6a0 (patch) | |
tree | dbc1fe7366b4c13189e10f74d78ae1d7683c2149 /misc.c | |
parent | 1f4962b5d11e5e3567e6a78ecce7207ed3ef438e (diff) | |
download | hardware_replicant_libsamsung-ril-e593f410d7c3f0924033e71c84dcb1ace32fd6a0.tar.gz hardware_replicant_libsamsung-ril-e593f410d7c3f0924033e71c84dcb1ace32fd6a0.tar.bz2 hardware_replicant_libsamsung-ril-e593f410d7c3f0924033e71c84dcb1ace32fd6a0.zip |
Convert to use separate SIM statusHEADreplicant-6.0-0004-rc4master
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.
This was tested on Replicant 4.2 with a Galaxy SIII (GT-I9300)
and a Nexus S (GT-I9023) and in both cases:
- It compiled fine
- Calling worked fine too: I called an invalid number I got an
automatic voice reply telling me that this number was invalid.
Similarly that was also tested on Replicant 6.0 0004 RC3 both
by compiling it and calling an invalid number, as this commit
was part of the Replicant 6.0 0004 RC3 release.
Since then only the commit message was modified to add information
about the tests as it didn't have them but had the following text
instead:
TODO:
- Test this code with Replicant 4.2!!!!
[1]https://android.googlesource.com/platform/hardware/ril
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Diffstat (limited to 'misc.c')
-rw-r--r-- | misc.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -57,7 +57,7 @@ int ril_request_baseband_version(__attribute__((unused)) void *data, struct ril_request *request; 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; @@ -115,7 +115,7 @@ int ril_request_get_imsi(__attribute__((unused)) void *data, struct ril_request *request; int rc; - rc = ril_radio_has_reached_state(RADIO_STATE_SIM_READY); + rc = ril_sim_has_reached_state(SIM_STATE_READY); if (rc < 0) return RIL_REQUEST_UNHANDLED; @@ -191,7 +191,7 @@ int ril_request_get_imei(__attribute__((unused)) void *data, struct ril_request *request; 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; @@ -223,7 +223,7 @@ int ril_request_get_imeisv(__attribute__((unused)) void *data, struct ril_request *request; 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; @@ -277,7 +277,7 @@ int ril_request_screen_state(void *data, size_t size, RIL_Token token) return RIL_REQUEST_COMPLETED; } - 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; |