diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2019-06-19 17:17:11 +0200 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2019-06-21 13:49:26 +0200 |
commit | 05c15deb15fb7c4a1ee6fbf40d1199ea6b0ba2bc (patch) | |
tree | 60e7cf075a39de65840b8618613e61eb6efa6443 | |
parent | a43e3b9d13e52f650d145f51b3ed90fd86086143 (diff) | |
download | hardware_replicant_libsamsung-ril-05c15deb15fb7c4a1ee6fbf40d1199ea6b0ba2bc.tar.gz hardware_replicant_libsamsung-ril-05c15deb15fb7c4a1ee6fbf40d1199ea6b0ba2bc.tar.bz2 hardware_replicant_libsamsung-ril-05c15deb15fb7c4a1ee6fbf40d1199ea6b0ba2bc.zip |
WIP: Workaround to make the ril compile without a wrapper
This libril needs to be converted to version 12
This commit has insights on how to do that:
2baf723 Remove deprecated RADIO_STATES
=> Rework it by getting SIM state instead of relying on
the radio states
Instead of directly going to convert it to split the SIM states
and the radio states, we are going to do a two step conversion:
- First we make it work with the Ril version 12 with the least
amount of changes. This will enable to quickely test the ril
and get less probability of regressions.
- Once this is done, a more in depth conversion will be done,
while keeping the code as clean as possible, and trying to
keep the compatibility with RIL < 6 if possible.
Note that the deprecated RADIO_STATEs were already deprecated
in the RIL used by Replicant 6, so if it's not possible to keep
the code clean and still be compatible with older versions, we
could just convert the code without affecting the ability to run
this RIL on Replicant 6, assuming that no regressions are
introduced in the process.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rw-r--r-- | samsung-ril.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/samsung-ril.h b/samsung-ril.h index cf6dc15..55e006a 100644 --- a/samsung-ril.h +++ b/samsung-ril.h @@ -47,6 +47,33 @@ * Macros */ +#if !defined(RADIO_STATE_SIM_NOT_READY) +#define RADIO_STATE_SIM_NOT_READY RADIO_STATE_UNAVAILABLE +#endif + +#if !defined(RADIO_STATE_SIM_LOCKED_OR_ABSENT) +#define RADIO_STATE_SIM_NOT_READY RADIO_STATE_UNAVAILABLE +#endif + +#if !defined(RADIO_STATE_NV_NOT_READY) +#define RADIO_STATE_NV_NOT_READY RADIO_STATE_UNAVAILABLE +#endif + +/* Very big hack, this is unlikely to work */ +#if !defined(RADIO_STATE_SIM_LOCKED_OR_ABSENT) +#define RADIO_STATE_SIM_LOCKED_OR_ABSENT RADIO_STATE_UNAVAILABLE +#endif + +/* Very big hack, this is unlikely to work */ +#if !defined(RADIO_STATE_SIM_READY) +#define RADIO_STATE_SIM_READY RADIO_STATE_ON +#endif + +/* Very big hack, this is unlikely to work */ +#if !defined(RADIO_STATE_NV_READY) +#define RADIO_STATE_NV_READY RADIO_STATE_ON +#endif + #ifdef ALOGI #define RIL_LOGI ALOGI #else |