test_cat1
authorhcj <1224667075@qq.com>
Sat, 16 Mar 2024 09:56:20 +0000 (17:56 +0800)
committerhcj <1224667075@qq.com>
Sat, 16 Mar 2024 09:56:20 +0000 (17:56 +0800)
code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp

index 885cc51..1e062ee 100755 (executable)
@@ -171,6 +171,13 @@ void MsgCenterNotifyChargePlugProc(const Topic topic, Request* req)
     unused(topic);
     WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "MsgCenterNotifyProc:: CHarger Plug !");
     DialModelCharge::GetInstance()->UpdateChargeStuaut(1);
+
+    testCHANINGView *t=testCHANINGView::GetInstance();
+    if(t!=NULL)
+    {
+         t->ChangeViewcolor(true);
+    }
+   
 }
 
 void MsgCenterNotifyChargeUnPlugProc(const Topic topic, Request* req)
@@ -179,6 +186,11 @@ void MsgCenterNotifyChargeUnPlugProc(const Topic topic, Request* req)
     unused(topic);
     WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "MsgCenterNotifyProc:: CHarger UnPlug !");
     DialModelCharge::GetInstance()->UpdateChargeStuaut(0);
+    testCHANINGView *t=testCHANINGView::GetInstance();
+    if(t!=NULL)
+    {
+        t->ChangeViewcolor(false);
+    }
 }
 #endif
 void MsgCenterNotifyNextDayProc(const Topic topic, Request* req)
@@ -465,7 +477,9 @@ void MsgCenterNotifyCat1SignalUpdateProc(const Topic topic, Request* req)
         tokbuf=strtok(NULL,",");
         cat1_msg_T.signal=atoi(tokbuf);
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "%d",cat1_msg_T.signal);
-        testcat1View::GetInstance()->setcat1msg(cat1_msg_T);
+        testcat1View* t=testcat1View::GetInstance();
+        if(t!=NULL)
+        t->setcat1msg(cat1_msg_T);
     }
     else if(strcmp(tokbuf,"pyVer")==0)
     {
@@ -479,7 +493,9 @@ void MsgCenterNotifyCat1SignalUpdateProc(const Topic topic, Request* req)
         cat1_ver_T.modem_version=(char*)malloc(strlen(tokbuf));
         strcpy( cat1_ver_T.modem_version,tokbuf);
     
-        testcat1View::GetInstance()->setcat1vermsg(cat1_ver_T);
+        testcat1View* t=testcat1View::GetInstance();
+        if(t!=NULL)
+        t->setcat1vermsg(cat1_ver_T);
 
     }