From: hcj <1224667075@qq.com> Date: Fri, 15 Nov 2024 04:55:36 +0000 (+0800) Subject: 增加电话mic控制限制,仅可在正式通话中才能控制 X-Git-Tag: fd230_release_V1.3.102~71^2~4 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F1406%2F5;p=mirrors%2FFD230.git 增加电话mic控制限制,仅可在正式通话中才能控制 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/Bluetooyhpabpserver.cpp b/code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/Bluetooyhpabpserver.cpp index a696b6d8b..f5e305c85 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/Bluetooyhpabpserver.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/Bluetooyhpabpserver.cpp @@ -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); diff --git a/code/sdk/application/wearable/fd230app/nativeui/callerlog/include/CallerLogModel.h b/code/sdk/application/wearable/fd230app/nativeui/callerlog/include/CallerLogModel.h index d3f7ff941..412a54f1d 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/callerlog/include/CallerLogModel.h +++ b/code/sdk/application/wearable/fd230app/nativeui/callerlog/include/CallerLogModel.h @@ -85,6 +85,7 @@ typedef enum { void Setphonebname(char *name,uint8_t name_len) { call_name.clear(); + if(name_len) call_name.append(reinterpret_cast(name), name_len); //printf("%s\r\n",call_name.c_str()); diff --git a/code/sdk/application/wearable/fd230app/nativeui/callerlog/src/CallerLogModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/callerlog/src/CallerLogModel.cpp index efcfb4f6f..a10b13b7f 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/callerlog/src/CallerLogModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/callerlog/src/CallerLogModel.cpp @@ -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); diff --git a/code/sdk/application/wearable/fd230app/nativeui/makephone/src/CallingView.cpp b/code/sdk/application/wearable/fd230app/nativeui/makephone/src/CallingView.cpp index 31e0f79b7..165b6bb02 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/makephone/src/CallingView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/makephone/src/CallingView.cpp @@ -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"); diff --git a/code/sdk/application/wearable/fd230app/nativeui/makephone/src/MainCallingPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/makephone/src/MainCallingPresenter.cpp index 267997cf6..0e2d46afc 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/makephone/src/MainCallingPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/makephone/src/MainCallingPresenter.cpp @@ -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