AI语音界面修改,解决查询AI模型不起作用问题,AI连接界面添加,动画还未加
authorluozheng <1732036298@qq.com>
Sat, 3 Aug 2024 08:28:58 +0000 (16:28 +0800)
committerluozheng <1732036298@qq.com>
Sat, 3 Aug 2024 08:28:58 +0000 (16:28 +0800)
36 files changed:
code/sdk/application/wearable/fd230app/CMakeLists.txt
code/sdk/application/wearable/fd230app/nativeui/aivoice/include/AiVoiceConnectingView.h [new file with mode: 0644]
code/sdk/application/wearable/fd230app/nativeui/aivoice/include/AiVoiceModel.h
code/sdk/application/wearable/fd230app/nativeui/aivoice/include/AiVoicePresenter.h
code/sdk/application/wearable/fd230app/nativeui/aivoice/include/AiVoiceView.h
code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceConnectingView.cpp [new file with mode: 0644]
code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceModel.cpp
code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoicePresenter.cpp
code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceView.cpp
code/sdk/application/wearable/fd230app/nativeui/uiservice/include/ui_service.h
code/sdk/application/wearable/fd230app/nativeui/uiservice/src/ui_service.cpp
code/sdk/application/wearable/nativeabilityfwk/include/Ability.h
code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp
code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c
code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.h
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/1.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/10.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/11.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/12.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/13.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/14.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/15.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/16.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/17.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/18.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/19.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/2.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/20.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/3.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/4.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/5.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/6.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/7.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/8.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/9.bin [new file with mode: 0644]
code/sdk/middleware/services/gui/uikit/utils/interfaces/innerkits/graphic_config.h

index 8b05d56..a09ea58 100644 (file)
@@ -409,6 +409,7 @@ set(SOURCES
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/aivoice/src/AivoiceChatContentListItemView.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/aivoice/src/AivoiceChatContentListAdapter.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/aivoice/src/AivoiceReturnResultTextView.cpp
+    ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/aivoice/src/AiVoiceConnectingView.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/aivoice/src/apikeys/ApiKeysDeleteView.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/aivoice/src/apikeys/ApiKeysPresenter.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/aivoice/src/apikeys/NotSetApiKeysView.cpp
diff --git a/code/sdk/application/wearable/fd230app/nativeui/aivoice/include/AiVoiceConnectingView.h b/code/sdk/application/wearable/fd230app/nativeui/aivoice/include/AiVoiceConnectingView.h
new file mode 100644 (file)
index 0000000..2f1187b
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * @Author: luozheng 1732036298@qq.com
+ * @Date: 2024-08-03 11:09:56
+ * @LastEditors: luozheng 1732036298@qq.com
+ * @LastEditTime: 2024-08-03 11:32:24
+ * @FilePath: /xts_origin/FD230/code/sdk/application/wearable/fd230app/nativeui/aivoice/include/AiVoiceConnectingView.h
+ */
+
+#ifndef AIVOICE_CONNECTING_H
+#define AIVOICE_CONNECTING_H
+#include "components/ui_button.h"
+#include "components/ui_scroll_view.h"
+#include "components/ui_label_ext.h"
+namespace OHOS
+{
+    static constexpr const char *AIVOICECONNECTINGVIEW_CANCEL_BUTTON_VIEW_ID = "AivoiceConnectingcancelButton"; // 正在连接中界面取消按钮
+
+    class AiVoiceConnectingView
+    {
+    public:
+        struct LabelConfig
+        {
+            int16_t left;
+            int16_t top;
+            int16_t width;
+            int16_t height;
+            int16_t fontSize;
+            int16_t lineHeigh;
+            uint16_t textId;
+            uint8_t lineBreakMode;
+        };
+        struct ButtonConfig
+        {
+            int16_t x;
+            int16_t y;
+            int16_t w;
+            int16_t h;
+            const char *viewId;
+        };
+
+        AiVoiceConnectingView();
+        ~AiVoiceConnectingView();
+        static AiVoiceConnectingView *GetInstance(void);
+        UIScrollView *CreateAiVoiceConnectingView(void);
+
+    private:
+        UILabelExt *AiVoiceConnectingViewLabelInit(LabelConfig &labelconfig);
+        UIButton *AiVoiceConnectingViewButtonInit(ButtonConfig &buttonconfig);
+        bool CreateAiVoiceConnectingViewLabel(void);
+        bool CreateAiVoiceConnectingViewButton(void);
+        bool CreateAiVoiceConnectingScrollView(void);
+        void ClearAll(void);
+        UIScrollView *scrollView{nullptr};
+        UILabelExt *title{nullptr};
+        UILabelExt *cancelLabel{nullptr};
+        UIButton *cancelButton{nullptr};
+    };
+}
+
+#endif
\ No newline at end of file
index e408d0f..651199c 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-06-20 15:14:43
  * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-08-02 09:46:58
+ * @LastEditTime: 2024-08-03 14:26:12
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/aivoice/include/AiVoiceModel.h
  */
 #ifndef AI_VOICE_MODEL_H
@@ -29,6 +29,7 @@ namespace OHOS
     public:
         static AiVoiceModel &GetInstance(void); // 获取单例实例
         bool ChangeToReturnResultTextView(void);
+        bool ChangeToAIVoiceListeningView(bool value);
         // 初始化和状态管理
         bool CreateIfNotExists();
         void StatusResume(void);
index 117a71b..abc91fa 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-06-20 14:44:22
  * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-07-29 10:32:57
+ * @LastEditTime: 2024-08-03 14:27:50
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/aivoice/include/AiVoicePresenter.h
  */
 #ifndef AI_VOICE_PRESENTER_H
@@ -42,6 +42,7 @@ namespace OHOS
         void OnStop() override;
 
         bool JumpToReturnResultTextView(void);
+        bool ChangeToAIVoiceListeningView(bool val);
         bool ChangeViewAndLogicOperator(int16_t hideView, int16_t showView);
 
     private:
index fcd5ab3..d194567 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-06-08 09:36:01
  * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-07-30 20:24:56
+ * @LastEditTime: 2024-08-03 11:37:00
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/respiratorytraining/include/AiVoiceView.h
  */
 #ifndef AI_VOICE_VIEW_H
@@ -24,6 +24,7 @@
 #include "aivoice/include/apikeys/SetApiKeysView.h"
 #include "aivoice/include/apikeys/NotSetApiKeysView.h"
 #include "aivoice/include/apikeys/ApiKeysDeleteView.h"
+#include "aivoice/include/AiVoiceConnectingView.h"
 #include "ui_resource_string.h"
 #include "iostream"
 #include "string"
@@ -55,6 +56,7 @@ namespace OHOS
         AIVOICE_SETAPIKEYS,                              // API Keys set界面
         AIVOICE_NOTSETAPIKEYS,                           // API Keys notset界面
         AIVOICE_APIKEYS_DELETE,                          // API Keys 删除界面
+        AIVOICE_AIMODE_CONNECTING,                       // AI Mode正在连接视图
         MAX_AIVOICE_VIEWID,
     } AIVOICEVIEWID;
 
