1.优化下拉菜单耳机状态获取 1634/4 1634/head
authorluozheng <1732036298@qq.com>
Sat, 18 Jan 2025 04:35:21 +0000 (12:35 +0800)
committerluozheng <1732036298@qq.com>
Sat, 18 Jan 2025 04:35:21 +0000 (12:35 +0800)
2.关闭录音界面多余打印

code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingModel.cpp
code/sdk/application/wearable/fd230app/nativeui/settings/src/SettingModel.cpp

index 9b578e2..c3ef58a 100644 (file)
@@ -259,7 +259,7 @@ namespace OHOS
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Resource new fail");
             return OHOS_FAILURE;
         }
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Player uri %s.", Uri.c_str());
+        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Player uri %s.", Uri.c_str());
         ret = PlayerCtr->SetSource(*Resource);
         if (ret != 0)
         {
@@ -681,7 +681,7 @@ namespace OHOS
         SearchFiles(directory, Recordings, RecordingMp3FileCount);
         if (RecordingMp3FileCount != 0)
         {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Total .mp3 Files Count:%d", RecordingMp3FileCount);
+            WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Total .mp3 Files Count:%d", RecordingMp3FileCount);
             MaxRecordingNumber = atoi(info[0].recordingFileName);
             for (int i = 1; i < RecordingMp3FileCount; i++)
             {
@@ -690,7 +690,7 @@ namespace OHOS
                     MaxRecordingNumber = atoi(info[i].recordingFileName);
                 }
             }
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MaxRecordingNumber:%d", MaxRecordingNumber);
+            WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MaxRecordingNumber:%d", MaxRecordingNumber);
             // 对 Recordings 数组进行操作
             for (int i = 0; i < RecordingMp3FileCount; i++)
             {
@@ -748,7 +748,7 @@ namespace OHOS
             yyyymmhhh_date.erase(yyyymmhhh_date.length() - 1);
         }
         RecordingTimeAndDuration = (yyyymmhhh_date + "-" + TotalRecordDuration);
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "recordTime = %s recordTotalTime = %s", yyyymmhhh_date.c_str(), TotalRecordDuration.c_str());
+        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "recordTime = %s recordTotalTime = %s", yyyymmhhh_date.c_str(), TotalRecordDuration.c_str());
         return RecordingTimeAndDuration;
     }
 
@@ -757,14 +757,14 @@ namespace OHOS
      */
     int RecordingModel::GetRecordingListNum(void)
     {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RecordingModel::GetRecordingListNum %d", RecordingMp3FileCount);
+        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RecordingModel::GetRecordingListNum %d", RecordingMp3FileCount);
         return RecordingMp3FileCount;
     }
 
     // 设置录音数量
     void RecordingModel::SetRecordingListNum(int value)
     {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RecordingModel::GetRecordingListNum %d", value);
+        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RecordingModel::GetRecordingListNum %d", value);
         if (value > MAX_RECORDING_NUM)
         {
             RecordingMp3FileCount = MAX_RECORDING_NUM;
index ad95329..302a003 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-02-18 09:09:13
  * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2025-01-18 12:04:56
+ * @LastEditTime: 2025-01-18 12:26:57
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/settings/src/SettingModel.cpp
  */
 #include "settings/include/SettingModel.h"
@@ -90,7 +90,7 @@ namespace OHOS
     // 获取蓝牙耳机连接状态
     bool SettingModel::GetEarPhoneConnectStatus(void)
     {
-        return earphoneConnectStatus;
+        return uapi_dev_runtime_get_earphone_connect_stat();
     }
 
     // 获取蓝牙连接状态