From bba2262fa21c718a97a464338c6b0e606e97edc5 Mon Sep 17 00:00:00 2001 From: hcj <1224667075@qq.com> Date: Fri, 15 Nov 2024 12:55:36 +0800 Subject: [PATCH] =?utf8?q?=E5=A2=9E=E5=8A=A0=E7=94=B5=E8=AF=9Dmic=E6=8E=A7?= =?utf8?q?=E5=88=B6=E9=99=90=E5=88=B6=EF=BC=8C=E4=BB=85=E5=8F=AF=E5=9C=A8?= =?utf8?q?=E6=AD=A3=E5=BC=8F=E9=80=9A=E8=AF=9D=E4=B8=AD=E6=89=8D=E8=83=BD?= =?utf8?q?=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../fd230app/nativeui/bluetooth/src/Bluetooyhpabpserver.cpp | 2 +- .../fd230app/nativeui/callerlog/include/CallerLogModel.h | 1 + .../fd230app/nativeui/callerlog/src/CallerLogModel.cpp | 2 +- .../wearable/fd230app/nativeui/makephone/src/CallingView.cpp | 5 ++++- .../fd230app/nativeui/makephone/src/MainCallingPresenter.cpp | 4 ++++ 5 files changed, 11 insertions(+), 3 deletions(-) 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 -- 2.17.1