Omacp收到network Pin之后,会要求输入Pin码

来源:互联网 发布:淘宝的周期怎么算 编辑:程序博客网 时间:2024/04/29 01:58

在国外,Omacp收到network Pin的时候,手机会显示输入Pin码,这不符合Omacp的测试规范。


这是因为,在国内,Omacp如果收到network pin,标准的sec值是“”,但是在国外,标准的sec值是0,所以如果针对国外项目,需要进行修改。如下:

请在OmacpReceiverService.java里面添加如下代码:
 1.//new added begin
   if(sec!=null){
        if (sec.equalsIgnoreCase("0")) {
        sec = "";
   }
  }else
   return false;//这里return true或者false,也要看运营商的需求,有的运营商要求,sec=null的时候直接返回不处理,但是国内要求sec=null的时候,继续解析

        //new added end
        // sec == "" indicates Network PIN, in this case, check SIM's IMSI, if
        // verify fails, then ignore this message
        if (sec != null && sec.equalsIgnoreCase("") && mac != null && !mac.equalsIgnoreCase("")) {
2.parseOmacpMessage
方法
//new added begin
        if (sec.equalsIgnoreCase("0")) {
        sec = "";
        }
        //new added end
        if (sec == null || mac == null || sec.equalsIgnoreCase("") || mac.equalsIgnoreCase("")) {
            value.put("pin_unlock", 1);
3.
如果是单卡的话,并修改这里OmacpMessageSettingDetails.java:
 Public static String getSimImsi(int simId) {
                String imsi;
                TelephonyManagerEx mTelephonyManager = TelephonyManagerEx.getDefault();
               Imsi = mTelephonyManager.getSubscriberId(sinId);
}

0 0
原创粉丝点击