1.AI屏蔽4GAI,修改4GAI相关信息 3272/1 3272/head 3273/target/1
authorluozheng <1732036298@qq.com>
Fri, 13 Mar 2026 08:31:20 +0000 (16:31 +0800)
committerluozheng <1732036298@qq.com>
Fri, 13 Mar 2026 08:31:20 +0000 (16:31 +0800)
2.解决声音与震动界面息屏后滑动监听失效问题;

code/sdk/application/wearable/n9/nativeapp/nativeui/aivoice/src/AiVoiceBluetoothFailedStartView.cpp
code/sdk/application/wearable/n9/nativeapp/nativeui/aivoice/src/AiVoiceModel.cpp
code/sdk/application/wearable/n9/nativeapp/nativeui/aivoice/src/AiVoicePresenter.cpp
code/sdk/application/wearable/n9/nativeapp/nativeui/sleep/src/SleepView.cpp
code/sdk/application/wearable/n9/nativeapp/nativeui/soundandvibration/include/SoundAndVibrationView.h
code/sdk/application/wearable/n9/nativeapp/nativeui/soundandvibration/src/CallVolumeView.cpp
code/sdk/application/wearable/n9/nativeapp/nativeui/soundandvibration/src/SoundAndVibrationView.cpp
code/sdk/application/wearable/n9/nativeapp/nativeui/soundandvibration/src/SystemVolumeView.cpp

index 80752ad..791c39a 100644 (file)
@@ -98,6 +98,10 @@ namespace OHOS
             label->SetText("中国移动智能助理灵犀");
             #endif
         }
+        else if(labelconfig.textId == STR_PCY4GC_OR_AS)
+        {
+            label->SetText("请打开手机APP连接");
+        }
         else
             label->SetTextId(labelconfig.textId);
         label->SetLineBreakMode(labelconfig.lineBreakMode);
index b44167e..7f6d834 100644 (file)
@@ -161,10 +161,11 @@ namespace OHOS
     // 获取4G网络是否正常
     bool AiVoiceModel::GetMobileDataIsOpen(void)
     {
-        if (uapi_dev_runtime_get_cat1_networkstat() == 1)
-        {
-            return true;
-        }
+        //屏蔽4G网络判断
+        // if (uapi_dev_runtime_get_cat1_networkstat() == 1)
+        // {
+        //     return true;
+        // }
         return false;
     }
 
index e1e0f93..40fba0d 100644 (file)
@@ -439,6 +439,7 @@ namespace OHOS
              *   3.只有与APP蓝牙连接正常         -> 通过蓝牙连接APP调用大模型
              *   4.两者连接都异常               -> 返回错误
              */
+            // bool netWork4GState = model->GetMobileDataIsOpen();
             bool netWork4GState = model->GetMobileDataIsOpen();
             bool appBluetoothConnectState = model->GetAPPBluetoothIsConnect();
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "netWork4GState = %d,appBluetoothConnectState = %d", netWork4GState, appBluetoothConnectState);
index b46aff7..c03015f 100644 (file)
@@ -45,7 +45,7 @@ void SleepView::SleepDataRefresh() {
     return;
   }
 
-  WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,
+  WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,
                 "SleepDataRefresh %d %d sleep_goal:%d total_sleep:%d",
                 sleep_hour, sleep_min, sleep_goal * 60, total_sleep);
 
index 7922a1c..2e29672 100644 (file)
@@ -83,6 +83,7 @@ namespace OHOS
         bool InitSoundAndVibrationToggleButton(void);\r
 \r
     private:\r
+        UIViewGroup *group{nullptr};\r
         UIScrollView *SoundAndVibrationScrollView[MAX_SOUNDANDVIBRATIONVIEWID]{nullptr};\r
         UILabelExt *Title{nullptr};                         // 标题:“声音与震动”\r
         // UILabelButtonExt *SystemVolumeButton{nullptr};      // 系统音量按钮\r