@@ -117,6 +119,7 @@ namespace OHOS
         bool ChangeAiVoicSetApiKeysView(int16_t thisView);
         bool ChangeAiVoicNotSetApiKeysView(int16_t thisView);
         bool ChangeAiVoicApiKeysDeleteView(int16_t thisView);
+        bool ChangeAiVoicConnectingView(int16_t thisView);
 
         void SetAiVoiceViewAllComponentsVisibilityStatus();
         void ChangeAiModelAndUpdateComponentsStatus(void);
@@ -136,6 +139,7 @@ namespace OHOS
         SetApiKeysView *p_SetApiKeysView{nullptr};
         NotSetApiKeysView *p_NotSetApiKeysView{nullptr};
         ApiKeysDeleteView *p_ApiKeysDeleteView{nullptr};
+        AiVoiceConnectingView *p_AiVoiceConnectingView{nullptr};
 
     private:
         UILabelExt *AiVoiceViewLabelInit(LabelConfig &labelconfig);
diff --git a/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceConnectingView.cpp b/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceConnectingView.cpp
new file mode 100644 (file)
index 0000000..1523f1c
--- /dev/null
@@ -0,0 +1,200 @@
+/*
+ * @Author: luozheng 1732036298@qq.com
+ * @Date: 2024-08-03 11:10:08
+ * @LastEditors: luozheng 1732036298@qq.com
+ * @LastEditTime: 2024-08-03 15:19:28
+ * @FilePath: /xts_origin/FD230/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceConnectingView.cpp
+ */
+#include "aivoice/include/AiVoiceConnectingView.h"
+#include "aivoice/include/AiVoicePresenter.h"
+#include "wearable_log.h"
+#include "ui_resource_string.h"
+
+namespace OHOS
+{
+    static AiVoiceConnectingView *g_pAiVoiceConnecting{nullptr};
+    AiVoiceConnectingView::AiVoiceConnectingView()
+    {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AiVoiceConnectingView::AiVoiceConnectingView");
+        g_pAiVoiceConnecting = this;
+    }
+
+    AiVoiceConnectingView::~AiVoiceConnectingView()
+    {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AiVoiceConnectingView::~AiVoiceConnectingView");
+        ClearAll();
+        g_pAiVoiceConnecting = nullptr;
+    }
+
+    void AiVoiceConnectingView::ClearAll(void)
+    {
+        if (scrollView != nullptr)
+        {
+            scrollView->RemoveAll();
+            if (title)
+            {
+                delete title;
+                title = nullptr;
+            }
+            if (cancelLabel)
+            {
+                delete cancelLabel;
+                cancelLabel = nullptr;
+            }
+            if (cancelButton != nullptr)
+            {
+                delete cancelButton;
+                cancelButton = nullptr;
+            }
+
+            delete scrollView;
+            scrollView = nullptr;
+        }
+    }
+
+    AiVoiceConnectingView *AiVoiceConnectingView::GetInstance(void)
+    {
+        return g_pAiVoiceConnecting;
+    }
+
+    UILabelExt *AiVoiceConnectingView::AiVoiceConnectingViewLabelInit(LabelConfig &labelconfig)
+    {
+        UILabelExt *label = new UILabelExt();
+        if (label == nullptr)
+        {
+            return nullptr;
+        }
+        label->SetPosition(labelconfig.left, labelconfig.top, labelconfig.width, labelconfig.height);
+        label->SetStyle(STYLE_TEXT_FONT, labelconfig.fontSize);
+        label->SetStyle(STYLE_LINE_HEIGHT, labelconfig.lineHeigh);
+        label->SetTextId(labelconfig.textId);
+        label->SetLineBreakMode(labelconfig.lineBreakMode);
+        label->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
+        label->SetRollSpeed(70);
+        label->SetFont(DEFAULT_VECTOR_FONT_FILENAME, labelconfig.fontSize);
+        return label;
+    }
+
+    UIButton *AiVoiceConnectingView::AiVoiceConnectingViewButtonInit(ButtonConfig &buttonconfig)
+    {
+        UIButton *button = new UIButton();
+        if (button == nullptr)
+        {
+            return nullptr;
+        }
+        button->SetPosition(buttonconfig.x, buttonconfig.y, buttonconfig.w, buttonconfig.h);
+        button->SetViewId(buttonconfig.viewId);
+        button->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919);
+        button->SetStyle(STYLE_BACKGROUND_OPA, 0xff);
+        button->SetStyleForState(STYLE_BACKGROUND_COLOR, 0xff383838, UIButton::PRESSED);
+
+        return button;
+    }
+
+    bool AiVoiceConnectingView::CreateAiVoiceConnectingViewLabel(void)
+    {
+        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AiVoiceConnectingView::CreateAiVoiceConnectingViewLabel");
+        LabelConfig labelConfig = {
+            .left = 83,
+            .top = 50,
+            .width = 300,
+            .height = 35,
+            .fontSize = 30,
+            .lineHeigh = 35,
+            .textId = STR_CONNECTING,
+            .lineBreakMode = UILabel::LINE_BREAK_OSCILLATION,
+        };
+        title = AiVoiceConnectingViewLabelInit(labelConfig);
+        if (title == nullptr)
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "title new fail!");
+            return false;
+        }
+        /* -------------------------------------------------------------------------- */
+        labelConfig = {
+            .left = 133,
+            .top = 368,
+            .width = 200,
+            .height = 35,
+            .fontSize = 30,
+            .lineHeigh = 35,
+            .textId = STR_CANCEL,
+            .lineBreakMode = UILabel::LINE_BREAK_OSCILLATION,
+        };
+        cancelLabel = AiVoiceConnectingViewLabelInit(labelConfig);
+        if (cancelLabel == nullptr)
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AiVoiceBluetoothFailedStartView::cancelLabel is nullptr!");
+            return false;
+        }
+        cancelLabel->SetTextColor(Color::GetColorFromRGBA(0xfd, 0x52, 0x13, 0xff));
+
+        return true;
+    }
+
+    bool AiVoiceConnectingView::CreateAiVoiceConnectingViewButton(void)
+    {
+        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AiVoiceConnectingView::CreateAiVoiceConnectingViewButton");
+        ButtonConfig buttonconfig = {
+            .x = 93,
+            .y = 340,
+            .w = 280,
+            .h = 90,
+            .viewId = AIVOICECONNECTINGVIEW_CANCEL_BUTTON_VIEW_ID,
+        };
+        cancelButton = AiVoiceConnectingViewButtonInit(buttonconfig);
+        if (cancelButton == nullptr)
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "cancelButton new fail!");
+            return false;
+        }
+        UIView::OnTouchListener *touchListener = static_cast<UIView::OnTouchListener *>(AiVoicePresenter::GetInstance());
+        if (touchListener == nullptr)
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AivoiceConnectTimeoutView::touchListener can not be nullptr!");
+            return false;
+        }
+        cancelButton->SetOnTouchListener(touchListener);
+
+        return true;
+    }
+
+    bool AiVoiceConnectingView::CreateAiVoiceConnectingScrollView(void)
+    {
+        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AiVoiceConnectingView::CreateAiVoiceConnectingScrollView");
+        scrollView = new UIScrollView();
+        if (scrollView == nullptr)
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AivoiceConnectTimeoutView::scrollView new fail!");
+            return false;
+        }
+        UIView::OnDragListener *dragListener = static_cast<UIView::OnDragListener *>(AiVoicePresenter::GetInstance());
+        if (dragListener == nullptr)
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AivoiceThinkingView::dragListener new fail!");
+            return false;
+        }
+        scrollView->SetOnDragListener(dragListener);
+        scrollView->SetPosition(0, 0, 466, 466);
+        scrollView->SetTouchable(true);
+        scrollView->SetDraggable(true);
+
+        return true;
+    }
+
+    UIScrollView *AiVoiceConnectingView::CreateAiVoiceConnectingView(void)
+    {
+        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AiVoiceConnectingView::CreateAiVoiceConnectingView");
+        if (!CreateAiVoiceConnectingScrollView() || !CreateAiVoiceConnectingViewLabel() || !CreateAiVoiceConnectingViewButton())
+        {
+            WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AiVoiceConnectingView::CreateAiVoiceConnectingView fail!!");
+            return nullptr;
+        }
+        scrollView->Add(title);
+        scrollView->Add(cancelButton);
+        scrollView->Add(cancelLabel);
+
+        return scrollView;
+    }
+
+}
\ No newline at end of file
index 1b8f401..c6d26a9 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-06-20 15:14:50
  * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-08-02 09:48:30
