[ril]通过urc获取sim_state

Change-Id: I70663ac2ba9a7a718aad0923cf0eca629e4b63c6
diff --git a/mbtk/mbtk_rild/src/main.c b/mbtk/mbtk_rild/src/main.c
old mode 100755
new mode 100644
index 5812948..7ca1a31
--- a/mbtk/mbtk_rild/src/main.c
+++ b/mbtk/mbtk_rild/src/main.c
@@ -609,6 +609,11 @@
     // *SIMDETEC:1,SIM

     else if(strStartsWith(s, "*SIMDETEC:"))

     {

+        if(strStartsWith(s, "*SIMDETEC:1,NOS"))

+        {

+            net_info.sim_state = MBTK_SIM_ABSENT;

+        }

+       

         sim_info_reg.sim = -1;

         if(strStartsWith(s, "*SIMDETEC:1,NOS"))

             sim_info_reg.sim = 0;

@@ -650,41 +655,95 @@
     {

         sim_info_reg.sim = -1;

         if(strStartsWith(s, "+CPIN: READY"))

+        {

             sim_info_reg.sim = 1;

+            net_info.sim_state = MBTK_SIM_READY;

+        }

         else if(strStartsWith(s, "+CPIN: SIM PIN"))

+        {

             sim_info_reg.sim = 2;

+            net_info.sim_state = MBTK_SIM_PIN;

+        }

         else if(strStartsWith(s, "+CPIN: SIM PUK"))

+        {

             sim_info_reg.sim = 3;

+            net_info.sim_state = MBTK_SIM_PUK;

+        }

         else if(strStartsWith(s, "+CPIN: PH-SIMLOCK PIN"))

+        {

             sim_info_reg.sim = 4;

+            net_info.sim_state = MBTK_SIM_ABSENT;

+        }

         else if(strStartsWith(s, "+CPIN: PH-SIMLOCK PUK"))

+        {

             sim_info_reg.sim = 5;

+            net_info.sim_state = MBTK_SIM_ABSENT;

+        }

         else if(strStartsWith(s, "+CPIN: PH-FSIM PIN"))

+        {

             sim_info_reg.sim = 6;

+            net_info.sim_state = MBTK_SIM_ABSENT;

+        }

         else if(strStartsWith(s, "+CPIN: PH-FSIM PUK"))

+        {

             sim_info_reg.sim = 7;

+            net_info.sim_state = MBTK_SIM_ABSENT;

+        }

         else if(strStartsWith(s, "+CPIN: SIM PIN2"))

+        {

             sim_info_reg.sim = 8;

+            net_info.sim_state = MBTK_SIM_ABSENT;

+        }

         else if(strStartsWith(s, "+CPIN: SIM PUK2"))

+        {

             sim_info_reg.sim = 9;

+            net_info.sim_state = MBTK_SIM_ABSENT;

+        }

         else if(strStartsWith(s, "+CPIN: PH-NET PIN"))

+        {

             sim_info_reg.sim = 10;

+            net_info.sim_state = MBTK_SIM_NETWORK_PERSONALIZATION;

+        }

         else if(strStartsWith(s, "+CPIN: PH-NET PUK"))

+        {

             sim_info_reg.sim = 11;

+            net_info.sim_state = MBTK_SIM_ABSENT;

+        }

         else if(strStartsWith(s, "+CPIN: PH-NETSUB PINMT"))

+        {

             sim_info_reg.sim = 12;

+            net_info.sim_state = MBTK_SIM_ABSENT;

+        }

         else if(strStartsWith(s, "+CPIN: PH-NETSUB PUK"))

+        {

             sim_info_reg.sim = 13;

+            net_info.sim_state = MBTK_SIM_ABSENT;

+        }

         else if(strStartsWith(s, "+CPIN: PH-SP PIN"))

+        {

             sim_info_reg.sim = 14;

+            net_info.sim_state = MBTK_SIM_ABSENT;

+        }

         else if(strStartsWith(s, "+CPIN: PH-SP PUK"))

+        {

             sim_info_reg.sim = 15;

+            net_info.sim_state = MBTK_SIM_ABSENT;

+        }

         else if(strStartsWith(s, "+CPIN: PH-CORP PIN"))

+        {

             sim_info_reg.sim = 16;

+            net_info.sim_state = MBTK_SIM_ABSENT;

+        }

         else if(strStartsWith(s, "+CPIN: PH-CORP PUK"))

+        {

             sim_info_reg.sim = 17;

+            net_info.sim_state = MBTK_SIM_ABSENT;

+        }

         else if(strStartsWith(s, "+CPIN: SIM REMOVED"))

-            sim_info_reg.sim = 18;

+        {

+             sim_info_reg.sim = 18;

+             net_info.sim_state = MBTK_SIM_ABSENT;

+        }

         else

             sim_info_reg.sim = 20;