index cf6910a..25a5d00 100644 (file)
@@ -63,15 +63,15 @@ namespace OHOS
                 return nullptr;\r
             }\r
         }\r
+        \r
+        CallVolumeScrollView->SetOnDragListener(presenter_);\r
 \r
         return CallVolumeScrollView;\r
     }\r
 \r
     void CallVolumeView::OnStart()\r
     {\r
-        GetRootContainer()->SetTouchable(true);\r
-        GetRootContainer()->SetDraggable(true);\r
-        GetRootContainer()->SetOnDragListener(presenter_);\r
+        \r
 \r
         if (!initViewStatus)\r
         {\r
index 9ab595b..a33558e 100644 (file)
@@ -53,6 +53,9 @@ namespace OHOS
     {\r
         if (initViewStatus == true)\r
         {\r
+            group->RemoveAll();\r
+            delete group;\r
+            group = nullptr;\r
 \r
             if (SoundAndVibrationScrollView[SOUNDANDVIBRATIONVIEW] != nullptr)\r
             {\r
@@ -128,7 +131,7 @@ namespace OHOS
         FocusManager::GetInstance()->RequestFocus(SoundAndVibrationScrollView[SOUNDANDVIBRATIONVIEW]);\r
         FocusManager::GetInstance()->RequestFocusByDirection(FOCUS_DIRECTION_UP);\r
         SoundAndVibrationScrollView[SOUNDANDVIBRATIONVIEW]->SetRotateFactor(1.0);\r
-        AddViewToRootContainer(SoundAndVibrationScrollView[SOUNDANDVIBRATIONVIEW]);\r
+        group->Add(SoundAndVibrationScrollView[SOUNDANDVIBRATIONVIEW]);\r
 \r
         return true;\r
     }\r
@@ -338,9 +341,20 @@ namespace OHOS
 \r
     void SoundAndVibrationView::OnStart()\r
     {\r
-        GetRootContainer()->SetTouchable(true);\r
-        GetRootContainer()->SetDraggable(true);\r
-        GetRootContainer()->SetOnDragListener(presenter_);\r
+        if (group == nullptr)\r
+        {\r
+            group = new UIViewGroup();\r
+            if (group == nullptr)\r
+            {\r
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "group new fail");\r
+                return ;\r
+            }\r
+        }\r
+        group->SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);\r
+        group->SetDraggable(true);\r
+        group->SetTouchable(true);\r
+        group->SetOnDragListener(presenter_);\r
+        AddViewToRootContainer(group);\r
 \r
         if (!initViewStatus)\r
         {\r
@@ -354,7 +368,7 @@ namespace OHOS
         if (SoundAndVibrationScrollView[thisView] == nullptr)\r
         {\r
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SoundAndVibrationView::ChangeSoundAndVibrationView");\r
-            AddViewToRootContainer(SoundAndVibrationScrollView[thisView]);\r
+            group->Add(SoundAndVibrationScrollView[thisView]);\r
         }\r
         return true;\r
     }\r
@@ -375,7 +389,7 @@ namespace OHOS
                 }\r
             }\r
             SoundAndVibrationScrollView[thisView] = vibrationModeView->VibrationModeViewInit();\r
-            AddViewToRootContainer(SoundAndVibrationScrollView[thisView]);\r
+            group->Add(SoundAndVibrationScrollView[thisView]);\r
         }\r
         return true;\r
     }\r
index 541b566..cda5d2e 100644 (file)
@@ -74,15 +74,14 @@ namespace OHOS
                 return nullptr;\r
             }\r
         }\r
+        SystemVolumeScrollView->SetOnDragListener(presenter_);\r
 \r
         return SystemVolumeScrollView;\r
     }\r
 \r
     void SystemVolumeView::OnStart()\r
     {\r
-        GetRootContainer()->SetTouchable(true);\r
-        GetRootContainer()->SetDraggable(true);\r
-        GetRootContainer()->SetOnDragListener(presenter_);\r
+        \r
 \r
         if (!initViewStatus)\r
         {\r