记录下android6.0的pin锁卡流程
settings里在IccLockSettings.java 类中的 tryChangeIccLockState方法中调用Phone类
Phone类mPhone.getIccCard().setIccLockEnabled(mToState, mPin, callback)
setIccLockEnabled是在IccCard类中的一个方法 IccCard是一个interface 由IccCardProxy.java实现这个interface
并在IccCardProxy.java中的setIccLockEnabled方法中调用UiccCardApplication.setIccLockEnabled
UiccCardApplication是一个工具类,调用此类的构参(在Phone进程内有多个对象调用此构参,后续待研究)会将CommandsInterface传给UiccCardApplication.
在此工具类中的setIccLockEnabled方法内调用CommandsInterface.setFacilityLockForApp
实现CommandsInterface的类有5个: BaseCommands.java
ImsPhoneCommandInterface.java(继承的是BaseCommands)
RIL.java
SimulatedCommands.java
SipCommandInterface.java
RIL.java负责与RIL.C通信
主要通信在RIL.java类中
RIL.java的setFacilityLock方法内有一个setFacilityLockForApp函数,该函数内有一个send函数,通过这个send发送一个event后使用LocalSocket.getOutputStream().write把pin数据写入并传递给RIL.C
RIL.C负责与modem通信