增加在HFP通话中的 DTMF服务(既通话中拨号盘) 612/1
authorhcj <1224667075@qq.com>
Mon, 29 Jul 2024 08:43:15 +0000 (16:43 +0800)
committerhcj <1224667075@qq.com>
Mon, 29 Jul 2024 08:43:15 +0000 (16:43 +0800)
19 files changed:
code/sdk/application/wearable/fd230app/nativelauncher/include/UiConfig.h
code/sdk/application/wearable/fd230app/nativeui/makephone/include/CallingView.h
code/sdk/application/wearable/fd230app/nativeui/makephone/include/MainCallingPresenter.h
code/sdk/application/wearable/fd230app/nativeui/makephone/src/CallingView.cpp
code/sdk/application/wearable/fd230app/nativeui/makephone/src/MainCallingPresenter.cpp
code/sdk/application/wearable/fd230app/nativeui/phone/src/PhoneCallView.cpp
code/sdk/application/wearable/fd230app/nativeui/phone/src/PhoneDirView.cpp
code/sdk/application/wearable/fd230app/nativeui/phoneservice/include/PhoneService.h
code/sdk/application/wearable/fd230app/nativeui/phoneservice/src/PhoneService.cpp
code/sdk/application/wearable/nativeapp/nativeui/makephone/src/MainCallingPresenter.cpp
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/makephone/Ellipse 4.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/makephone/dial.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/makephone/headset_1.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/makephone/headset_2.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/makephone/microphone.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/makephone/microphone_1.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/makephone/person.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/makephone/vector.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/makephone/voice.bin [new file with mode: 0644]

index 28fdf4f..cd673ee 100644 (file)
@@ -122,6 +122,16 @@ namespace OHOS
     static constexpr const char *PNG_CALLER_TMAGE_PATH = APP_RES_PATH "/CALLER_LOG_IMAGE.bin";
     static constexpr const char *PNG_NO_CALLER_LOG_IMAGE = APP_RES_PATH "/NO_CALLER_LOG_IMAGE.bin";
     static constexpr const char *PNG_SOUNDBUTTON2 = APP_RES_PATH "/SOUND_IMAGE.bin";
+
+    /* ----------------------------------- 打电话图片(230) ---------------------------------- */
+    static constexpr const char *PNG_230_MICROPHONE_OPEN_IMAGE_PATH = APP_RES_PATH "/makephone/microphone.bin";
+    static constexpr const char *PNG_230_MICROPHONE_CLOSE_IMAGE_PATH = APP_RES_PATH "/makephone/microphone_1.bin";
+    static constexpr const char *PNG_230_VOICE_OPEN_IMAGE_PATH = APP_RES_PATH "/makephone/voice.bin";
+    static constexpr const char *PNG_230_PERSON_IMAGE_PATH = APP_RES_PATH "/makephone/person.bin";
+    static constexpr const char *PNG_230_VECTOR_IMAGE_PATH = APP_RES_PATH "/makephone/vector.bin";
+    static constexpr const char *PNG_230_DIAL_IMAGE_PATH = APP_RES_PATH "/makephone/dial.bin";
+    static constexpr const char *PNG_230_HEADSET_1_IIMAGE_PATH = APP_RES_PATH "/makephone/headset_1.bin";
+    static constexpr const char *PNG_230_HEADSET_2_IIMAGE_PATH = APP_RES_PATH "/makephone/headset_2.bin";
     /* ---------------------------------- 血氧中图片 --------------------------------- */
     static constexpr const char *PNG_BLOODOXYGEN_IMAGE_PATH = APP_RES_PATH "/BLOODOXYGEN_VIEW.bin";
     static constexpr const char *PNG_PULLBUTTON_FACE_IMAGE = APP_RES_PATH "/BLOOD_FLOW_IMAGE_01.bin";
index a82d4a6..a271c9e 100644 (file)
@@ -16,7 +16,7 @@
 #include "ohos_types.h"
 #include "UiConfig.h"
 #include "ChangeSliceListener.h"