+ * @LastEditTime: 2024-08-03 15:06:35
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceModel.cpp
  */
 #include "aivoice/include/AiVoiceModel.h"
@@ -30,6 +30,7 @@ namespace OHOS
     static osTimerId_t g_timer = NULL;
     static constexpr uint16_t THIRTY_TIME = 31;
     static int Time = THIRTY_TIME;
+    static int AiModelConnectTimeout = 5;
 
     AiVoiceModel::AiVoiceModel() {}
 
@@ -55,6 +56,19 @@ namespace OHOS
         return true;
     }
 
+    bool AiVoiceModel::ChangeToAIVoiceListeningView(bool value)
+    {
+        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AiVoiceModel::ChangeToReturnResultTextView");
+        AiVoicePresenter *Aipresenter_ = AiVoicePresenter::GetInstance();
+        if (Aipresenter_ == nullptr)
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AiVoiceModel::ChangeToReturnResultTextView fail!!");
+            return false;
+        }
+        Aipresenter_->ChangeToAIVoiceListeningView(value);
+        return true;
+    }
+
     /*如果文件不存在就创建*/
     bool AiVoiceModel::CreateIfNotExists()
     {
@@ -528,6 +542,8 @@ namespace OHOS
     void AiVoiceModel::StatusResume(void)
     {
         Time = THIRTY_TIME;
+        AiModelConnectTimeout = 5;
+        AiVoiceConnectStatus = false;
 
         for (int i = 0; i < ChatContentListCount; i++)
         {
@@ -547,24 +563,46 @@ namespace OHOS
     /*定时器到期时的处理*/
     static void AIVoice_TimerCallbackProc(int data)
     {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AIVoice_TimerCallbackProc,Time = %d", Time);
-        Time -= 1;
-        if (Time == 30)
+        if (!AiVoiceModel::GetInstance().GetAiVoiceConnectStatus())
         {
-            AiVoiceModel::GetInstance().CheckFileAndSendAIIsReady();
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AIVoice_TimerCallbackProc,AiModelConnectTimeout = %d", AiModelConnectTimeout);
+            AiModelConnectTimeout--;
+            if (AiModelConnectTimeout < 0)
+            {
+                AiVoiceModel::GetInstance().AIVoice_StopTimer();
+                AiVoiceView *view_ = AiVoiceView::GetInstance();
+                AiVoicePresenter *p_AiVoicePresenter = AiVoicePresenter::GetInstance();
+                if (view_ != nullptr && p_AiVoicePresenter != nullptr)
+                {
+                    if ((view_->GetAiVoiceScrollView(AIVOICE_AIMODE_CONNECTING) != nullptr) &&
+                        (view_->GetAiVoiceScrollView(AIVOICE_AIMODE_CONNECTING)->IsVisible()))
+                    {
+                        p_AiVoicePresenter->ChangeViewAndLogicOperator(AIVOICE_AIMODE_CONNECTING, AIVOICE_AIMODEL_CONNECT_FAILED_VIEWID);
+                    }
+                }
+            }
         }
-        if (Time < 0) // 如果思考时间超时30s,进入连接超时界面
+        else
         {
-            AiVoiceModel::GetInstance().AIVoice_StopTimer();
-
-            AiVoiceView *view_ = AiVoiceView::GetInstance();
-            AiVoicePresenter *p_AiVoicePresenter = AiVoicePresenter::GetInstance();
-            if (view_ != nullptr && p_AiVoicePresenter != nullptr)
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AIVoice_TimerCallbackProc,Time = %d", Time);
+            Time -= 1;
+            if (Time == 30)
             {
-                if ((view_->GetAiVoiceScrollView(AIVOICE_THINKING_VIEWID) != nullptr) &&
-                    (view_->GetAiVoiceScrollView(AIVOICE_THINKING_VIEWID)->IsVisible()))
+                AiVoiceModel::GetInstance().CheckFileAndSendAIIsReady();
+            }
+            if (Time < 0) // 如果思考时间超时30s,进入连接超时界面
+            {
+                AiVoiceModel::GetInstance().AIVoice_StopTimer();
+
+                AiVoiceView *view_ = AiVoiceView::GetInstance();
+                AiVoicePresenter *p_AiVoicePresenter = AiVoicePresenter::GetInstance();
+                if (view_ != nullptr && p_AiVoicePresenter != nullptr)
                 {
-                    p_AiVoicePresenter->ChangeViewAndLogicOperator(AIVOICE_THINKING_VIEWID, AIVOICE_CONNECT_TIMEOUT_VIEWID);
+                    if ((view_->GetAiVoiceScrollView(AIVOICE_THINKING_VIEWID) != nullptr) &&
+                        (view_->GetAiVoiceScrollView(AIVOICE_THINKING_VIEWID)->IsVisible()))
+                    {
+                        p_AiVoicePresenter->ChangeViewAndLogicOperator(AIVOICE_THINKING_VIEWID, AIVOICE_CONNECT_TIMEOUT_VIEWID);
+                    }
                 }
             }
         }
@@ -637,6 +675,7 @@ namespace OHOS
             }
             g_timer = NULL;
             Time = THIRTY_TIME;
+            AiModelConnectTimeout = 5;
         }
     }
 
index 02643d7..7012df0 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-06-20 15:11:17
  * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-08-02 14:35:52
+ * @LastEditTime: 2024-08-03 16:26:41
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoicePresenter.cpp
  */
 #include "AppViewIDs.h"
@@ -105,6 +105,31 @@ namespace OHOS
         return true;
     }
 
