增加电话mic控制限制,仅可在正式通话中才能控制 1406/5
authorhcj <1224667075@qq.com>
Fri, 15 Nov 2024 04:55:36 +0000 (12:55 +0800)
committerhcj <1224667075@qq.com>
Fri, 15 Nov 2024 04:55:36 +0000 (12:55 +0800)
code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/Bluetooyhpabpserver.cpp
code/sdk/application/wearable/fd230app/nativeui/callerlog/include/CallerLogModel.h
code/sdk/application/wearable/fd230app/nativeui/callerlog/src/CallerLogModel.cpp
code/sdk/application/wearable/fd230app/nativeui/makephone/src/CallingView.cpp
code/sdk/application/wearable/fd230app/nativeui/makephone/src/MainCallingPresenter.cpp

index a696b6d..f5e305c 100644 (file)
@@ -473,7 +473,7 @@ void uapi_pbap_cmd_pull_vcard_listing(unsigned char *tell,uint8_t len)
     uint16_t list_offset=0;
     uint8_t order=0;
 
-    OHOS:: CallerLogModel::GetInstance()->Setphonebname("0",1);
+    OHOS:: CallerLogModel::GetInstance()->Setphonebname("",0);
 
     OHOS:: CallerLogModel::GetInstance()->Setphonenumber((char *)tell,len);
     
index d3f7ff9..412a54f 100644 (file)
@@ -85,6 +85,7 @@ typedef enum {
     void Setphonebname(char *name,uint8_t name_len)\r
     {\r
         call_name.clear();\r
+        if(name_len)\r
         call_name.append(reinterpret_cast<const char*>(name), name_len);\r
        \r
         //printf("%s\r\n",call_name.c_str());\r
index efcfb4f..a10b13b 100644 (file)
@@ -144,7 +144,7 @@ void StatusReset(void)
     if(CallerLogModel::GetInstance()->GetCallSource()==CallerLogModel::CallSourceCat1)
     do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_CAT1_AUDIO_STOP, nullptr, 0);
 
-    CallerLogModel::GetInstance()->Setphonebname("0",0);
+    CallerLogModel::GetInstance()->Setphonebname("",0);
     CallerLogModel::GetInstance()->SetCallDial(CallerLogModel::HFP_PHONE_DIAL);
     CallerLogModel::GetInstance()->set_RejectIncomingCall_falg(0);
     NotificationManager::GetInstance()->SetWatchCallStatus(false);
index 31e0f79..165b6bb 100644 (file)
@@ -160,6 +160,8 @@ bool CallingView::InitImageViewDisplay()
     imageMicrophone->SetTouchable(true);
     imageMicrophone->SetViewId("microphoneChange");
 
+   
+
     group->Add(imageMicrophone);
 
     imageHandUp = new UIImageView();
@@ -474,7 +476,8 @@ UIViewGroup *CallingView::CreateUIViewGroup(uint8_t type)
         return nullptr;
     }
     currentTimes->SetTextId(STR_CALLING);    /* code */
-
+    imageMicrophone->SetStyle(STYLE_IMAGE_OPA, 97);
+    
     if(!Initshowdial())
     {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CallingView::InitUILabelDisplay error");
index 267997c..0e2d46a 100644 (file)
@@ -201,6 +201,7 @@ bool MainCallingPresenter::OnClick(UIView& view, const ClickEvent& event)
             }
             else
             {
+                return false;
                 view_->GetScreenView()->GetImageMicrophone()->SetSrc(PNG_230_MICROPHONE_CLOSE_IMAGE_PATH);
             }
             if(CallerLogModel::GetInstance()->GetCallSource() == CallerLogModel::CallSourceCat1)
@@ -222,6 +223,7 @@ bool MainCallingPresenter::OnClick(UIView& view, const ClickEvent& event)
             }
             else
             {
+                return false;
                 view_->GetScreenView()->GetImageMicrophone()->SetSrc(PNG_230_MICROPHONE_OPEN_IMAGE_PATH);
             }
             if(CallerLogModel::GetInstance()->GetCallSource() == CallerLogModel::CallSourceCat1)
@@ -316,6 +318,8 @@ bool MainCallingPresenter::OnClick(UIView& view, const ClickEvent& event)
         {
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MakephoneNotify 11111111 ");
             cat1_call_answer();
+            //incomedcall_event_sendmsg_toUI("ok");
+
             return true;
 
             //#endif