From 04f211a65728e103bca324fed523703da3abedfc Mon Sep 17 00:00:00 2001 From: hcj <1224667075@qq.com> Date: Sat, 3 Aug 2024 11:08:27 +0800 Subject: [PATCH] =?utf8?q?=E5=A2=9E=E5=8A=A0cat1=20DTMF=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../service/ble_service/bleservice/bleANCS.c | 15 +- .../src/notify/makephone_notification.cpp | 371 ++++++++++++++++-- .../slip/cat1Service/cat1_server.cpp | 2 +- 3 files changed, 337 insertions(+), 51 deletions(-) diff --git a/code/sdk/application/wearable/service/ble_service/bleservice/bleANCS.c b/code/sdk/application/wearable/service/ble_service/bleservice/bleANCS.c index 8f0e986b6..1bafd01d5 100644 --- a/code/sdk/application/wearable/service/ble_service/bleservice/bleANCS.c +++ b/code/sdk/application/wearable/service/ble_service/bleservice/bleANCS.c @@ -215,7 +215,7 @@ static uint8_t ble_ancs_client_at_cmd_get_notify_att(uint16_t conn_id,uint32_t n (notify_attr_req->attr+3)->att_max_length=64; (notify_attr_req->attr+4)->att_id=0x06; - (notify_attr_req->attr+4)->att_max_length=10; + (notify_attr_req->attr+4)->att_max_length=1; //decode_att_req_from_str(argv[BT_INDEX_4], notify_attr_req->attr); errcode_t ret = ble_ancs_client_send_get_notify_att_cmd(g_client_id, conn_id, notify_attr_req); @@ -244,13 +244,12 @@ static void ble_ancs_client_setup_result_cbk(uint8_t client_id, uint16_t conn_id { printf("[ANCSClientSetupCBK]conn_id:%d status:0x%x\r\n", conn_id, status); + if(status==ERRCODE_SUCC) + { + int ret = uapi_get_timestampe_ss(&subscribe_notify_creationTime); - int ret = uapi_get_timestampe_ss(&subscribe_notify_creationTime); - - ble_ancs_client_subscribe_notify(conn_id,1); - - - + ble_ancs_client_subscribe_notify(conn_id,1); + } //if(status==ERRCODE_BT_SUCCESS) } @@ -290,7 +289,7 @@ static void ble_ancs_client_notify_source_cbk(uint8_t client_id, uint16_t conn_i uint32_t creationTime=0; int ret = uapi_get_timestampe_ss(&creationTime); //当前时间戳减去订阅通知时间戳3s以上的通知,才要求数据(过滤ios将所有未查看消息发过来) - if(creationTime-subscribe_notify_creationTime>3) + if(creationTime-subscribe_notify_creationTime>5) ble_ancs_client_at_cmd_get_notify_att(conn_id, notify_src->notification_uid); // diff --git a/code/sdk/application/wearable/service/msg_center/src/notify/makephone_notification.cpp b/code/sdk/application/wearable/service/msg_center/src/notify/makephone_notification.cpp index 810812f42..0ab428e18 100755 --- a/code/sdk/application/wearable/service/msg_center/src/notify/makephone_notification.cpp +++ b/code/sdk/application/wearable/service/msg_center/src/notify/makephone_notification.cpp @@ -24,6 +24,8 @@ #include "cat1_server_hal.h" #include "custom_utils.h" #include "phoneaddressmodel.h" +#include "components/ui_label_button.h" +#include "bletest.h" // #define NOTIFY_THREE_SECONDS 3000 // #define NOTIFY_ONE_SECOND 1000 // #define NOTIFY_THIRTY_SECONDS 30000 @@ -77,12 +79,19 @@ UIViewGroup* g_phoneView = nullptr; UIViewGroup* g_multiPhoneView = nullptr; UIViewGroup* g_callingView = nullptr; UIViewGroup* g_waitingHintsView = nullptr; +UIViewGroup* dial_group = nullptr; + VolumeSettingView *g_volumeSetting = nullptr; UIImageView* g_imageAgree = nullptr; UIImageView* g_imageDissgree = nullptr; UIImageView* g_imageMicrophone = nullptr; UIImageView* g_imageHandUp = nullptr; UIImageView* g_imageHorns = nullptr; +UIImageView* g_imagedial = nullptr; +UIImageView* g_imageheadset = nullptr; +UIImageView* g_imageperson = nullptr; + + UIImageView* g_imageDissgreeNew = nullptr; UILabel* g_callerNum = nullptr; UILabel* g_callerDisplay = nullptr; @@ -92,7 +101,10 @@ UILabel* g_comingTimes = nullptr; UILabel* g_newCallHints = nullptr; UILabel* g_newCallNum = nullptr; +UILabelButton* labelButton[12]={nullptr}; +UILabel* label_number = nullptr; +UIImageView *image_line= nullptr; UILabel* callername = nullptr; UIViewGroup* calldialView = nullptr; UILabel *diallabel1 = nullptr; @@ -250,7 +262,7 @@ void StartCallTimer(CallTimerType type, int32_t interval) } break; case CallTimerType::NOTIFY_PHONE_DIAL_DISPLAY: - g_calldialTime = osTimerNew((osTimerFunc_t)CallCurTimerCallBack, osTimerPeriodic, NULL, NULL); + g_calldialTime = osTimerNew((osTimerFunc_t)CalldialTimerCallBackProc, osTimerPeriodic, NULL, NULL); tick = osMs2Tick(interval); retTimer = osTimerStart(g_calldialTime, tick); if (retTimer != osOK && g_calldialTime != NULL) { @@ -366,6 +378,21 @@ static void FreeCallingViewImage(void) delete g_imageHorns; g_imageHorns = nullptr; } + if(g_imagedial) + { + delete g_imagedial; + g_imagedial = nullptr; + } + if(g_imageheadset) + { + delete g_imageheadset; + g_imageheadset = nullptr; + } + if(g_imageperson) + { + delete g_imageperson; + g_imageperson = nullptr; + } } static bool DrawCallingViewImage(void) @@ -374,8 +401,8 @@ static bool DrawCallingViewImage(void) if (g_imageMicrophone == nullptr) { return false; } - g_imageMicrophone->SetPosition(IMAGE_MIC_POSITION_X, IMAGE_ALL_POSITION_Y); - g_imageMicrophone->SetSrc(PNG_MICROPHONE_OPEN_IMAGE_PATH); + g_imageMicrophone->SetPosition(46, 207); + g_imageMicrophone->SetSrc(PNG_230_MICROPHONE_OPEN_IMAGE_PATH); g_imageMicrophone->SetTouchable(true); g_imageMicrophone->SetViewId("microphoneChange"); @@ -384,8 +411,8 @@ static bool DrawCallingViewImage(void) FreeCallingViewImage(); return false; } - g_imageHandUp->SetPosition(IMAGE_HANDUP_POSITION_X, IMAGE_ALL_POSITION_Y); - g_imageHandUp->SetSrc(PNG_DISSGREE_IMAGE_PATH); + g_imageHandUp->SetPosition(188, 340); + g_imageHandUp->SetSrc(PNG_230_VECTOR_IMAGE_PATH); g_imageHandUp->SetTouchable(true); g_imageHandUp->SetViewId("callingHandUp"); @@ -394,11 +421,41 @@ static bool DrawCallingViewImage(void) FreeCallingViewImage(); return false; } - g_imageHorns->SetPosition(IMAGE_HONRS_POSITION_X, IMAGE_HONRS_POSITION_Y); - g_imageHorns->SetSrc(PNG_SOUNDBUTTON2); + g_imageHorns->SetPosition(369, 207); + g_imageHorns->SetSrc(PNG_230_VOICE_OPEN_IMAGE_PATH); g_imageHorns->SetTouchable(true); g_imageHorns->SetViewId("volumeSwitch"); + + g_imagedial = new UIImageView(); + if (g_imagedial == nullptr) { + return false; + } + g_imagedial->SetPosition(80, 296); // 30 : offset + g_imagedial->SetSrc(PNG_230_DIAL_IMAGE_PATH); + g_imagedial->SetTouchable(true); + g_imagedial->SetViewId("dial"); + + + g_imageheadset = new UIImageView(); + if (g_imageheadset == nullptr) { + return false; + } + g_imageheadset->SetPosition(296, 296); // 30 : offset + g_imageheadset->SetSrc(PNG_230_HEADSET_1_IIMAGE_PATH); + g_imageheadset->SetTouchable(true); + g_imageheadset->SetViewId("headset"); + + g_imageperson = new UIImageView(); + if (g_imageperson == nullptr) { + return false; + } + g_imageperson->SetPosition(158, 158); // 30 : offset + g_imageperson->SetSrc(PNG_230_PERSON_IMAGE_PATH); + g_imageperson->SetTouchable(true); + g_imageperson->SetViewId("headset"); + + return true; } @@ -424,39 +481,44 @@ static bool DrawCallingViewUILabel(void) if (g_callerDisplay == nullptr) { return false; } - g_callerDisplay->SetPosition(LABEL_PERCENT_POSITION_X, LABEL_PERCENT_POSITION_Y, - Screen::GetInstance().GetWidth(), TITLE_LABEL_DEFAULT_HEIGHT); + g_callerDisplay->SetPosition(88, 81, + 289, 40); g_callerDisplay->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT); g_callerDisplay->SetText(CallerLogModel::GetInstance()->GetPhoneNumber().c_str()); g_callerDisplay->SetAlign(TEXT_ALIGNMENT_CENTER); g_callerDisplay->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_CALLER_SIZE); g_callerDisplay->SetTextColor(Color::White()); + g_callerDisplay->SetLineBreakMode(UILabel::LINE_BREAK_WRAP); g_callDuration = new UILabel(); if (g_callDuration == nullptr) { FreeCallingViewUILabel(); return false; } - g_callDuration->SetPosition(LABEL_CALLERD_POSITION_X, LABEL_CALLERD_POSITION_Y, - Screen::GetInstance().GetWidth(), TITLE_LABEL_DEFAULT_HEIGHT); + + g_callDuration->SetPosition(194, 38, + 79, 35); g_callDuration->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT); g_callDuration->SetAlign(TEXT_ALIGNMENT_CENTER); g_callDuration->SetText(CallerLogModel::GetInstance()->DisplayCallDuration().c_str()); - g_callDuration->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_CURRENT_SIZE); - g_callDuration->SetTextColor(Color::White()); + g_callDuration->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30); + g_callDuration->SetTextColor(Color::GetColorFromRGBA(0xaa, 0xaa, 0xaa, 0xff)); + + // g_currentTimes = new UILabel(); + // if (g_currentTimes == nullptr) { + // FreeCallingViewUILabel(); + // return false; + // } + // g_currentTimes->SetPosition(LABEL_CURREMTTIME_POSITION_X, LABEL_CURREMTTIME_POSITION_Y, + // Screen::GetInstance().GetWidth(), TITLE_LABEL_DEFAULT_HEIGHT); + // g_currentTimes->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT); + // g_currentTimes->SetAlign(TEXT_ALIGNMENT_CENTER); + // g_currentTimes->SetText(CallerLogModel::GetInstance()->InitDateHourTime().c_str()); + // g_currentTimes->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_CURRENT_SIZE); + // g_currentTimes->SetTextColor(Color::White()); + + - g_currentTimes = new UILabel(); - if (g_currentTimes == nullptr) { - FreeCallingViewUILabel(); - return false; - } - g_currentTimes->SetPosition(LABEL_CURREMTTIME_POSITION_X, LABEL_CURREMTTIME_POSITION_Y, - Screen::GetInstance().GetWidth(), TITLE_LABEL_DEFAULT_HEIGHT); - g_currentTimes->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT); - g_currentTimes->SetAlign(TEXT_ALIGNMENT_CENTER); - g_currentTimes->SetText(CallerLogModel::GetInstance()->InitDateHourTime().c_str()); - g_currentTimes->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_CURRENT_SIZE); - g_currentTimes->SetTextColor(Color::White()); return true; } @@ -676,6 +738,8 @@ void FreeCalldialView(void) { if (calldialView != nullptr) { DisableCallTimer(CallTimerType::NOTIFY_PHONE_CALLING_DISPLAY); + DisableCallTimer(CallTimerType::NOTIFY_PHONE_DIAL_DISPLAY); + calldialView->RemoveAll(); if(diallabel1!=NULL) { @@ -694,7 +758,7 @@ void FreeCalldialView(void) delete button1dial; button1dial =nullptr; } - DisableCallTimer(CallTimerType::NOTIFY_PHONE_DIAL_DISPLAY); + RootView::GetInstance()->Remove(calldialView); delete calldialView; calldialView = nullptr; @@ -741,13 +805,23 @@ UIViewGroup* CreateCalldialView(void) diallabl2 = new UILabel(); } - diallabl2->SetPosition(LABEL_PERCENT_POSITION_X, LABEL_PERCENT_POSITION_Y, - Screen::GetInstance().GetWidth(), TITLE_LABEL_DEFAULT_HEIGHT); - diallabl2->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT); - diallabl2->SetText(CallerLogModel::GetInstance()->GetPhoneNumber().c_str()); - diallabl2->SetAlign(TEXT_ALIGNMENT_CENTER); - diallabl2->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_CALLER_SIZE); - diallabl2->SetTextColor(Color::White()); + diallabl2->SetPosition(LABEL_PERCENT_POSITION_X, LABEL_PERCENT_POSITION_Y, + Screen::GetInstance().GetWidth(), TITLE_LABEL_DEFAULT_HEIGHT); + diallabl2->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT); + + char name_buf[30]={0}; + + if(get_phone_addrss_name(name_buf,CallerLogModel::GetInstance()->GetPhoneNumber().c_str())) + { + diallabl2->SetText(name_buf); + } + else + diallabl2->SetText(CallerLogModel::GetInstance()->GetPhoneNumber().c_str()); + + + diallabl2->SetAlign(TEXT_ALIGNMENT_CENTER); + diallabl2->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_CALLER_SIZE); + diallabl2->SetTextColor(Color::White()); // Add to rootView @@ -816,8 +890,9 @@ UIViewGroup* CreateMultiplePhoneView(void) g_multiPhoneView->Add(g_imageMicrophone); g_multiPhoneView->Add(g_imageHandUp); g_multiPhoneView->Add(g_imageHorns); + g_multiPhoneView->Add(g_callerDisplay); - g_multiPhoneView->Add(g_callDuration); + //g_multiPhoneView->Add(g_callDuration); g_multiPhoneView->Add(g_currentTimes); g_multiPhoneView->SetDraggable(true); g_multiPhoneView->SetTouchable(true); @@ -848,6 +923,119 @@ void FreeMultiplePhoneCallView(void) g_volumeSetting = nullptr; } } +static char *dial_id_str[]={"1","2","3","4","5","6","7","8","9","*","0","#"}; + + + +bool Initshowdial() +{ + dial_group = new UIViewGroup(); + if (dial_group == nullptr) { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CallingView::UIViewGroup::new group error"); + return false; + } + dial_group->SetPosition(MATH_ZERO, MATH_ZERO); + dial_group->Resize(466, 466); // 454 : value + dial_group->SetViewId("dialing"); + dial_group->SetTouchable(true); + dial_group->SetDraggable(true); + + uint8_t showdial_i=0; + for(int i=0;i<4;i++) + { + for(int j=0;j<3;j++) + { + if (labelButton[showdial_i] == nullptr) { + labelButton[showdial_i] = new UILabelButton(); + } + if(labelButton[showdial_i]==nullptr) + { + return false; + } + labelButton[showdial_i]->SetPosition(69+(j*111), 107+(i*78)); // widget's left position and top position + + labelButton[showdial_i]->Resize(107, 70); // widget's width and height + labelButton[showdial_i]->SetViewId(dial_id_str[showdial_i]);// Set style + labelButton[showdial_i]->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919); + + labelButton[showdial_i]->SetText(dial_id_str[showdial_i]); + labelButton[showdial_i]->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 40); + labelButton[showdial_i]->SetStyleForState(STYLE_BORDER_COLOR, 0xff0b1928, UIButton::PRESSED); + + dial_group->Add(labelButton[showdial_i]); + labelButton[showdial_i]->SetVisible(true); + showdial_i++; + } + } + + if (image_line == nullptr) { + image_line = new UIImageView(); + } + if(image_line == nullptr) + { + return false; + } + image_line->SetPosition(193, 25); // widget's left position and top position + image_line->Resize(80, 8); // widget's width and height + image_line->SetViewId("image1");// Set style + image_line->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919); + image_line->SetStyle(STYLE_BACKGROUND_OPA, 0xff); + image_line->SetStyle(STYLE_BORDER_RADIUS, 100); + + dial_group->Add(image_line); + image_line->SetVisible(true); + + // Add Label to App + if (label_number == nullptr) { + label_number = new UILabel(); + } + if(label_number == nullptr) + { + return false; + } + label_number->SetPosition(100, 43); // widget's left position and top position + label_number->Resize(265, 60); // widget's width and height + label_number->SetViewId("label3");// Set style + label_number->SetStyle(STYLE_TEXT_FONT, 40); + + // Set additional property + label_number->SetText(""); + label_number->SetLineBreakMode(UILabel::LINE_BREAK_ELLIPSIS); + label_number->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); + label_number->SetRollSpeed(0); + label_number->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 40); + dial_group->Add(label_number); + dial_group->SetVisible(false); + + return true; +} + +void showdial(bool flag) +{ + if(flag) + { + label_number->SetText(""); + dial_group->SetVisible(true); + } + else + { + dial_group->SetVisible(false); + } + return; +} + +void text_updata_buf(const char *buf) +{ + char new_buf[16]={0}; + SendDtfmStrNumberToCat1(buf[0]); + const char*text_buf=label_number->GetText(); + sprintf_s(new_buf,16,"%s%s",text_buf,buf); + label_number->SetText(new_buf); + RootView::GetInstance()->Invalidate(); + return; +} + + UIViewGroup* CreateCallingView(void) { g_callingView = new UIViewGroup(); @@ -870,19 +1058,40 @@ UIViewGroup* CreateCallingView(void) g_callingView = nullptr; return nullptr; } + Initshowdial(); + g_callingView->Add(g_imageMicrophone); g_callingView->Add(g_imageHandUp); g_callingView->Add(g_imageHorns); + + g_callingView->Add(g_imagedial); + g_callingView->Add(g_imageheadset); + g_callingView->Add(g_imageperson); + g_callingView->Add(g_callerDisplay); - g_callingView->Add(g_callDuration); + //g_callingView->Add(g_callDuration); g_callingView->Add(g_currentTimes); g_callingView->SetDraggable(true); g_callingView->SetTouchable(true); + g_callingView->Add(dial_group); UIView::OnClickListener *clickListener = static_cast\ - (OHOS::CallViewEventListener::GetInstance()); + (OHOS::CallViewEventListener::GetInstance()); + + + UIView::OnDragListener * dragListener = (UIView::OnDragListener*)OHOS::CallViewEventListener::GetInstance(); + dial_group->SetOnDragListener(dragListener); + g_imageMicrophone->SetOnClickListener(clickListener); g_imageHandUp->SetOnClickListener(clickListener); g_imageHorns->SetOnClickListener(clickListener); + g_imagedial->SetOnClickListener(clickListener); + + + for( int i=0;i<12;i++) + { + labelButton[i]->SetOnClickListener(clickListener); + } + StartCallTimer(CallTimerType::NOTIFY_PHONE_CALLING_DISPLAY, NOTIFY_ONE_SECOND); StartCallTimer(CallTimerType::NOTIFY_PHONE_CURTIME_DISPLAY, NOTIFY_THIRTY_SECONDS); NotificationManager::GetInstance()->SetVolumeScreenStatus(false); @@ -906,6 +1115,25 @@ void FreeCallingView(void) RootView::GetInstance()->Remove(g_callingView); delete g_callingView; g_callingView = nullptr; + + if(dial_group) + { + dial_group->RemoveAll(); + for( int i=0;i<12;i++) + { + delete labelButton[i]; + labelButton[i]=nullptr; + } + delete image_line; + image_line= nullptr; + + + delete label_number; + label_number= nullptr; + + delete dial_group; + dial_group = nullptr; + } } if (g_volumeSetting != nullptr) { delete g_volumeSetting; @@ -1021,10 +1249,15 @@ bool CallViewEventListener::OnDragEnd(OHOS::UIView& view, const OHOS::DragEvent& if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "xxxxxxxxxxxxxxx"); - g_volumeSetting->SetVisible(false); - unsigned char volumeValue; - volumeValue = (unsigned char) ((double) (g_volumeSetting->sounding * CALL_VOLUME_MAX) / (VOLUME_MAX - VOLUME_MIN)); // 音量转换 - SetSpeakerVolume(volumeValue); + if((strcmp(view.GetViewId(), "dialing") == 0)) + showdial(false); + else + { + g_volumeSetting->SetVisible(false); + unsigned char volumeValue; + volumeValue = (unsigned char) ((double) (g_volumeSetting->sounding * CALL_VOLUME_MAX) / (VOLUME_MAX - VOLUME_MIN)); // 音量转换 + SetSpeakerVolume(volumeValue); + } return true; } @@ -1110,11 +1343,11 @@ bool CallViewEventListener::OnClick(UIView& view, const ClickEvent& event) else if (strcmp(view.GetViewId(), "microphoneChange") == 0) { if (g_changeImage == 0) { g_changeImage = 1; - RefreshMicrophoneImageSrc(PNG_MICROPHONE_CLOSE_IMAGE_PATH); + RefreshMicrophoneImageSrc(PNG_230_MICROPHONE_CLOSE_IMAGE_PATH); SetMicMute(true); } else { g_changeImage = 0; - RefreshMicrophoneImageSrc(PNG_MICROPHONE_OPEN_IMAGE_PATH); + RefreshMicrophoneImageSrc(PNG_230_MICROPHONE_OPEN_IMAGE_PATH); SetMicMute(false); } return true; @@ -1125,6 +1358,60 @@ bool CallViewEventListener::OnClick(UIView& view, const ClickEvent& event) return false; } } + else if ((strcmp(view.GetViewId(), "dial") == 0)) + { + showdial(true); + } + if (strcmp(view.GetViewId(), "0") == 0) + { + text_updata_buf(view.GetViewId()); + } + else if (strcmp(view.GetViewId(), "1") == 0) + { + text_updata_buf(view.GetViewId()); + } + else if (strcmp(view.GetViewId(), "2") == 0) + { + text_updata_buf(view.GetViewId()); + } + else if (strcmp(view.GetViewId(), "3") == 0) + { + text_updata_buf(view.GetViewId()); + } + else if (strcmp(view.GetViewId(), "4") == 0) + { + text_updata_buf(view.GetViewId()); + } + else if (strcmp(view.GetViewId(), "5") == 0) + { + text_updata_buf(view.GetViewId()); + } + else if (strcmp(view.GetViewId(), "6") == 0) + { + text_updata_buf(view.GetViewId()); + } + else if (strcmp(view.GetViewId(), "7") == 0) + { + text_updata_buf(view.GetViewId()); + } + else if (strcmp(view.GetViewId(), "8") == 0) + { + text_updata_buf(view.GetViewId()); + } + else if (strcmp(view.GetViewId(), "9") == 0) + { + text_updata_buf(view.GetViewId()); + }else if (strcmp(view.GetViewId(), "*") == 0) + { + text_updata_buf(view.GetViewId()); /* code */ + } + else if (strcmp(view.GetViewId(), "#") == 0) + { + text_updata_buf(view.GetViewId()); + } + + + return true; } } // namespace OHOS \ No newline at end of file diff --git a/code/sdk/drivers/peripheral/slip/cat1Service/cat1_server.cpp b/code/sdk/drivers/peripheral/slip/cat1Service/cat1_server.cpp index 696d4792c..704eb0e58 100644 --- a/code/sdk/drivers/peripheral/slip/cat1Service/cat1_server.cpp +++ b/code/sdk/drivers/peripheral/slip/cat1Service/cat1_server.cpp @@ -1135,7 +1135,7 @@ void set_dmp_cm_address_toCat1(char *address)//设置保存移动入库下发的 } void send_dtfm_number_toCat1(char ch)//发送dtfm { - printf("ch:%s\r\n",&ch); + printf("ch:%c\r\n",ch); udp_send_msg_toCat1(UDP_MSG_SEND_DTMF_NUMBER,&ch); } static int udp_packet_parse(char *rx_buffer, int len) -- 2.17.1