+    /*跳转到AI聆听界面界面*/
+    bool AiVoicePresenter::ChangeToAIVoiceListeningView(bool val)
+    {
+        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AiVoicePresenter::ChangeToAIVoiceListeningView");
+        if (view_->GetAiVoiceScrollView(AIVOICE_AIMODE_CONNECTING) != nullptr && view_->GetAiVoiceScrollView(AIVOICE_AIMODE_CONNECTING)->IsVisible())
+        {
+            model->AIVoice_StopTimer(); // 停止定时器
+            model->SetAiVoiceConnectStatus(val);
+            if (val) /*如果查询的AI模型可用跳转到聆听中界面*/
+            {
+                ChangeViewAndLogicOperator(AIVOICE_AIMODE_CONNECTING, AIVOICE_LISTENING_VIEWID);
+            }
+            else
+            {
+                ChangeViewAndLogicOperator(AIVOICE_AIMODE_CONNECTING, AIVOICE_AIMODEL_CONNECT_FAILED_VIEWID);
+            }
+        }
+        else
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AiVoicePresenter::ChangeToAIVoiceListeningView fail");
+            return false;
+        }
+        return true;
+    }
+
     bool AiVoicePresenter::ChangeViewAndLogicOperator(int16_t hideView, int16_t showView)
     {
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AiVoicePresenter::ChangeViewOperator");
@@ -120,6 +145,18 @@ namespace OHOS
         switch (hideView)
         {
         case AIVOICE_STARTCHAT_VIEWID:
+            model->QuerySelectedAiModelIsConnect(); /*查询用户选择的AI模型是否已经连接*/
+            if (showView == AIVOICE_LISTENING_VIEWID)
+            {
+                model->StartListenAndRecordingUserQuestion();
+            }
+            else if (showView == AIVOICE_AIMODE_CONNECTING)
+            {
+                model->AIVoice_StartTimer(); /*开启一个查询AI模型是否连接成功定时器*/
+            }
+            break;
+
+        case AIVOICE_AIMODE_CONNECTING:
             if (showView == AIVOICE_LISTENING_VIEWID)
             {
                 model->StartListenAndRecordingUserQuestion();
@@ -201,9 +238,6 @@ namespace OHOS
         }
         else if (viewId == AIVOICE_START_CHAT_BUTTON_VIEW_ID) // 如果点击的是开始对话按钮
         {
-            /* ------------------------ 如果点击的是开始对话按钮,先查询AI模型是否可用 ------------------------ */
-            model->QuerySelectedAiModelIsConnect();
-            /* -------------------------------------------------------------------------- */
             /*
              * 进入对话流程:
              *   1.当手表4G网络正常+与app连接正常 -> 通过4G调用大模型
@@ -213,31 +247,16 @@ namespace OHOS
              */
             bool netWork4GState = model->GetMobileDataIsOpen();
             bool appBluetoothConnectState = model->GetAPPBluetoothIsConnect();
-            bool aivoiceConnectState = model->GetAiVoiceConnectStatus();
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "netWork4GState = %d,appBluetoothConnectState = %d,aivoiceConnectState =%d",netWork4GState,appBluetoothConnectState,aivoiceConnectState);
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "netWork4GState = %d,appBluetoothConnectState = %d", netWork4GState, appBluetoothConnectState);
 
             if (netWork4GState) // 1.手表4G网络正常
             {
-                if (aivoiceConnectState) /*如果模型是连接成功的*/
-                {
-                    // 通过4G调用大模型
-                }
-                else
-                {
-                    ChangeViewAndLogicOperator(AIVOICE_STARTCHAT_VIEWID, AIVOICE_AIMODEL_CONNECT_FAILED_VIEWID);
-                }
+                // 通过4G调用大模型
             }
             else if (appBluetoothConnectState) // 3.只有与APP蓝牙连接正常
             {
-                if (aivoiceConnectState) /*如果模型是连接成功的*/
-                {
-                    // 通过蓝牙连接APP调用大模型
-                    ChangeViewAndLogicOperator(AIVOICE_STARTCHAT_VIEWID, AIVOICE_LISTENING_VIEWID);
-                }
-                else
-                {
-                    ChangeViewAndLogicOperator(AIVOICE_STARTCHAT_VIEWID, AIVOICE_AIMODEL_CONNECT_FAILED_VIEWID);
-                }
+                // 通过蓝牙连接APP调用大模型
+                ChangeViewAndLogicOperator(AIVOICE_STARTCHAT_VIEWID, AIVOICE_AIMODE_CONNECTING); // LOADING
             }
             else // 4.两者连接都异常
             {
@@ -258,6 +277,7 @@ namespace OHOS
             {AIMODEL_CONNECT_FAILED_ENSURE_BUTTON_VIEW_ID, {AIVOICE_AIMODEL_CONNECT_FAILED_VIEWID, AIVOICE_STARTCHAT_VIEWID}},                     // 返回一级界面
             {AIVOICECONNECTTIMEOUT_ENSURE_BUTTON_VIEW_ID, {AIVOICE_CONNECT_TIMEOUT_VIEWID, AIVOICE_STARTCHAT_VIEWID}},                             // 返回一级界面
             {CANCEL_THINKING_BUTTON_VIEW_ID, {AIVOICE_THINKING_VIEWID, AIVOICE_STARTCHAT_VIEWID}},                                                 // 返回一级界面
+            {AIVOICECONNECTINGVIEW_CANCEL_BUTTON_VIEW_ID, {AIVOICE_AIMODE_CONNECTING, AIVOICE_STARTCHAT_VIEWID}},                                  // 返回一级界面
             {AIVOICERETURNRESULTTEXT_RETURN_BUTTON_VIEW_ID, {AIVOICE_RETURN_RESULT_TEXT_VIEWID, AIVOICE_STARTCHAT_VIEWID}},                        // 返回一级界面,并清除手表聊天记录
             {AIVOICERETURNRESULTTEXT_CONTINUECHAT_BUTTON_VIEW_ID, {AIVOICE_RETURN_RESULT_TEXT_VIEWID, AIVOICE_LISTENING_VIEWID}},                  // 返回继续聆听,并清除手表聊天记录
         };
@@ -328,6 +348,11 @@ namespace OHOS
                 /*连接超时界面右滑退到AI对话界面*/
                 ChangeViewAndLogicOperator(AIVOICE_CONNECT_TIMEOUT_VIEWID, AIVOICE_STARTCHAT_VIEWID);
             }
