From: 罗正yun <1732036298@qq.com> Date: Tue, 23 Jan 2024 10:02:57 +0000 (+0800) Subject: Merge branch 'xts_origin' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230... X-Git-Tag: release_V1.2.70_20241020_135402~1336^2~2 X-Git-Url: http://git.snicker.com.cn/Users/apple/Desktop/static/gitweb.css?a=commitdiff_plain;h=2789fdc87c0fca3d989c5db08b3bf55ad3b42c03;p=mirrors%2FFD230.git Merge branch 'xts_origin' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into xts_origin --- 2789fdc87c0fca3d989c5db08b3bf55ad3b42c03 diff --cc code/sdk/application/wearable/nativeapp/nativelauncher/include/AppViewIDs.h index 37384b148,c53c8f931..277935e33 --- a/code/sdk/application/wearable/nativeapp/nativelauncher/include/AppViewIDs.h +++ b/code/sdk/application/wearable/nativeapp/nativelauncher/include/AppViewIDs.h @@@ -47,10 -48,8 +48,12 @@@ typedef enum : uint16_ VIEW_SYSTEM, // 系统 VIEW_SYSTEM_SYSTEM_LANGUAGE, // 系统:系统语言 VIEW_SYSTEM_FACTORY_RESET, // 系统:恢复出厂设置 + VIEW_SOUND_VIBRATION, // 声音与震动 + VIEW_SYSTEM_VOLUME, // 系统音量 + VIEW_CALL_VOLUME, // 通话音量 + VIEW_MEDIA_VOLUME, // 媒体音量 + /* ---------------------------------- 测试界面 ---------------------------------- */ + VIEW_MESSAGE, // 信息通知 /* -------------------------------------------------------------------------- */ VIEW_MAIN_TEMP, // 体温界面(暂时不用) VIEW_OFFLINEVOICE, // 语音助手界面(暂时不用) diff --cc code/sdk/application/wearable/nativeapp/nativelauncher/include/NativeLauncher.h index e4b8c4585,8cd4477ab..6b5b1757c --- a/code/sdk/application/wearable/nativeapp/nativelauncher/include/NativeLauncher.h +++ b/code/sdk/application/wearable/nativeapp/nativelauncher/include/NativeLauncher.h @@@ -5,8 -6,8 +6,10 @@@ * @LastEditTime: 2024-01-22 16:32:42 * @FilePath: /FD230/code/sdk/application/wearable/nativeapp/nativelauncher/include/NativeLauncher.h * @Description: ++ * @Description: * @ * @Copyright (c) 2024 by Caisking , All Rights Reserved. ++ * @Copyright (c) 2024 by Caisking , All Rights Reserved. */ #ifndef NATIVE_LAUNCHER_H @@@ -46,14 -47,12 +49,15 @@@ namespace OHO void InitFutureWeatherSlice(void); void InitGetWeatherDataErrorSlice(void); /* -------------------------------------------------------------------------- */ - void InitSystemSlice(void); - void InitSystemLanguageSlice(void); - void InitSystemFactoryResetSlice(void); - + void InitSystemSlice(void); + void InitSystemLanguageSlice(void); + void InitSystemFactoryResetSlice(void); /* -------------------------------------------------------------------------- */ - void InitMessageSlice(void); + void InitSoundAndVibrationSlice(void); + void InitSystemVolumeSlice(void); + void InitCallVolumeSlice(void); + void InitMediaVolumeSlice(void); ++ void InitMessageSlice(void); private: void InitAllNativeSlices(void); diff --cc code/sdk/application/wearable/nativeapp/nativelauncher/src/NativeLauncher.cpp index ffa316c8d,ee1b0f6f0..3aeee45b3 --- a/code/sdk/application/wearable/nativeapp/nativelauncher/src/NativeLauncher.cpp +++ b/code/sdk/application/wearable/nativeapp/nativelauncher/src/NativeLauncher.cpp @@@ -76,11 -76,12 +76,17 @@@ #include "system/include/SystemFactoryResetPresenter.h" #include "system/include/SystemFactoryResetView.h" +#include "soundandvibration/include/SoundAndVibrationPresenter.h" +#include "soundandvibration/include/SoundAndVibrationView.h" +#include "soundandvibration/include/SystemVolumePresenter.h" +#include "soundandvibration/include/SystemVolumeView.h" + + #include "message/include/MessageAdapter.h" + #include "message/include/MessageView.h" + #include "message/include/MessageItemView.h" + #include "message/include/MessageModel.h" + #include "message/include/MessagePresenter.h" + #include "BluetoothHeadsetEvent.h" #include "graphic_hardware_config.h" #include "graphic_service.h" @@@ -122,12 -123,15 +128,17 @@@ namespace OHO {VIEW_SYSTEM, &NativeLauncher::InitSystemSlice}, // 系统实例化地址 {VIEW_SYSTEM_SYSTEM_LANGUAGE, &NativeLauncher::InitSystemLanguageSlice}, // 系统:系统语言实例化地址 {VIEW_SYSTEM_FACTORY_RESET, &NativeLauncher::InitSystemFactoryResetSlice}, // 系统:恢复出厂设置实例化地址 + {VIEW_SOUND_VIBRATION, &NativeLauncher::InitSoundAndVibrationSlice}, // 声音与震动实例化地址 + {VIEW_SYSTEM_VOLUME, &NativeLauncher::InitSystemVolumeSlice}, // 系统音量 - //{VIEW_MAIN_ACTIVITY, &NativeLauncher::InitActivitySlice}, - //{VIEW_OFFLINEVOICE, &NativeLauncher::InitOfflineVoice}, - //{VIEW_MAIN_TEMP, &NativeLauncher::InitMainTempSlice}, - //{VIEW_UISAMPLE, &NativeLauncher::InitUISampleSlice} + + {VIEW_MESSAGE, &NativeLauncher::InitMessageSlice}, + + #if 0 + {VIEW_MAIN_ACTIVITY, &NativeLauncher::InitActivitySlice}, + {VIEW_OFFLINEVOICE, &NativeLauncher::InitOfflineVoice}, + {VIEW_MAIN_TEMP, &NativeLauncher::InitMainTempSlice}, + {VIEW_UISAMPLE, &NativeLauncher::InitUISampleSlice} + #endif }; static const ViewIdToString VIEW_MAPPER[] = { @@@ -477,24 -481,16 +488,35 @@@ NativeAbility::GetInstance().AddSliceProxy(VIEW_SYSTEM_FACTORY_RESET, systemfactoryreset); } - /* -------------------------------------------------------------------------- */ - void NativeLauncher::InitMessageSlice(void) // 系统:恢复出厂设置 ++ void NativeLauncher::InitMessageSlice(void) // 消息中心 + { + SliceProxy *messageview = new AbilitySliceProxy; + if (messageview == nullptr) + { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MessageView is nullptr"); - return; ++ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MessageView is nullptr"); ++ return; + } + NativeAbility::GetInstance().AddSliceProxy(VIEW_MESSAGE, messageview); + } - /* -------------------------------------------------------------------------- */ ++ + void NativeLauncher::InitSoundAndVibrationSlice(void) // 声音与震动 + { + SliceProxy *SoundAndVibration = new AbilitySliceProxy; + if (SoundAndVibration == nullptr) + { + return; + } + NativeAbility::GetInstance().AddSliceProxy(VIEW_SOUND_VIBRATION, SoundAndVibration); + } + + void NativeLauncher::InitSystemVolumeSlice(void) // 系统音量 + { + SliceProxy *systemvolume = new AbilitySliceProxy; + if (systemvolume == nullptr) + { + return; + } + NativeAbility::GetInstance().AddSliceProxy(VIEW_SYSTEM_VOLUME, systemvolume); + } + }