From: luozheng <1732036298@qq.com> Date: Fri, 13 Mar 2026 08:50:14 +0000 (+0800) Subject: 1.AI屏蔽4GAI,修改4GAI相关信息 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=158b3af6dde11b0f00a58e26aa9e3961f5df1b9d;p=mirrors%2FFD230.git 1.AI屏蔽4GAI,修改4GAI相关信息 2.解决声音与震动界面息屏后滑动监听失效问题; --- diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/aivoice/src/AiVoiceBluetoothFailedStartView.cpp b/code/sdk/application/wearable/n9/nativeapp/nativeui/aivoice/src/AiVoiceBluetoothFailedStartView.cpp index 80752ad6b..791c39a9f 100644 --- a/code/sdk/application/wearable/n9/nativeapp/nativeui/aivoice/src/AiVoiceBluetoothFailedStartView.cpp +++ b/code/sdk/application/wearable/n9/nativeapp/nativeui/aivoice/src/AiVoiceBluetoothFailedStartView.cpp @@ -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); diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/aivoice/src/AiVoiceModel.cpp b/code/sdk/application/wearable/n9/nativeapp/nativeui/aivoice/src/AiVoiceModel.cpp index b44167ec3..7f6d83481 100644 --- a/code/sdk/application/wearable/n9/nativeapp/nativeui/aivoice/src/AiVoiceModel.cpp +++ b/code/sdk/application/wearable/n9/nativeapp/nativeui/aivoice/src/AiVoiceModel.cpp @@ -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; } diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/aivoice/src/AiVoicePresenter.cpp b/code/sdk/application/wearable/n9/nativeapp/nativeui/aivoice/src/AiVoicePresenter.cpp index e1e0f93de..40fba0d53 100644 --- a/code/sdk/application/wearable/n9/nativeapp/nativeui/aivoice/src/AiVoicePresenter.cpp +++ b/code/sdk/application/wearable/n9/nativeapp/nativeui/aivoice/src/AiVoicePresenter.cpp @@ -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); diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/sleep/src/SleepView.cpp b/code/sdk/application/wearable/n9/nativeapp/nativeui/sleep/src/SleepView.cpp index b46aff780..c03015f1a 100644 --- a/code/sdk/application/wearable/n9/nativeapp/nativeui/sleep/src/SleepView.cpp +++ b/code/sdk/application/wearable/n9/nativeapp/nativeui/sleep/src/SleepView.cpp @@ -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); diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/soundandvibration/include/SoundAndVibrationView.h b/code/sdk/application/wearable/n9/nativeapp/nativeui/soundandvibration/include/SoundAndVibrationView.h index 7922a1c02..2e296723c 100644 --- a/code/sdk/application/wearable/n9/nativeapp/nativeui/soundandvibration/include/SoundAndVibrationView.h +++ b/code/sdk/application/wearable/n9/nativeapp/nativeui/soundandvibration/include/SoundAndVibrationView.h @@ -83,6 +83,7 @@ namespace OHOS bool InitSoundAndVibrationToggleButton(void); private: + UIViewGroup *group{nullptr}; UIScrollView *SoundAndVibrationScrollView[MAX_SOUNDANDVIBRATIONVIEWID]{nullptr}; UILabelExt *Title{nullptr}; // 标题:“声音与震动” // UILabelButtonExt *SystemVolumeButton{nullptr}; // 系统音量按钮 diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/soundandvibration/src/CallVolumeView.cpp b/code/sdk/application/wearable/n9/nativeapp/nativeui/soundandvibration/src/CallVolumeView.cpp index cf6910abd..25a5d00b3 100644 --- a/code/sdk/application/wearable/n9/nativeapp/nativeui/soundandvibration/src/CallVolumeView.cpp +++ b/code/sdk/application/wearable/n9/nativeapp/nativeui/soundandvibration/src/CallVolumeView.cpp @@ -63,15 +63,15 @@ namespace OHOS return nullptr; } } + + CallVolumeScrollView->SetOnDragListener(presenter_); return CallVolumeScrollView; } void CallVolumeView::OnStart() { - GetRootContainer()->SetTouchable(true); - GetRootContainer()->SetDraggable(true); - GetRootContainer()->SetOnDragListener(presenter_); + if (!initViewStatus) { diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/soundandvibration/src/SoundAndVibrationView.cpp b/code/sdk/application/wearable/n9/nativeapp/nativeui/soundandvibration/src/SoundAndVibrationView.cpp index 9ab595b11..a33558efa 100644 --- a/code/sdk/application/wearable/n9/nativeapp/nativeui/soundandvibration/src/SoundAndVibrationView.cpp +++ b/code/sdk/application/wearable/n9/nativeapp/nativeui/soundandvibration/src/SoundAndVibrationView.cpp @@ -53,6 +53,9 @@ namespace OHOS { if (initViewStatus == true) { + group->RemoveAll(); + delete group; + group = nullptr; if (SoundAndVibrationScrollView[SOUNDANDVIBRATIONVIEW] != nullptr) { @@ -128,7 +131,7 @@ namespace OHOS FocusManager::GetInstance()->RequestFocus(SoundAndVibrationScrollView[SOUNDANDVIBRATIONVIEW]); FocusManager::GetInstance()->RequestFocusByDirection(FOCUS_DIRECTION_UP); SoundAndVibrationScrollView[SOUNDANDVIBRATIONVIEW]->SetRotateFactor(1.0); - AddViewToRootContainer(SoundAndVibrationScrollView[SOUNDANDVIBRATIONVIEW]); + group->Add(SoundAndVibrationScrollView[SOUNDANDVIBRATIONVIEW]); return true; } @@ -338,9 +341,20 @@ namespace OHOS void SoundAndVibrationView::OnStart() { - GetRootContainer()->SetTouchable(true); - GetRootContainer()->SetDraggable(true); - GetRootContainer()->SetOnDragListener(presenter_); + if (group == nullptr) + { + group = new UIViewGroup(); + if (group == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "group new fail"); + return ; + } + } + group->SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION); + group->SetDraggable(true); + group->SetTouchable(true); + group->SetOnDragListener(presenter_); + AddViewToRootContainer(group); if (!initViewStatus) { @@ -354,7 +368,7 @@ namespace OHOS if (SoundAndVibrationScrollView[thisView] == nullptr) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SoundAndVibrationView::ChangeSoundAndVibrationView"); - AddViewToRootContainer(SoundAndVibrationScrollView[thisView]); + group->Add(SoundAndVibrationScrollView[thisView]); } return true; } @@ -375,7 +389,7 @@ namespace OHOS } } SoundAndVibrationScrollView[thisView] = vibrationModeView->VibrationModeViewInit(); - AddViewToRootContainer(SoundAndVibrationScrollView[thisView]); + group->Add(SoundAndVibrationScrollView[thisView]); } return true; } diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/soundandvibration/src/SystemVolumeView.cpp b/code/sdk/application/wearable/n9/nativeapp/nativeui/soundandvibration/src/SystemVolumeView.cpp index 541b56616..cda5d2ea7 100644 --- a/code/sdk/application/wearable/n9/nativeapp/nativeui/soundandvibration/src/SystemVolumeView.cpp +++ b/code/sdk/application/wearable/n9/nativeapp/nativeui/soundandvibration/src/SystemVolumeView.cpp @@ -74,15 +74,14 @@ namespace OHOS return nullptr; } } + SystemVolumeScrollView->SetOnDragListener(presenter_); return SystemVolumeScrollView; } void SystemVolumeView::OnStart() { - GetRootContainer()->SetTouchable(true); - GetRootContainer()->SetDraggable(true); - GetRootContainer()->SetOnDragListener(presenter_); + if (!initViewStatus) {