-
+#include "components/ui_label_button.h"
 
 namespace OHOS {
 class CallingView {
@@ -28,19 +28,36 @@ public:
     static CallingView *GetInstance();
     UILabel *GetCallingDisplayLabel();
     UILabel *GetCallingDurationLabel();
+    void showdial(bool);
+    void text_updata_buf(const char *buf);
 private:
     bool InitAddOnclickevent(void);
     bool InitImageViewDisplay(void);
     bool InitUILabelDisplay(void);
+    bool Initshowdial(void);
 
-    UIImageView *imageMicrophone{nullptr};
+    
     UIViewGroup *group{nullptr};
     UIView::OnClickListener* clickLeftListener{nullptr};
+    UIView:: OnDragListener* dragListener{nullptr};
+
+    UIImageView *imageMicrophone{nullptr};
+
     UIImageView *imageHandUp{nullptr};
     UIImageView *imageHorns{nullptr};
+
+    UIImageView *imagedial{nullptr};
+    UIImageView *imageheadset{nullptr};
+
+    UIImageView *imageperson{nullptr};
     UILabel *callerDisplay{nullptr};
     UILabel *currentTimes{nullptr};
     UILabel *callDuration{nullptr};
+
+    UIViewGroup *dial_group{nullptr};
+    UILabelButton* labelButton[12]={nullptr};
+    UIImageView *image_line{nullptr};
+    UILabel * label_number{nullptr};
 };
 }
 
index 9973279..b2093b6 100644 (file)
@@ -16,7 +16,9 @@
 
 namespace OHOS {
 class MainCallingView;
-class MainCallingPresenter : public Presenter<MainCallingView>, public UIView::OnClickListener {
+class MainCallingPresenter : public Presenter<MainCallingView>,
+                             public UIView::OnClickListener ,
+                             public UIView::OnDragListener{
 public:
     MainCallingPresenter();
     ~MainCallingPresenter() override;
@@ -31,6 +33,8 @@ public:
     bool CallingViewDisplay();
     bool InitPointerValue();
     bool OnClick(UIView& view, const ClickEvent& event) override;
+    
+    bool OnDragEnd(UIView &view, const DragEvent &event) override;
     VolumeSettingView *GetvolumeSetting();
 private:
     int changeImage{0};
index 3034ea7..ac557a5 100644 (file)
@@ -8,7 +8,7 @@
 #include "MainCallingPresenter.h"
 #include "wearable_log.h"
 #include "UiConfig.h"
-
+#include "PhoneService.h"
 
 namespace OHOS {
 static constexpr uint16 MATH_ZERO = 0;
@@ -68,6 +68,26 @@ CallingView::~CallingView()
     delete group;
     group = 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;
+    }
+    
+
     g_pMainView = nullptr;
 }
 
@@ -86,7 +106,13 @@ bool CallingView::InitAddOnclickevent()
     imageMicrophone->SetOnClickListener(clickLeftListener);
     imageHandUp->SetOnClickListener(clickLeftListener);
     imageHorns->SetOnClickListener(clickLeftListener);
+    imagedial->SetOnClickListener(clickLeftListener);
 
+
+    for( int i=0;i<12;i++)
+    {
+        labelButton[i]->SetOnClickListener(clickLeftListener);
+    }
     return true;
 }
 
@@ -102,18 +128,19 @@ bool CallingView::InitImageViewDisplay()
     if (imageMicrophone == nullptr) {
         return false;
     }
-    imageMicrophone->SetPosition(IMAGE_AGREEING_POSITION_X, IMAGE_ALL_POSITION_Y); // 30 :  offset
-    imageMicrophone->SetSrc(PNG_MICROPHONE_OPEN_IMAGE_PATH);
+    imageMicrophone->SetPosition(46, 207); // 30 :  offset
+    imageMicrophone->SetSrc(PNG_230_MICROPHONE_OPEN_IMAGE_PATH);
     imageMicrophone->SetTouchable(true);
     imageMicrophone->SetViewId("microphoneChange");
+
     group->Add(imageMicrophone);
 
     imageHandUp = new UIImageView();
     if (imageHandUp == nullptr) {
         return false;
     }
-    imageHandUp->SetPosition(IMAGE_DISSGREE_POSITION_X, IMAGE_ALL_POSITION_Y); // 30 :  offset
-    imageHandUp->SetSrc(PNG_DISSGREE_IMAGE_PATH);
+    imageHandUp->SetPosition(188, 340); // 30 :  offset
+    imageHandUp->SetSrc(PNG_230_VECTOR_IMAGE_PATH);
     imageHandUp->SetTouchable(true);
     imageHandUp->SetViewId("callingHandUp");
     group->Add(imageHandUp);
@@ -122,12 +149,43 @@ bool CallingView::InitImageViewDisplay()
     if (imageHorns == nullptr) {
         return false;
     }
-    imageHorns->SetPosition(IMAGE_HONRS_POSITION_X, IMAGE_HONRS_POSITION_Y); // 30 :  offset
-    imageHorns->SetSrc(PNG_SOUNDBUTTON2);
+    imageHorns->SetPosition(369, 207); // 30 :  offset
+    imageHorns->SetSrc(PNG_230_VOICE_OPEN_IMAGE_PATH);
     imageHorns->SetTouchable(true);
     imageHorns->SetViewId("volumeSwitch");
-
-    group->Add(imageHorns);
+     group->Add(imageHorns);
+    
+    imagedial = new UIImageView();
+    if (imagedial == nullptr) {
+        return false;
+    }
+    imagedial->SetPosition(80, 296); // 30 :  offset
+    imagedial->SetSrc(PNG_230_DIAL_IMAGE_PATH);
+    imagedial->SetTouchable(true);
+    imagedial->SetViewId("dial");
+    group->Add(imagedial);
+
+    
+    imageheadset = new UIImageView();
+    if (imagedial == nullptr) {
+        return false;
+    }
+    imageheadset->SetPosition(296, 296); // 30 :  offset
+    imageheadset->SetSrc(PNG_230_HEADSET_1_IIMAGE_PATH);
+    imageheadset->SetTouchable(true);
+    imageheadset->SetViewId("headset");
+    group->Add(imageheadset);
+
+    imageperson = new UIImageView();
+    if (imagedial == nullptr) {
+        return false;
+    }
+    imageperson->SetPosition(158, 158); // 30 :  offset
+    imageperson->SetSrc(PNG_230_PERSON_IMAGE_PATH);
+    imageperson->SetTouchable(true);
+    imageperson->SetViewId("headset");
+    group->Add(imageperson);
+    
     return true;
 }
 
