This article explains Simrecords
/frameworks/opt/telephony/src/java/com/android/internal/telephony/uicc/simrecords.java
Construction Method:
PublicSimrecords (uicccardapplication app, Context C, Commandsinterface ci) {Super(app, C, CI); Madncache=NewAdnrecordcache (MFH); Mvmconfig=Newvoicemailconstants (); Mspnoverride=Newspnoverride ();Mci.setonsmsonsim ( This, Event_sms_on_sim,NULL);//message registration, when CI receives EVENT_SMS_ON_SIM message notification Simrecords Mci.registerforiccrefresh ( This, Event_sim_refresh,NULL); //Start off by setting empty stateresetrecords (); Mparentapp.registerforready ( This, Event_app_ready,NULL)////When the card is ready, Uicccardapplication will notify Simrecords mparentapp.registerforlocked via notifyreadyregistrantsifneeded () ( This, event_app_locked,NULL);//event_app_locked messages are also handledif(DBG) log ("Simrecords X ctor this=" + This); Intentfilter Intentfilter=NewIntentfilter (); Intentfilter.addaction (carrierconfigmanager.action_carrier_config_changed); C.registerreceiver (Mreceiver, Intentfilter); Receive processing of action_carrier_config_changed messages}
Receive uicccardapplication notifications, message Event_app_ready, event_app_locked processing:
Try Switch (msg.what) { case event_app_ready: onready (); Break ; Case event_app_locked: onlocked (); Break ; }
Onready () method, call Fetchsimrecords () directly, and start loading the EF file information here:
The specific process of reading the SIM card EF file information is implemented by Iccfilehandler, depending on the type of EF file, calling different methods Loadeftransparent () and loadeflinearfixed (), which will eventually call Rilj Iccioforapp () method;
protected voidfetchsimrecords () {if(DBG) log ("Fetchsimrecords" +mrecordstoload); Mci.getimsiforapp (Mparentapp.getaid (), Obtainmessage (Event_get_imsi_done));//Get IMSI information, return the data in the class Handlemessage () Medium Processing Mrecordstoload++; Without reading a message, the count value is added 1 mfh.loadeftransparent (ef_iccid, Obtainmessage (Event_get_iccid_done));//Get ICCID Mrecordstolo Ad++; //same goes for call Forward Status Indicator:fetch both//Ef[cfis] and Cphs-ef, with Ef[cfis] preferred.loadcallforwardingrecords (); GETSPNFSM (true,NULL); LOADEFLIANDEFPL (); if(crash_ril) {String SMS= "0107912160130310f20404d0110041007030208054832b0120" + "ffffffffffffffffffffffffffffffffffffffff Fffffffffffffffffffffffffffff "+" ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff FFF "+" FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF " + "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + "ffffffffffffffffff Ffffffffffff "; byte[] ba =iccutils.hexstringtobytes (SMS); Mfh.updateeflinearfixed (Ef_sms,1, BA,NULL, Obtainmessage (Event_mark_sms_read_done,1)); } if(DBG) log ("Fetchsimrecords" + Mrecordstoload + "requested:" +mrecordsrequested); }
Kaifyou Android 7.0 UICC Analysis (iv)