Kaifyou Android 7.0 UICC Analysis (iv)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.