@@ -147,42 +205,164 @@ bool CallingView::InitUILabelDisplay()
     if (callerDisplay == nullptr) {
         return false;
     }
-    callerDisplay->SetPosition(LABEL_PERCENT_POSITION_X, LABEL_PERCENT_POSITION_Y,
-        VIEW_DISTANCE_TO_LEFT_SIDE, TITLE_LABEL_DEFAULT_HEIGHT);
+    callerDisplay->SetPosition(88, 81,
+        289, 40);
     callerDisplay->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT);
     callerDisplay->SetText(CallerLogModel::GetInstance()->GetPhoneNumber().c_str());
     callerDisplay->SetAlign(TEXT_ALIGNMENT_CENTER);
     callerDisplay->SetFont(DEFAULT_VECTOR_FONT_FILENAME, LABEL_DISPLAY_FONE_SIZE);
     callerDisplay->SetTextColor(Color::White());
+    callerDisplay->SetLineBreakMode(UILabel::LINE_BREAK_WRAP);
     group->Add(callerDisplay);
 
     callDuration = new UILabel();
     if (callDuration == nullptr) {
         return false;
     }
-    callDuration->SetPosition(LABEL_CALLERD_POSITION_X, LABEL_CALLERD_POSITION_Y,
-        VIEW_DISTANCE_TO_LEFT_SIDE, TITLE_LABEL_DEFAULT_HEIGHT);
+    callDuration->SetPosition(194, 38,
+        79, 35);
     callDuration->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT);
     callDuration->SetAlign(TEXT_ALIGNMENT_CENTER);
     callDuration->SetText(CallerLogModel::GetInstance()->DisplayCallDuration().c_str());
-    callDuration->SetFont(DEFAULT_VECTOR_FONT_FILENAME, LABEL_TIME_FONT_SIZE);
-    callDuration->SetTextColor(Color::White());
+    callDuration->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);
+    callDuration->SetTextColor(Color::GetColorFromRGBA(0xaa, 0xaa, 0xaa, 0xff));
     group->Add(callDuration);
 
