mirror of
https://github.com/sailfishos/ofono
synced 2025-12-02 23:51:10 +08:00
Drivers can notify core of SIM insertion / removal
Add ofono_sim_inserted_notify function to notify the core of SIM insertion / removal. Make every plugin generate a sim inserted event on start. For devices with removable card, the event should be emitted after the plugin detects such event. For devices that need to wait for SIM card initialization, they can emit this event later.
This commit is contained in:
committed by
Denis Kenzior
parent
22cbe98146
commit
ddfe8acf11
@@ -431,12 +431,16 @@ static int calypso_disable(struct ofono_modem *modem)
|
||||
static void calypso_pre_sim(struct ofono_modem *modem)
|
||||
{
|
||||
struct calypso_data *data = ofono_modem_get_data(modem);
|
||||
struct ofono_sim *sim;
|
||||
|
||||
DBG("");
|
||||
|
||||
ofono_devinfo_create(modem, 0, "atmodem", data->dlcs[AUX_DLC]);
|
||||
ofono_sim_create(modem, 0, "atmodem", data->dlcs[AUX_DLC]);
|
||||
sim = ofono_sim_create(modem, 0, "atmodem", data->dlcs[AUX_DLC]);
|
||||
ofono_voicecall_create(modem, 0, "calypsomodem", data->dlcs[VOICE_DLC]);
|
||||
|
||||
if (sim)
|
||||
ofono_sim_inserted_notify(sim, TRUE);
|
||||
}
|
||||
|
||||
static void calypso_post_sim(struct ofono_modem *modem)
|
||||
|
||||
Reference in New Issue
Block a user