From 9398b30f94baea29ee1601942ae97b7a864f1041 Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Sat, 14 Sep 2024 19:14:29 +0800 Subject: [PATCH] =?utf8?q?=E8=A7=A3=E5=86=B3=E9=9D=99=E9=9F=B3=E6=A8=A1?= =?utf8?q?=E5=BC=8F=E9=94=99=E8=AF=AF=E5=BC=80=E5=90=AF=E5=90=8E=E4=BC=9A?= =?utf8?q?=E5=85=A8=E5=B1=80=E9=9D=99=E9=9F=B3bug,=E6=A0=B9=E6=8D=AE?= =?utf8?q?=E7=A6=85=E9=81=93=E6=9C=9F=E6=9C=9B=E2=80=9C=E6=9D=A5=E7=94=B5?= =?utf8?q?=E9=93=83=E5=A3=B0=E3=80=81=E7=9F=AD=E4=BF=A1=E6=B6=88=E6=81=AF?= =?utf8?q?=E6=8F=90=E9=86=92=EF=BC=8C=E5=8B=BF=E6=89=B0=E7=9D=A1=E7=9C=A0?= =?utf8?q?=E9=9D=99=E9=9F=B3=E6=A8=A1=E5=BC=8F=E4=B8=8B=E5=8F=AA=E6=9C=89?= =?utf8?q?=E4=BA=AE=E5=B1=8F=E6=8F=90=E9=86=92=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../include/SoundAndVibrationVolumeSettingC.h | 3 +-- .../soundandvibration/src/SoundAndVibrationPresenter.cpp | 4 +--- .../src/SoundAndVibrationVolumeSettingPresenter.cpp | 9 +-------- .../wearable/service/ble_service/blemoder/bletest.cpp | 1 - .../service/msg_center/src/msg_center_customer.cpp | 2 +- code/sdk/drivers/peripheral/config/src/ConfigModel.cpp | 2 -- code/sdk/drivers/peripheral/utils/custom_utils.c | 7 ------- code/sdk/drivers/peripheral/utils/custom_utils.h | 1 - 8 files changed, 4 insertions(+), 25 deletions(-) diff --git a/code/sdk/application/wearable/fd230app/nativeui/soundandvibration/include/SoundAndVibrationVolumeSettingC.h b/code/sdk/application/wearable/fd230app/nativeui/soundandvibration/include/SoundAndVibrationVolumeSettingC.h index ecb05a39d..18042a462 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/soundandvibration/include/SoundAndVibrationVolumeSettingC.h +++ b/code/sdk/application/wearable/fd230app/nativeui/soundandvibration/include/SoundAndVibrationVolumeSettingC.h @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-04-19 18:59:49 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-09-06 14:43:29 + * @LastEditTime: 2024-09-14 18:28:53 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/soundandvibration/include/SoundAndVibrationVolumeSettingC.h */ #ifndef SOUND_AND_VIBRATION_VOLUME_SETTINGC_H @@ -22,7 +22,6 @@ extern "C" void CallVolumeSet(int32_t sounding); int CallVolumeGet(void); // void VibationModeSet(int value); - void SilentModelSet(bool isopen); #ifdef __cplusplus #if __cplusplus } diff --git a/code/sdk/application/wearable/fd230app/nativeui/soundandvibration/src/SoundAndVibrationPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/soundandvibration/src/SoundAndVibrationPresenter.cpp index 159ab1222..29bcc4f4d 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/soundandvibration/src/SoundAndVibrationPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/soundandvibration/src/SoundAndVibrationPresenter.cpp @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-02-19 10:39:11 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-07-16 17:04:06 + * @LastEditTime: 2024-09-14 18:28:58 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/soundandvibration/src/SoundAndVibrationPresenter.cpp */ @@ -152,12 +152,10 @@ namespace OHOS { case UICheckBox::SELECTED: WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SilentMode is enable!"); - SilentModelSet(true); p_SoundAndVibrationModel->SetSilentModeToggleButtonStatus(true); break; case UICheckBox::UNSELECTED: WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SilentMode is disable!"); - SilentModelSet(false); p_SoundAndVibrationModel->SetSilentModeToggleButtonStatus(false); break; default: diff --git a/code/sdk/application/wearable/fd230app/nativeui/soundandvibration/src/SoundAndVibrationVolumeSettingPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/soundandvibration/src/SoundAndVibrationVolumeSettingPresenter.cpp index 8b6e66162..eda49f13e 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/soundandvibration/src/SoundAndVibrationVolumeSettingPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/soundandvibration/src/SoundAndVibrationVolumeSettingPresenter.cpp @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-04-19 10:08:31 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-09-13 18:31:03 + * @LastEditTime: 2024-09-14 18:27:21 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/soundandvibration/src/SoundAndVibrationVolumeSettingPresenter.cpp */ #include "soundandvibration/include/SoundAndVibrationVolumeSettingPresenter.h" @@ -241,13 +241,6 @@ extern "C" return GetCallCurrVolume(); } - /* - * @brief 静音模式设置 - */ - void SilentModelSet(bool isopen) - { - AudioServiceSetMasterMute(isopen); - } #ifdef __cplusplus #if __cplusplus } diff --git a/code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp b/code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp index d62fd87ec..965b740a6 100644 --- a/code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp +++ b/code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp @@ -1869,7 +1869,6 @@ void set_SilentMode(uint8_t falg)//设置静音模式 { OHOS::ConfigModel *p_ConfigModel = OHOS::ConfigModel::GetInstance(); p_ConfigModel->SetSilentMode(falg); - uapi_setSilentMode(falg); #ifdef FD230 SendMsgToUIService(UI_UPDATE_SILENT_MODE,0,nullptr,0); #endif diff --git a/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp b/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp index 4ee3333bb..0e4f5118e 100644 --- a/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp +++ b/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp @@ -854,7 +854,7 @@ void MsgCenterNotifyCatIncomingCallProc(const Topic topic, Request* req) { display_api->turn_on_screen(); } - if(true != ConfigModel::GetInstance()->GetDnotdisturb() && (!uapi_sleep_mode_flag_get())) + if(true != ConfigModel::GetInstance()->GetDnotdisturb() && (!uapi_sleep_mode_flag_get()) && true != ConfigModel::GetInstance()->GetSilentMode()) { AlarmClockModel::GetInstance()->testPlayerStart("/music/ring/ring.mp3"); } diff --git a/code/sdk/drivers/peripheral/config/src/ConfigModel.cpp b/code/sdk/drivers/peripheral/config/src/ConfigModel.cpp index f1eeac91e..34dd6ab03 100644 --- a/code/sdk/drivers/peripheral/config/src/ConfigModel.cpp +++ b/code/sdk/drivers/peripheral/config/src/ConfigModel.cpp @@ -1052,7 +1052,6 @@ namespace OHOS void ConfigModel::SetSilentMode(bool state) { set_condigData_Bool(CONFIGMODEL_ITEM_SILENT_MODE,state); - //uapi_setSilentMode(state); } /*获取静音模式是否开启*/ @@ -1370,7 +1369,6 @@ void cm_initializeSilentModel(void) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "cm_initializeSilentModel"); bool isopen = OHOS::ConfigModel::GetInstance()->GetSilentMode(); - uapi_setSilentMode(isopen); } void cm_initializeVoLTECall(void) diff --git a/code/sdk/drivers/peripheral/utils/custom_utils.c b/code/sdk/drivers/peripheral/utils/custom_utils.c index 697101f58..75668456e 100644 --- a/code/sdk/drivers/peripheral/utils/custom_utils.c +++ b/code/sdk/drivers/peripheral/utils/custom_utils.c @@ -1169,13 +1169,6 @@ int uapi_callVolumeGet(void) } -//设置是否静音 -void uapi_setSilentMode(bool isopen) -{ - #ifdef FD230 - SilentModelSet(isopen); - #endif -} void power_on_cat1(void) { uapi_cat1_power_on(1); diff --git a/code/sdk/drivers/peripheral/utils/custom_utils.h b/code/sdk/drivers/peripheral/utils/custom_utils.h index eacc91c7b..768b4582f 100644 --- a/code/sdk/drivers/peripheral/utils/custom_utils.h +++ b/code/sdk/drivers/peripheral/utils/custom_utils.h @@ -118,7 +118,6 @@ int uapi_systemVolumeGet(void); void uapi_callVolumeSet(int32_t sounding); int uapi_callVolumeGet(void); // void uapi_vibrationModeSet(int value); -void uapi_setSilentMode(bool isopen); void uapi_set4GCapability(bool isopen); errcode_t uapi_get_btaddr(uint8_t *buf_btaddr, uint32_t *len_btaddr); -- 2.17.1