1.添加APP在调节系统音量时候若当前界面在音乐的的声音调节视图则ui同步显示设置的音量值。
authorluozheng <1732036298@qq.com>
Wed, 18 Sep 2024 12:39:01 +0000 (20:39 +0800)
committerSnickerSun <snickersun@163.com>
Thu, 10 Oct 2024 04:16:35 +0000 (12:16 +0800)
2.解决音乐从本地音乐切换到手机音乐在切换到本地音乐切换不回来bug

code/sdk/application/wearable/fd230app/nativeui/phoneservice/src/PhoneService.cpp

index 6713cc0..eb8a0da 100644 (file)
@@ -1887,12 +1887,10 @@ 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)); // 转换
-        unsigned char hfpVolume = volume;
-
+        // int32_t volume = PhoneCAT1AudioGetVolume();
+        // int32_t minVolume = PhoneAudioGetCAT1MinVolume();
+        // int32_t maxVolume = PhoneAudioGetCAT1MAXVolume();
+        // // unsigned char hfpVolume = (unsigned char)((volume * CALL_VOLUME_MAX) / (maxVolume - minVolume)); // 转换
 
 
         // if (volume != 0 && hfpVolume == 0) {
@@ -1905,11 +1903,10 @@ 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)); // 转换
-        unsigned char hfpVolume = volume;
+        // int32_t volume = PhoneAudioGetVolume();
+        // int32_t minVolume = PhoneAudioGetMinVolume();
+        // int32_t maxVolume = PhoneAudioGetMaxVolume();
+        // // unsigned char hfpVolume = (unsigned char)((volume * CALL_VOLUME_MAX) / (maxVolume - minVolume)); // 转换
 
         // // if (volume != 0 && hfpVolume == 0) {
         // //     hfpVolume = 1;