解决息屏状态下录音进度条失效问题 3237/1 3237/head 3238/target/1
authorluozheng <1732036298@qq.com>
Wed, 4 Mar 2026 02:09:05 +0000 (10:09 +0800)
committerluozheng <1732036298@qq.com>
Wed, 4 Mar 2026 02:09:05 +0000 (10:09 +0800)
code/sdk/application/wearable/fd272/nativeapp/nativeui/record/include/RecordingVolumeSettingView.h
code/sdk/application/wearable/fd272/nativeapp/nativeui/record/src/RecordingPresenter.cpp
code/sdk/zhihui/utils/custom_cmd_service.c
code/sdk/zhihui/utils/custom_utils.c

index a4aaf68..bc5b08f 100644 (file)
@@ -20,6 +20,10 @@ namespace OHOS
         static RecordingVolumeSettingView *GetInstance();
         UIScrollView *RecordingVolumeSettingViewInit(void);
         void ClearAll(void);
+        SoundAndVibrationVolumeSettingView *GetSoundAndVibrationVolumeSettingView(void)
+        {
+            return p_SoundAndVibrationVolumeSettingView;
+        }
     private:
         SoundAndVibrationVolumeSettingView *p_SoundAndVibrationVolumeSettingView{nullptr};
         UIScrollView *RecordingVolumeSettingViewScrollView{nullptr};
index 16aee20..b30f644 100644 (file)
@@ -61,6 +61,16 @@ namespace OHOS
     void RecordingPresenter::OnResume(void)\r
     {\r
         RootView::GetInstance()->SetOnKeyActListener(this);\r
+        if(RecordingVolumeSettingView::GetInstance())\r
+        {\r
+            if(RecordingVolumeSettingView::GetInstance()->GetSoundAndVibrationVolumeSettingView())\r
+            {\r
+                if(RecordingVolumeSettingView::GetInstance()->GetSoundAndVibrationVolumeSettingView()->GetVolumeProcess())\r
+                {\r
+                    RecordingVolumeSettingView::GetInstance()->GetSoundAndVibrationVolumeSettingView()->GetVolumeProcess()->RequestFocus();\r
+                }\r
+            }\r
+        }\r
     }\r
 \r
     bool RecordingPresenter::OnDrag(UIView &view, const DragEvent &event)\r
index 9857e8e..8661893 100644 (file)
@@ -204,7 +204,7 @@ static void custom_cmd_service_check_task(void const *arg)
                 {
                     value |= (mail.data[i] << (i * 8));
                 }
-                    printf("uapi_systemVolumeSet: %d\n", value);
+                    // printf("uapi_systemVolumeSet: %d\n", value);
                     uapi_systemVolumeSet(value);
             }
             break;
@@ -216,7 +216,7 @@ static void custom_cmd_service_check_task(void const *arg)
                 {
                     value |= (mail.data[i] << (i * 8));
                 }
-                    printf("uapi_callVolumeSet: %d\n", value);
+                    // printf("uapi_callVolumeSet: %d\n", value);
 #ifdef SUPPORT_BLE_SERVICE
                     uapi_callVolumeSet(value);
 #endif
index b3fd855..46209e4 100644 (file)
@@ -1750,7 +1750,7 @@ int get_save_runtime_vote_status(void)
 /*系统声音设置*/
 void uapi_systemVolumeSet(int32_t volume)
 {
-    printf("uapi_systemVolume:%d\n",volume);
+    // printf("uapi_systemVolume:%d\n",volume);
     AudioServiceSetVolume(AUDIO_STREAM_MUSIC, volume);
     AudioServiceSetVolume(AUDIO_STREAM_VOICE_ASSISTANT, volume);
 }
@@ -1766,7 +1766,7 @@ int32_t uapi_systemVolumeGet(void)
 //通话音量设置
 void uapi_callVolumeSet(int32_t volume)
 {
-    printf("uapi_callVolumeSet:%d\n",volume);
+    // printf("uapi_callVolumeSet:%d\n",volume);
     AudioServiceSetVolume(AUDIO_STREAM_VOICE_CALL_BT_SCO, volume);
     AudioServiceSetVolume(AUDIO_STREAM_VOICE_CALL_VOLTE, volume);
 }