+            else if (scrollView == view_->GetAiVoiceScrollView(AIVOICE_AIMODE_CONNECTING))
+            {
+                /*连接超时界面右滑退到AI对话界面*/
+                ChangeViewAndLogicOperator(AIVOICE_AIMODE_CONNECTING, AIVOICE_STARTCHAT_VIEWID);
+            }
             AiVoicePresenter::X_DRAG_FLAG = false;
         }
         return true;
index 24c4a46..6cf64de 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-05-07 11:25:58
  * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-07-31 18:33:11
+ * @LastEditTime: 2024-08-03 16:24:36
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/AiVoice/src/AiVoiceView.cpp
  */
 #include "aivoice/include/AiVoicePresenter.h"
@@ -133,6 +133,12 @@ namespace OHOS
                 delete p_ApiKeysDeleteView;
                 p_ApiKeysDeleteView = nullptr;
             }
+
+            if (p_AiVoiceConnectingView != nullptr)
+            {
+                delete p_AiVoiceConnectingView;
+                p_AiVoiceConnectingView = nullptr;
+            }
         }
     }
 
@@ -635,6 +641,24 @@ namespace OHOS
         return true;
     }
 
+    /*切换到AI正在连接中视图*/
+    bool AiVoiceView::ChangeAiVoicConnectingView(int16_t thisView)
+    {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AiVoiceView::ChangeAiVoicConnectingView");
+        if (AiVoiceScrollView[thisView] == nullptr)
+        {
+            p_AiVoiceConnectingView = new AiVoiceConnectingView();
+            if (p_AiVoiceConnectingView == nullptr)
+            {
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "new AiVoiceScrollView[%d] fail", thisView);
+                return false;
+            }
+            AiVoiceScrollView[thisView] = p_AiVoiceConnectingView->CreateAiVoiceConnectingView();
+            container_->Add(AiVoiceScrollView[thisView]);
+        }
+        return true;
+    }
+
     struct AiVoiceViewMapper
     {
         const int16_t viewId;
@@ -652,6 +676,7 @@ namespace OHOS
         {AIVOICE_SETAPIKEYS, &AiVoiceView::ChangeAiVoicSetApiKeysView},
         {AIVOICE_NOTSETAPIKEYS, &AiVoiceView::ChangeAiVoicNotSetApiKeysView},
         {AIVOICE_APIKEYS_DELETE, &AiVoiceView::ChangeAiVoicApiKeysDeleteView},
+        {AIVOICE_AIMODE_CONNECTING, &AiVoiceView::ChangeAiVoicConnectingView},
     };
 
     bool AiVoiceView::ClickFunc(int16_t interface)
