From e86eb264841f13a6dad720582bf5fd3c2c329e38 Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Wed, 26 Jun 2024 14:34:13 +0800 Subject: [PATCH] =?utf8?q?=E6=95=B0=E6=8D=AE=E7=AE=A1=E7=90=86=E7=B1=BB?= =?utf8?q?=E5=85=B3=E9=97=AD=E9=83=A8=E5=88=86=E7=9B=B4=E6=8E=A5=E7=9A=84?= =?utf8?q?=E6=8C=87=E4=BB=A4=E6=93=8D=E4=BD=9C=EF=BC=8C=E5=B7=B2=E6=94=BE?= =?utf8?q?=E5=88=B0=E5=90=84=E8=87=AA=E7=9A=84=E9=80=BB=E8=BE=91=E5=A4=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../wearable/service/ble_service/blemoder/bletest.cpp | 5 +++++ code/sdk/drivers/peripheral/config/src/ConfigModel.cpp | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) 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 49bba2f76..1f1b67b2e 100644 --- a/code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp +++ b/code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp @@ -866,6 +866,7 @@ void set_vibrationremiander(uint8_t falg)//设置震动模式 { OHOS::ConfigModel *p_ConfigModel = OHOS::ConfigModel::GetInstance(); p_ConfigModel->SetVibrationReminder(falg); + uapi_vibrationModeSet(falg); SendMsgToUIService(UI_UPDATE_VIBRATION_MODE,0,nullptr,0); return ; } @@ -874,6 +875,7 @@ void set_SilentMode(uint8_t falg)//设置静音模式 { OHOS::ConfigModel *p_ConfigModel = OHOS::ConfigModel::GetInstance(); p_ConfigModel->SetSilentMode(falg); + uapi_setSilentMode(falg); SendMsgToUIService(UI_UPDATE_SILENT_MODE,0,nullptr,0); return; } @@ -910,6 +912,7 @@ void set_brigthness(uint8_t data) //设置屏幕亮度 else if(data >= maxbrightness) data = maxbrightness; p_ConfigModel->SetBrightness(data); + uapi_setScreenBrightness(data); SendMsgToUIService(UI_UPDATE_BRIGHTNESS_VALUE,0,nullptr,0); return; } @@ -963,6 +966,7 @@ void Set_SystemVolume(int value) //设置系统音量 { OHOS::ConfigModel *p_ConfigModel = OHOS::ConfigModel::GetInstance(); p_ConfigModel->SetSystemVolume(value); + uapi_systemVolumeSet(value); SendMsgToUIService(UI_UPDATE_SYSTEM_VOLUME,0,nullptr,0); return; } @@ -977,6 +981,7 @@ void Set_CallVolume(int value) //设置通话音量 { OHOS::ConfigModel *p_ConfigModel = OHOS::ConfigModel::GetInstance(); p_ConfigModel->SetCallVolume(value); + uapi_callVolumeSet(value); SendMsgToUIService(UI_UPDATE_CALL_VOLUME,0,nullptr,0); return; } diff --git a/code/sdk/drivers/peripheral/config/src/ConfigModel.cpp b/code/sdk/drivers/peripheral/config/src/ConfigModel.cpp index 6dfe4ba99..ba11493f7 100644 --- a/code/sdk/drivers/peripheral/config/src/ConfigModel.cpp +++ b/code/sdk/drivers/peripheral/config/src/ConfigModel.cpp @@ -1047,7 +1047,7 @@ namespace OHOS { uapi_dev_runtime_set_vibmod(state); set_condigData_Int(CONFIGMODEL_ITEM_VIBRATOR_SWITCH,state); - uapi_vibrationModeSet(state); + //uapi_vibrationModeSet(state); } /*获取震动模式强度*/ @@ -1064,7 +1064,7 @@ namespace OHOS void ConfigModel::SetSilentMode(bool state) { set_condigData_Bool(CONFIGMODEL_ITEM_SILENT_MODE,state); - uapi_setSilentMode(state); + //uapi_setSilentMode(state); } /*获取静音模式是否开启*/ @@ -1126,7 +1126,7 @@ namespace OHOS void ConfigModel::SetBrightness(int level) { set_condigData_Int(CONFIGMODEL_ITEM_SCREEN_BRIGHTNESS_VALUE,level); - cm_initScreenBrightness();//实时更新屏幕亮度用于协议下发亮度值 + //cm_initScreenBrightness();//实时更新屏幕亮度用于协议下发亮度值 } // 获取亮度值 @@ -1139,7 +1139,7 @@ namespace OHOS void ConfigModel::SetSystemVolume(int value) { set_condigData_Int(CONFIGMODEL_ITEM_SYSTEM_VOLUME,value); - uapi_systemVolumeSet(value); + //uapi_systemVolumeSet(value); } //获取系统音量 @@ -1152,7 +1152,7 @@ namespace OHOS void ConfigModel::SetCallVolume(int value) { set_condigData_Int(CONFIGMODEL_ITEM_CALL_VOLUME,value); - uapi_callVolumeSet(value); + //uapi_callVolumeSet(value); } //获取通话音量 -- 2.17.1