系统音量内调闹钟声音
authorluozheng <1732036298@qq.com>
Tue, 19 May 2026 03:46:38 +0000 (11:46 +0800)
committerluozheng <1732036298@qq.com>
Tue, 19 May 2026 03:46:38 +0000 (11:46 +0800)
code/sdk/application/wearable/fd272/service/msg_center/src/notify/alarm_notification.cpp
code/sdk/application/wearable/fd272/service/msg_center/src/notify/findwatch_notification.cpp
code/sdk/zhihui/utils/custom_utils.c

index dc16123..2141142 100644 (file)
@@ -514,7 +514,7 @@ namespace OHOS
             /* -------------------------------------------------------------------------- */\r
             StartAlarmTimer(AlarmTimerType::NOTIFY_ALARM_RING, NOTIFY_ONE_SECOND);\r
 \r
-            // AlarmViewEventListener::GetInstance()->PopAlarmRing(); //闹钟响铃\r
+            AlarmViewEventListener::GetInstance()->PopAlarmRing(); //闹钟响铃\r
             g_onKeyActListener = RootView::GetInstance()->GetOnKeyActListener();\r
             RootView::GetInstance()->SetOnKeyActListener(AlarmViewEventListener::GetInstance());\r
 \r
index 453f6e8..c12e55d 100644 (file)
@@ -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();
index 98bb6ef..c2f9a60 100644 (file)
@@ -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);
 }
 
 /*系统声音获取*/