index c1d466a..51b4af5 100644 (file)
@@ -8,7 +8,7 @@
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-06-12 11:44:04
  * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-07-27 12:34:03
+ * @LastEditTime: 2024-08-03 14:17:30
  * @FilePath: /FD230/code/sdk/application/wearable/nativeapp/nativeui/uiservice/include/ui_service.h
  */
 /*
@@ -79,6 +79,7 @@ typedef enum {
     UI_UPDATE_MESSAGE_DATA,     //更新消息数据
 
     UI_AI_JUMP_TO_RESULT_VIEW,  //跳转到返回结果视图
+    UI_AI_JUMP_TO_LISTENING_VIEW,//跳转到AI聆听界面     
     UI_UPDATE_USER_QUESTION_STR,//更新用户问题的字符串       
     UI_UPDATE_AI_ANSWER_STR,    //更新AI答案的字符串
     UI_HAND_WATCH_FIRST_PAIRED, //手表已配对:给第一次手表启动用配对成功调用
index c20d366..1644e54 100644 (file)
@@ -107,6 +107,7 @@ static void HandleUpdateCallVolume(Request *request);
 static void HandleUpdateVibrationMode(Request *request);
 static void HandleUpdateSilentMode(Request *request);
 static void HandleAiJumpToResultView(Request *request);
+static void HandleAiJumpToListeningMessage(Request *request);
 static void HandleUpdateUserQuestionStr(Request *request);
 static void HandleUpdateAIAnswerStr(Request *request);
 static void HandleWatchFirstPaired(Request *request);
@@ -143,6 +144,7 @@ MsgHandlerEntry msgHandlers[] = {
     {UI_UPDATE_AI_ANSWER_STR, HandleUpdateAIAnswerStr},
     {UI_HAND_WATCH_FIRST_PAIRED,HandleWatchFirstPaired},
     {UI_UPDATE_OBU_MESSAGE,HandleUpdateOBUMessage},
+    {UI_AI_JUMP_TO_LISTENING_VIEW,HandleAiJumpToListeningMessage},
 
     {UI_UPDATE_SLEEP_DATA, HandleUpdateSleep},
     {UI_UPDATE_MESSAGE_DATA, HandleUpdateMessage},
@@ -570,6 +572,15 @@ void HandleUpdateOBUMessage(Request *request)
         std::bind(&OHOS::OBUMessageModel::UpdateOBUMessageViewData, &OHOS::OBUMessageModel::GetInstance()));
 }
 
+//处理更新查询AI模型是否连接成功的状态
+void HandleAiJumpToListeningMessage(Request *request)
+{
+    WEARABLE_LOGI(WEARABLE_LOG_MODULE_UI_SERVICE, "HandleAiJumpToListeningMessage");
+    bool state = *((bool*)request->data);
+    GraphicService::GetInstance()->PostGraphicEvent(
+        std::bind(&OHOS::AiVoiceModel::ChangeToAIVoiceListeningView, &OHOS::AiVoiceModel::GetInstance(),state));
+}
+
 //更新睡眠数据
 void HandleUpdateSleep(Request *request)
 {
index 6d76897..8f80893 100755 (executable)
@@ -27,6 +27,7 @@
 #include "SliceTransition.h"
 #include "soc_osal.h"
 #include "stack"
+#include "wearable_log.h"
 namespace OHOS {
 const static uint16_t gSliceInvalid = 0;         
 const static uint16_t gSliceDefaultPriority = 4;  // 页面默认是最低优先级
@@ -151,16 +152,12 @@ public:
     /*打印栈中元素*/
     void showsStackSliceId()
     {
-        printf("\n%d\n",backStack_.size());
         std::stack<uint16_t> tempStack = backStack_;
-        printf("\n[");
         while(!tempStack.empty())
         {
-            printf("%d,",tempStack.top());
+            WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "%d,", tempStack.top());
             tempStack.pop();
         }
