1. When the SIM card status changes, the modem side sends the qcril_evt_uim_qmi_indication event to the AP side.
2. the ap-side qcril UIM module (qcril_uim.c and other files) is used to process SIM card-related services. When a qcril_evt_uim_qmi_indication event is received, call the corresponding event processing function notify (). If the status of the SIM card is changed, call the qcril_uim_process_status_change_ind () function again, this function checks whether the SIM card status has changed. If yes, it saves the new status to the qcril_uim.card_status variable and sends an active report to the framework layer to ril_unsol_response_sim_status_changed.
3. framework layer uiccmanager module (uiccmanager. java) registers the event (event_icc_status_changed) that is actively reported. After receiving the event, it calls RIL. java function geticccardstatus (), issued ril_request_get_sim_status request to obtain the SIM card status.
4. After the qcril UIM module receives the ril_request_get_sim_status request, it calls the qcril_uim_request_get_sim_status () function to get the SIM card status from the qcril_uim.card_status variable, and then sends it.
Http://blog.csdn.net/progbelief/article/details/6169552