. #720,解决,手表默认通话音量过小,手表是恢复出厂设置后查看的bug
authorluozheng <1732036298@qq.com>
Wed, 18 Sep 2024 10:30:39 +0000 (18:30 +0800)
committerSnickerSun <snickersun@163.com>
Thu, 10 Oct 2024 04:14:45 +0000 (12:14 +0800)
code/sdk/application/wearable/fd230app/nativeui/phoneservice/src/PhoneService.cpp

index eb8a0da..6713cc0 100644 (file)
@@ -1887,10 +1887,12 @@ unsigned char GetCallCurrVolume(void)
 {
     if(OHOS::CallerLogModel::GetInstance()->GetCallSource() == OHOS::CallerLogModel::CallSourceCat1)
     {
-        // int32_t volume = PhoneCAT1AudioGetVolume();
-        // int32_t minVolume = PhoneAudioGetCAT1MinVolume();
-        // int32_t maxVolume = PhoneAudioGetCAT1MAXVolume();
-        // // unsigned char hfpVolume = (unsigned char)((volume * CALL_VOLUME_MAX) / (maxVolume - minVolume)); // 转换
+         int32_t volume = PhoneCAT1AudioGetVolume();
+        int32_t minVolume = PhoneAudioGetCAT1MinVolume();
+        int32_t maxVolume = PhoneAudioGetCAT1MAXVolume();
+        // unsigned char hfpVolume = (unsigned char)((volume * CALL_VOLUME_MAX) / (maxVolume - minVolume)); // 转换
+        unsigned char hfpVolume = volume;
+
 
 
         // if (volume != 0 && hfpVolume == 0) {
@@ -1903,10 +1905,11 @@ unsigned char GetCallCurrVolume(void)
     }
     else
     {
-        // int32_t volume = PhoneAudioGetVolume();
-        // int32_t minVolume = PhoneAudioGetMinVolume();
-        // int32_t maxVolume = PhoneAudioGetMaxVolume();
-        // // unsigned char hfpVolume = (unsigned char)((volume * CALL_VOLUME_MAX) / (maxVolume - minVolume)); // 转换
+        int32_t volume = PhoneAudioGetVolume();
+        int32_t minVolume = PhoneAudioGetMinVolume();
+        int32_t maxVolume = PhoneAudioGetMaxVolume();
+        // unsigned char hfpVolume = (unsigned char)((volume * CALL_VOLUME_MAX) / (maxVolume - minVolume)); // 转换
+        unsigned char hfpVolume = volume;
 
         // // if (volume != 0 && hfpVolume == 0) {
         // //     hfpVolume = 1;