解决静音模式错误开启后会全局静音bug,根据禅道期望“来电铃声、短信消息提醒,勿扰睡眠静音模式下只有亮屏提醒” 977/2 977/head
authorluozheng <1732036298@qq.com>
Sat, 14 Sep 2024 11:14:29 +0000 (19:14 +0800)
committerluozheng <1732036298@qq.com>
Sat, 14 Sep 2024 11:14:29 +0000 (19:14 +0800)
code/sdk/application/wearable/fd230app/nativeui/soundandvibration/include/SoundAndVibrationVolumeSettingC.h
code/sdk/application/wearable/fd230app/nativeui/soundandvibration/src/SoundAndVibrationPresenter.cpp
code/sdk/application/wearable/fd230app/nativeui/soundandvibration/src/SoundAndVibrationVolumeSettingPresenter.cpp
code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp
code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp
code/sdk/drivers/peripheral/config/src/ConfigModel.cpp
code/sdk/drivers/peripheral/utils/custom_utils.c
code/sdk/drivers/peripheral/utils/custom_utils.h

index ecb05a3..18042a4 100644 (file)
@@ -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
 }
index 159ab12..29bcc4f 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com\r
  * @Date: 2024-02-19 10:39:11\r
  * @LastEditors: luozheng 1732036298@qq.com\r
- * @LastEditTime: 2024-07-16 17:04:06\r
+ * @LastEditTime: 2024-09-14 18:28:58\r
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/soundandvibration/src/SoundAndVibrationPresenter.cpp\r
  */\r
 \r
@@ -152,12 +152,10 @@ namespace OHOS
         {\r
         case UICheckBox::SELECTED:\r
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SilentMode is enable!");\r
-            SilentModelSet(true);\r
             p_SoundAndVibrationModel->SetSilentModeToggleButtonStatus(true);\r
             break;\r
         case UICheckBox::UNSELECTED:\r
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SilentMode is disable!");\r
-            SilentModelSet(false);\r
             p_SoundAndVibrationModel->SetSilentModeToggleButtonStatus(false);\r
             break;\r
         default:\r
index 8b6e661..eda49f1 100644 (file)
@@ -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
 }
index d62fd87..965b740 100644 (file)
@@ -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
index 4ee3333..0e4f511 100644 (file)
@@ -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");
         }
index f1eeac9..34dd6ab 100644 (file)
@@ -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)
index 697101f..7566845 100644 (file)
@@ -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);
index eacc91c..768b458 100644 (file)
@@ -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);