-        printf("]\n");
-        printf("\n%d\n",backStack_.size());
     }
     /* -------------------------------------------------------------------------- */
 
index db66e15..673aa52 100644 (file)
@@ -79,7 +79,8 @@ extern "C" {
 //在此处实现,给UI回复消息。
 void ble_app_reply(bool data)
 {
-    OHOS::AiVoiceModel::GetInstance().SetAiVoiceConnectStatus(data);
+    bool state = data;
+    SendMsgToUIService(UI_AI_JUMP_TO_LISTENING_VIEW, 0, &state, sizeof(bool));
 }
 
 
index 6f20f3c..483861e 100644 (file)
@@ -6799,24 +6799,25 @@ void bleLongRecvData(ble_read_data *buffer_handle,uint8_t *data, uint16_t data_s
     crcvalue);\r
     #endif\r
 \r
-    switch (type)\r
+    if(buffer_handle->handle==data2ae4Cmd)\r
     {\r
-        case 0x02://获取手机信息\r
-            type2AE4Data(buffer_handle,buf_cmd,data,data_size,totalData,crcvalue);\r
-            break;\r
-        case 0x01:\r
-            type2AE3Data(buffer_handle,buf_cmd,data,data_size,totalData,crcvalue);\r
-            break;\r
-        case 0x03://\r
-            type2AE1Data(buf_cmd,data,data_size,totalData,crcvalue);\r
-            break;\r
-        case 0x04:\r
-            type2AE0Data(buffer_handle);\r
-            break;\r
-        case 0x06:\r
-            type2AE6Data(buffer_handle,buf_cmd,data,data_size,totalData,crcvalue);\r
-        default:\r
-            break;\r
+        type2AE4Data(buffer_handle,buf_cmd,data,data_size,totalData,crcvalue);\r
+    }\r
+    else if (buffer_handle->handle==data2ae3Cmd)\r
+    {\r
+        type2AE3Data(buffer_handle,buf_cmd,data,data_size,totalData,crcvalue);\r
+    }\r
+    else if (buffer_handle->handle==data2ae1Cmd)\r
+    {\r
+        type2AE1Data(buf_cmd,data,data_size,totalData,crcvalue);\r
+    }\r
+     else if (buffer_handle->handle==data2ae0Cmd)\r
+    {\r
+        type2AE0Data(buffer_handle);\r
+    }\r
+    else if (buffer_handle->handle==data2ae6Cmd)\r
+    {\r
+        type2AE6Data(buffer_handle,buf_cmd,data,data_size,totalData,crcvalue);\r
     }\r
 }\r
 \r
index 0c73165..08d0546 100644 (file)
@@ -627,7 +627,7 @@ TYPE:02
 #define SYN_BASIC_REAL_HEATR_CMD 0x024B //同步基础训练试试心率记录
 #define APP_SEND_CHATGPT_KEY_CMD 0x0223 //APP发送chatGPT key
 #define SYN_TODAY_BASIC_TRAIN_TXT_CMD 0x024D //同步当天任意时间之后的基础训练记录