-    currentTimes = new UILabel();
-    if (currentTimes == nullptr) {
+
+    // currentTimes = new UILabel();
+    // if (currentTimes == nullptr) {
+    //     return false;
+    // }
+    // currentTimes->SetPosition(LABEL_CURREMTTIME_POSITION_X, LABEL_CURREMTTIME_POSITION_Y,
+    //     VIEW_DISTANCE_TO_LEFT_SIDE, TITLE_LABEL_DEFAULT_HEIGHT);
+    // currentTimes->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT);
+    // currentTimes->SetAlign(TEXT_ALIGNMENT_CENTER);
+    // currentTimes->SetText(CallerLogModel::GetInstance()->InitDateHourTime().c_str());
+    // currentTimes->SetFont(DEFAULT_VECTOR_FONT_FILENAME, LABEL_TIME_FONT_SIZE);
+    // currentTimes->SetTextColor(Color::White());
+
+    // group->Add(currentTimes);
+    return true;
+}
+
+static char *dial_id_str[]={"1","2","3","4","5","6","7","8","9","*","0","#"};
+void CallingView::showdial(bool flag)
+{
+    if(flag)
+    {
+        label_number->SetText("");
+        dial_group->SetVisible(true);  
+    }
+    else
+    {
+        dial_group->SetVisible(false); 
+    }
+   return;
+}
+
+void CallingView::text_updata_buf(const char *buf)
+{
+    uapi_hfp_send_DTMF_CODE(buf[0]);
+    char new_buf[16]={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;
+}
+
+
+bool CallingView::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);
+    
+    dragListener = (UIView::OnDragListener*)OHOS::MainCallingPresenter::GetInstance();
+    if (dragListener == nullptr) {
+
         return false;
     }
-    currentTimes->SetPosition(LABEL_CURREMTTIME_POSITION_X, LABEL_CURREMTTIME_POSITION_Y,
-        VIEW_DISTANCE_TO_LEFT_SIDE, TITLE_LABEL_DEFAULT_HEIGHT);
-    currentTimes->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT);
-    currentTimes->SetAlign(TEXT_ALIGNMENT_CENTER);
-    currentTimes->SetText(CallerLogModel::GetInstance()->InitDateHourTime().c_str());
-    currentTimes->SetFont(DEFAULT_VECTOR_FONT_FILENAME, LABEL_TIME_FONT_SIZE);
-    currentTimes->SetTextColor(Color::White());
+    dial_group->SetOnDragListener(dragListener);
+    
+    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++;
+        }
+    }
 
-    group->Add(currentTimes);
+    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);
+    
+    group->Add(dial_group);
+    dial_group->SetVisible(false);
     return true;
+    
 }
 
 UIViewGroup *CallingView::CreateUIViewGroup()
@@ -199,16 +379,23 @@ UIViewGroup *CallingView::CreateUIViewGroup()
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CallingView::InitImageViewDisplay error");
         return nullptr;
     }
-
-    if (!InitAddOnclickevent()) {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CallingView::InitAddOnclickevent error");
+    if (!InitUILabelDisplay()) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CallingView::InitUILabelDisplay error");
         return nullptr;
     }
 
-    if (!InitUILabelDisplay()) {
+    if(!Initshowdial())
+    {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CallingView::InitUILabelDisplay error");
         return nullptr;
     }
+    if (!InitAddOnclickevent()) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CallingView::InitAddOnclickevent error");
+        return nullptr;
+    }
+
+   
+    
 
     return group;
 }
index 85ecc69..ce7dcf1 100644 (file)
@@ -188,11 +188,11 @@ bool MainCallingPresenter::OnClick(UIView& view, const ClickEvent& event)
     if (strcmp(view.GetViewId(), "microphoneChange") == 0) {
         if (changeImage == 0) {
             changeImage = 1;
-            view_->GetCallingView()->GetImageMicrophone()->SetSrc(PNG_MICROPHONE_CLOSE_IMAGE_PATH);
+            view_->GetCallingView()->GetImageMicrophone()->SetSrc(PNG_230_MICROPHONE_CLOSE_IMAGE_PATH);
             SetMicMute(true);
         } else {
             changeImage = 0;
-            view_->GetCallingView()->GetImageMicrophone()->SetSrc(PNG_MICROPHONE_OPEN_IMAGE_PATH);
+            view_->GetCallingView()->GetImageMicrophone()->SetSrc(PNG_230_MICROPHONE_OPEN_IMAGE_PATH);
             SetMicMute(false);
         }
         return true;
@@ -228,6 +228,72 @@ bool MainCallingPresenter::OnClick(UIView& view, const ClickEvent& event)
         }
         return true;
     }
