From 3317cc6f45da12a3c31a249658497f0505329c4d Mon Sep 17 00:00:00 2001 From: Anirudh Gargi Date: Wed, 3 Oct 2018 12:07:28 +0530 Subject: [PATCH] xmm7xxx: enable sms and phonebook support --- plugins/xmm7xxx.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/plugins/xmm7xxx.c b/plugins/xmm7xxx.c index 9db87ad1..066e2e73 100644 --- a/plugins/xmm7xxx.c +++ b/plugins/xmm7xxx.c @@ -50,6 +50,8 @@ #include #include #include +#include +#include #include #include @@ -128,13 +130,20 @@ static void switch_sim_state_status(struct ofono_modem *modem, int status) break; case 2: /* SIM inserted, PIN verification not needed - READY */ case 3: /* SIM inserted, PIN verified - READY */ - case 7: + case 7: /* SIM inserted, SMS and phonebook - READY */ if (data->have_sim == FALSE) { ofono_sim_inserted_notify(data->sim, TRUE); data->have_sim = TRUE; } ofono_sim_initialized_notify(data->sim); + + if (data->sms_phonebook_added == FALSE) { + ofono_phonebook_create(modem, 0, "atmodem", data->chat); + ofono_sms_create(modem, 0, "atmodem", data->chat); + data->sms_phonebook_added = TRUE; + } + break; default: ofono_warn("Unknown SIM state %d received", status);