-#define APP_SEND_AI_KEY_IS_AVAILABLE_CMD  0x0601 //查询AI是否可用,APP 回复
+#define APP_SEND_AI_KEY_IS_AVAILABLE_CMD  0x0506 //查询AI是否可用,APP 回复
 
 #define SYN_APP_GET_GPS_DATA_CMD 0x024F //同步gps信息
 
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/1.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/1.bin
new file mode 100644 (file)
index 0000000..51172e5
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9f24a574150a0072dd4b9a570bab14a82a81ce335f22f0efe2498342396afe75
+size 2184
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/10.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/10.bin
new file mode 100644 (file)
index 0000000..bc7b321
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8b271d16d692cc5d6c8657c59b60226788e31faf1bd890ef0d57df395fe2692f
+size 2184
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/11.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/11.bin
new file mode 100644 (file)
index 0000000..8c1fbe2
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a60f07c4c5f84e50c88f7823067b829b724d00265e120ac37c638c4545dd2148
+size 2184
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/12.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/12.bin
new file mode 100644 (file)
index 0000000..5f9235d
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:83db015575db41bf67d2aa51204b109fb83b6107552a6fa8ef486aa68d9909d3
+size 2184
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/13.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/13.bin
new file mode 100644 (file)
index 0000000..7c38d26
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:cae43b93ac7641be73c6e76e9cd25e27e95b29851f9fea7640c047db5cb6b3a6
+size 2184
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/14.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/14.bin
new file mode 100644 (file)
index 0000000..305b5d9
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:970d0e91901900918b829c1b5cf4b5603021a93ad28a3eeeb786de9eb209a5b2
+size 2184
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/15.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/15.bin
new file mode 100644 (file)
index 0000000..5d1ff69
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e27081e4806b16ec7f48fe292c923783e62d6006daa9c39f27de76d5f8752293
+size 2184
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/16.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/16.bin
new file mode 100644 (file)
index 0000000..f2264c2
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ed6681d064ca26cd486203027c55e3ca685a9e3c16dce18364488788c74f57e8
+size 2184
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/17.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/17.bin
new file mode 100644 (file)
index 0000000..edadda4
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:65348abc3ef5c0216825e6705f768de189f1c9e9d994ab0793019e1d42977757
+size 2184
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/18.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/18.bin
new file mode 100644 (file)
index 0000000..0219775
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:17e917fc6ff0aba1a0dcdc6b901175eb35c5ce27b161b6a64feff4006cfd2be1
+size 2184
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/19.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/19.bin
new file mode 100644 (file)
index 0000000..ed33c98
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9ebc140721c21d1cf38c3d1b76cb7777bfedc508a67cb8be9b345ebe5d748fdf
+size 2184
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/2.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/2.bin
new file mode 100644 (file)
index 0000000..3a46bc8
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:19096bc443031ad77ab0ef1ca4ebfa52dc75ad63de11d9c9e2d6f05fcb435b4c
+size 2184
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/20.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/20.bin
new file mode 100644 (file)
index 0000000..9487c4a
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:78bbdb272259095dd5682e45cc1ba80b257e6deb99e6760fd2a2a785f1fddc2a
+size 2184
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/3.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/3.bin
new file mode 100644 (file)
index 0000000..81e750c
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:cda5f09486aa95998838cc1bb3d8630d9183a77b8fd9eb202c009d13cb9a72ea
+size 2184
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/4.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/4.bin
new file mode 100644 (file)
index 0000000..09fceb0
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:31f81063025756a6e38d400ff0ca3b1fbef672bf4fa03f160c54a932e9ffb785
+size 2184
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/5.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/5.bin
new file mode 100644 (file)
index 0000000..e6858ac
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fb365f3dde965aa9fbc29576c3c3a1c892cf477ea197f3bd0e770eb19b14e0b0
+size 2184
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/6.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/6.bin
new file mode 100644 (file)
index 0000000..112978e
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:cbf0c776d5c99709f6153fc9d0baca614f20e47d05b604bc9c039afb16022542
+size 2184
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/7.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/7.bin
new file mode 100644 (file)
index 0000000..69cf95c
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7e0bee053cfe10c98fa05236b89e32ac6855a63918fd9ec1c69b501d1d43908f
+size 2184
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/8.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/8.bin
new file mode 100644 (file)
index 0000000..417b0a6
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8be1901268dc16135eabbfdbbb41ad0a5574ffb0c0f9f8acce694c9ac5a23e91
+size 2184
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/9.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/connect/9.bin
new file mode 100644 (file)
index 0000000..aaec9d4
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a8af7f172f5483cf1fd252d7b614796fa625564b32666c8998eca121bbd62ac7
+size 2184
index 07e4f00..4dfda66 100755 (executable)
@@ -307,7 +307,7 @@ namespace OHOS {
  * @brief Font shaping, which is enabled by default on other platforms.
  *        Cannot take effect without ENABLE_ICU.
  */
-#define ENABLE_SHAPING                    0
+#define ENABLE_SHAPING                    1
 /**
  * @brief Advanced algorithm for line breaks, which is enabled by default on other platforms.
  */
@@ -373,7 +373,7 @@ namespace OHOS {
 /**
  * @brief image bin ability, which is disabled by default on LiteOS.
  */
-#define ENABLE_IMAGE_PACKER                   0
+#define ENABLE_IMAGE_PACKER                   1
 #endif
 
 #define ENABLE_ROTATE_INPUT               1