+    else if ((strcmp(view.GetViewId(), "dial") == 0))
+    {
+       CallingView::GetInstance()->showdial(true);
+    }
+
+    if (strcmp(view.GetViewId(), "0") == 0)
+    {
+        CallingView::GetInstance()->text_updata_buf(view.GetViewId()); 
+    }
+    else if (strcmp(view.GetViewId(), "1") == 0)
+    {
+         CallingView::GetInstance()->text_updata_buf(view.GetViewId()); 
+    }
+    else if (strcmp(view.GetViewId(), "2") == 0)
+    {
+         CallingView::GetInstance()->text_updata_buf(view.GetViewId()); 
+    }
+    else if (strcmp(view.GetViewId(), "3") == 0)
+    {
+         CallingView::GetInstance()->text_updata_buf(view.GetViewId()); 
+    }
+    else if (strcmp(view.GetViewId(), "4") == 0)
+    {
+         CallingView::GetInstance()->text_updata_buf(view.GetViewId()); 
+    }
+    else if (strcmp(view.GetViewId(), "5") == 0)
+    {
+         CallingView::GetInstance()->text_updata_buf(view.GetViewId()); 
+    }
+    else if (strcmp(view.GetViewId(), "6") == 0)
+    {   
+         CallingView::GetInstance()->text_updata_buf(view.GetViewId()); 
+    }
+    else if (strcmp(view.GetViewId(), "7") == 0)
+    {
+         CallingView::GetInstance()->text_updata_buf(view.GetViewId()); 
+    }
+    else if (strcmp(view.GetViewId(), "8") == 0)
+    {
+         CallingView::GetInstance()->text_updata_buf(view.GetViewId()); 
+    }
+    else if (strcmp(view.GetViewId(), "9") == 0)
+    {
+         CallingView::GetInstance()->text_updata_buf(view.GetViewId()); 
+    }else if (strcmp(view.GetViewId(), "*") == 0)
+    {
+        CallingView::GetInstance()->text_updata_buf(view.GetViewId());  /* code */
+    }
+    else if (strcmp(view.GetViewId(), "#") == 0)
+    {
+       CallingView::GetInstance()->text_updata_buf(view.GetViewId()); 
+    }
+
+
+    return true;
+}
+
+bool MainCallingPresenter::OnDragEnd(OHOS::UIView& view, const OHOS::DragEvent& event)
+{
+
+     WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainCallingPresenter OnDragEnd");
+    if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) 
+    {
+        if((strcmp(view.GetViewId(), "dialing") == 0))
+        CallingView::GetInstance()->showdial(false);
+    }
     return true;
 }
 
index 331f000..d4f0b70 100644 (file)
@@ -56,7 +56,7 @@ namespace OHOS
         button->SetImageSrc(defaultImgSrc, triggeredImgSrc);\r
         button->SetStyleForState(STYLE_BORDER_COLOR, 0xff191919, UIButton::PRESSED);\r
         button->SetStyleForState(STYLE_BORDER_WIDTH, 0, UIButton::PRESSED);\r
-        button->SetStyleForState(STYLE_BORDER_COLOR,  0xff191919, UIButton::PRESSED);\r
+        //button->SetStyleForState(STYLE_BORDER_COLOR,  0xff191919, UIButton::PRESSED);\r
         // Add the callback for events\r
         UIView::OnClickListener *buttonClick = static_cast<UIView::OnClickListener *>(PhoneCallPresenter::GetInstance());\r
         button->SetOnClickListener(buttonClick);\r
index 5ab5893..c567c03 100644 (file)
@@ -377,17 +377,17 @@ namespace OHOS
          if (label1_ == nullptr) {\r
         label1_ = new UILabel();\r
             }\r
