[Bugfix][API-363]two sim sleep

Change-Id: Ia0a6d3b4cf8126a562e497340dffe267f8b17db5
diff --git a/framework/lynq-ril-service/src/ril.cpp b/framework/lynq-ril-service/src/ril.cpp
index b2e89a7..b001748 100755
--- a/framework/lynq-ril-service/src/ril.cpp
+++ b/framework/lynq-ril-service/src/ril.cpp
@@ -5155,6 +5155,8 @@
         case LYNQ_REQUEST_DELETE_SMS_FROM_MEMORY: return "LYNQ_REQUEST_DELETE_SMS_FROM_MEMORY";
         case LYNQ_REQUEST_LIST_SMS_FROM_MEMORY: return "LYNQ_REQUEST_LIST_SMS_FROM_MEMORY";
         case LYNQ_REQUEST_SET_DEFAULT_SIM_ALL:return "SET_DEFAULT_SIM_ALL";
+        case LYNQ_REQUEST_CHANGE_SCREEN_STATE:return "LYNQ_REQUEST_CHANGE_SCREEN_STATE";/*jb.qi add for two sim sleep 2022/9/19*/
+        /*warren add for t800 ril service 2022/1/22 end*/
         default: return "<unknown request>";
     }
 }
@@ -5420,6 +5422,7 @@
         case LYNQ_REQUEST_DELETE_SMS_FROM_MEMORY: return "LYNQ_REQUEST_DELETE_SMS_FROM_MEMORY";
         case LYNQ_REQUEST_LIST_SMS_FROM_MEMORY: return "LYNQ_REQUEST_LIST_SMS_FROM_MEMORY";
         case LYNQ_REQUEST_SET_DEFAULT_SIM_ALL:return "SET_DEFAULT_SIM_ALL";
+        case LYNQ_REQUEST_CHANGE_SCREEN_STATE:return "LYNQ_REQUEST_CHANGE_SCREEN_STATE";/*jb.qi add for two sim sleep 2022/9/19*/
         /*warren add for t800 ril service 2022/1/22 end*/
         default: return "<unknown request>";
     }
@@ -5527,6 +5530,38 @@
     }
 }
 
+/**@brief pass the change screen state request to the executing function
+*@param   request  type: [IN] requestID
+*@param   slot_id  type: [IN] simID
+*@param   argv  type: [IN] getScreenState's argv 
+*@author  jb.qi
+*@date    2022/09/19
+*/
+void lynq_sendRequestToMd(int request, int slot_id, char **argv, struct sockaddr_in lynqClient_addr, int utoken)
+{
+    RequestInfo* info = creatRILInfoAndInit(request, UDP, (RIL_SOCKET_ID) ((slot_id)));
+    info->uToken = utoken;
+    info->lynqEvent = 2;
+    info->uClient_addr.sin_family = lynqClient_addr.sin_family;
+    info->uClient_addr.sin_addr.s_addr = lynqClient_addr.sin_addr.s_addr;
+    info->uClient_addr.sin_port = lynqClient_addr.sin_port;
+    switch(request){
+        case RIL_REQUEST_SCREEN_STATE:
+        {
+            int waittoken = info->token;
+            RLOGD("getScreenState\n");
+            getScreenState(2, argv, (RIL_SOCKET_ID) ((slot_id)), info);
+            waitResponse(waittoken);
+            break;
+        }
+        default:
+            RLOGD("dont support %d in init", slot_id);
+            if(info) {
+                free(info);
+            }
+    }
+}
+
 static void init(int id) {
     int waittoken;
     RIL_RadioState radioState = CALL_ONSTATEREQUEST((RIL_SOCKET_ID )id);
@@ -6001,6 +6036,17 @@
                     // FIXME this should perhaps return a response
                     continue;
                 }
+                /*jb.qi add for two sim suspend 2022/9/19 */
+                if(request == LYNQ_REQUEST_CHANGE_SCREEN_STATE)
+                {
+                    int i;
+                    RLOGD("lynq_request_change_screen_state");
+                    for(i=0;i<2;i++) //suspend sim0 and sim1
+                    {
+                        lynq_sendRequestToMd(RIL_REQUEST_SCREEN_STATE, i, argv, lynqClient_addr, client_tmp->uToken);
+                    }
+                    continue;
+                }
                 RLOGD("REQUEST: %s ParamterNum:%d", requestToString(request), argc);
                 RequestInfo *pRI  = creatRILInfoAndInit(request, UDP, (RIL_SOCKET_ID)(id));
                 pRI->uToken = client_tmp->uToken;