From: luozheng <1732036298@qq.com> Date: Tue, 19 May 2026 03:46:38 +0000 (+0800) Subject: 系统音量内调闹钟声音 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=05fe9aa03573008ccbd1302e0164ddbc661cb06f;p=mirrors%2FFD230.git 系统音量内调闹钟声音 --- diff --git a/code/sdk/application/wearable/fd272/service/msg_center/src/notify/alarm_notification.cpp b/code/sdk/application/wearable/fd272/service/msg_center/src/notify/alarm_notification.cpp index dc161230a..2141142a5 100644 --- a/code/sdk/application/wearable/fd272/service/msg_center/src/notify/alarm_notification.cpp +++ b/code/sdk/application/wearable/fd272/service/msg_center/src/notify/alarm_notification.cpp @@ -514,7 +514,7 @@ namespace OHOS /* -------------------------------------------------------------------------- */ StartAlarmTimer(AlarmTimerType::NOTIFY_ALARM_RING, NOTIFY_ONE_SECOND); - // AlarmViewEventListener::GetInstance()->PopAlarmRing(); //闹钟响铃 + AlarmViewEventListener::GetInstance()->PopAlarmRing(); //闹钟响铃 g_onKeyActListener = RootView::GetInstance()->GetOnKeyActListener(); RootView::GetInstance()->SetOnKeyActListener(AlarmViewEventListener::GetInstance()); diff --git a/code/sdk/application/wearable/fd272/service/msg_center/src/notify/findwatch_notification.cpp b/code/sdk/application/wearable/fd272/service/msg_center/src/notify/findwatch_notification.cpp index 453f6e8e2..c12e55dd5 100644 --- a/code/sdk/application/wearable/fd272/service/msg_center/src/notify/findwatch_notification.cpp +++ b/code/sdk/application/wearable/fd272/service/msg_center/src/notify/findwatch_notification.cpp @@ -236,7 +236,7 @@ namespace OHOS WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ActivateAudioInterrupt faild"); return OHOS_FAILURE; } - playerCtr->SetVolume(300, 300); // 将左声道和右声道音量都设置为50 + // playerCtr->SetVolume(300, 300); // 将左声道和右声道音量都设置为50 playerCtr->SetAudioSessionId(sessionId); // 播放 playerCtr->Play(); diff --git a/code/sdk/zhihui/utils/custom_utils.c b/code/sdk/zhihui/utils/custom_utils.c index 98bb6ef54..c2f9a608f 100644 --- a/code/sdk/zhihui/utils/custom_utils.c +++ b/code/sdk/zhihui/utils/custom_utils.c @@ -1791,6 +1791,8 @@ void uapi_systemVolumeSet(int32_t volume) // printf("uapi_systemVolume:%d\n",volume); AudioServiceSetVolume(AUDIO_STREAM_MUSIC, volume); AudioServiceSetVolume(AUDIO_STREAM_VOICE_ASSISTANT, volume); + AudioServiceSetVolume(AUDIO_STREAM_NOTIFICATION_SYSTEM, volume); + AudioServiceSetVolume(AUDIO_STREAM_RING, volume); } /*系统声音获取*/