-        label1_->SetPosition(158, 18);         // widget's left position and top position\r
-        label1_->Resize(800, 88);          // widget's width and height\r
+        label1_->SetPosition(0, 18);         // widget's left position and top position\r
+        label1_->Resize(466, 88);          // widget's width and height\r
         label1_->SetViewId("label1");// Set style\r
-        label1_->SetStyle(STYLE_TEXT_FONT, 50);\r
+        label1_->SetStyle(STYLE_TEXT_FONT, 30);\r
 \r
-        label1_->SetText("通讯录");\r
-        label1_->SetLineBreakMode(UILabel::LINE_BREAK_ADAPT);\r
-        label1_->SetTextColor(Color::GetColorFromRGBA(0xac, 0xa4, 0xa4, 0xff));\r
+        label1_->SetText("常用联系人");\r
+        label1_->SetLineBreakMode(UILabel::LINE_BREAK_WRAP);\r
+        //label1_->SetTextColor(Color::GetColorFromRGBA(0xac, 0xa4, 0xa4, 0xff));\r
         label1_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
         label1_->SetRollSpeed(0);\r
-        label1_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 50);\r
+        label1_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);\r
         container_->Add(label1_);\r
 \r
         if(addressbook_t.num<=0 ||addressbook_t.num>20)\r
index 0f65679..b2c9675 100644 (file)
@@ -1909,6 +1909,14 @@ int uapi_hfp_connect_state(void)
 }
 
 
+void uapi_hfp_send_DTMF_CODE(char code)
+{
+    bd_addr_t bdaddr={0};
+    get_phone_addr(&bdaddr);
+    int ret= hfp_hf_send_dtmf_tone(&bdaddr,code);
+    WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[hfp_hf_send_dtmf_tone] ret:%d", ret);
+}
+
 #ifdef __cplusplus
 }
 #endif
index 544d775..e484714 100755 (executable)
@@ -228,6 +228,7 @@ bool MainCallingPresenter::OnClick(UIView& view, const ClickEvent& event)
         }\r
         return true;\r
     }\r
+   \r
     return true;\r
 }\r
 \r
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/makephone/Ellipse 4.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/makephone/Ellipse 4.bin
new file mode 100644 (file)
index 0000000..219c8d7
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:288c01fbc20c96cbf6adf3eaeff643eba6ffae7d500ae04e6d63e9c504c1d0c7
+size 40
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/makephone/dial.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/makephone/dial.bin
new file mode 100644 (file)
index 0000000..6f5b5ba
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0bf7ea2a50a4ac6f3c9be83393fe80aa5e1a380921bfc6da1844b0602984e4d8
+size 5544
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/makephone/headset_1.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/makephone/headset_1.bin
new file mode 100644 (file)
index 0000000..6c62758
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2a06acfa32e465f2d873648d5309bf898a25e913992d93fd396264dfcbdaf0a5
+size 5544
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/makephone/headset_2.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/makephone/headset_2.bin
new file mode 100644 (file)
index 0000000..5fd7527
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1f921f831c124c5460fc9f6641fe5e93606474ca724e59b72783900dd1d723bd
+size 5544
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/makephone/microphone.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/makephone/microphone.bin
new file mode 100644 (file)
index 0000000..231def5
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:aec3a2c3fc984dbfeb80f136d895701eb00632c7b6b4ccbe00e8834c197d4e3c
+size 1896
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/makephone/microphone_1.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/makephone/microphone_1.bin
new file mode 100644 (file)
index 0000000..b153d9f
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:98d50e4aca9aa85a118bb57caebdd57accdf45c4f44450e4adedd24d301d64f6
+size 1896
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/makephone/person.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/makephone/person.bin
new file mode 100644 (file)
index 0000000..00202de
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:330e5705f57b8120f271eae93d31e2b02bbe0624f34e3c6fc83024f14b94e27b
+size 15224
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/makephone/vector.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/makephone/vector.bin
new file mode 100644 (file)
index 0000000..7de1612
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:115a3276956e3761da338e9b6fc315644dd28cbd70de4b86d1a82d8ef36e124f
+size 5544
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/makephone/voice.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/makephone/voice.bin
new file mode 100644 (file)
index 0000000..aad479e
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:083d65699e9b191705b8de99dc5f72aad6ffcd221247e82e480d17cdb18ce2be
+size 1896