Merge #1136 into sdk602patch0626 from refs/changes/1136/head
author罗正 <1732036298@qq.com>
Thu, 10 Oct 2024 02:49:45 +0000 (02:49 +0000)
committerSnickerSun <snickersun@163.com>
Thu, 10 Oct 2024 13:51:31 +0000 (21:51 +0800)
Code review from 罗正

* refs/changes/1136/head: (12 commits squashed)

  - 绑定弹窗增加按键监听,解决开机动画已经开始,被按键打断问题

  - 1.修改查找手表定时器定时器未关闭bug
    2.#915,解决,省电模式下,使用查找手表后,手表亮度会默认恢复,亮度不再是最低bug

  - 解决#966呼吸训练有改动,多了设置分钟,以及开始按钮,有问题。bug

  - 关闭ChangeSlice中showsStackSliceId打印

  - Merge branch &#39;sdk602patch0626&#39; of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into sdk602patch0626

  - 1.解决呼吸训练过程中出现消息弹窗而取消常亮屏,通过添加runtime解决
    2.将呼吸训练常亮屏操作只在开始训练时开启,而不是进入就设置常亮屏

  - 解决计时器和秒表图片是相反的问题

  - #673,解决蓝牙设备搜索显示框没有自适应显示,导致需要下拉才知道有多个设备bug

  - 解决,#674蓝牙搜索界面,优化重新搜索字样显示位置bug,(绑定成功界面)

  - #928,解决,手电筒设置为闪烁,上滑的时候,背景亮度会根据手电筒亮度变bug

  - 优化蓝牙耳机显示列表

  - #523,解决,录音列表,在只有几条不用滑动查看录音的时候,固定界面不允许滑动bug

Signed-off-by: 罗正 <1732036298@qq.com>
Reviewed-by: snickersun@163.com <accounts_62b90f7fcf51ade33b6f628e@mail.teambition.com>
Merged-by: snickersun@163.com <accounts_62b90f7fcf51ade33b6f628e@mail.teambition.com>
link: https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230/change/1136
12 files changed:
code/sdk/application/wearable/fd230app/nativeui/flashlight/src/FlashlightPresenter.cpp
code/sdk/application/wearable/fd230app/nativeui/message/src/MessageModel.cpp
code/sdk/application/wearable/fd230app/nativeui/record/src/RecordListView.cpp
code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingListAdapter.cpp
code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingListitemView.cpp
code/sdk/application/wearable/fd230app/nativeui/respiratorytraining/include/RespiratoryTrainingModel.h
code/sdk/application/wearable/fd230app/nativeui/respiratorytraining/src/RespiratoryTrainingModel.cpp
code/sdk/application/wearable/fd230app/nativeui/respiratorytraining/src/RespiratoryTrainingPresenter.cpp
code/sdk/application/wearable/fd230app/nativeui/respiratorytraining/src/RespiratoryTrainingView.cpp
code/sdk/application/wearable/service/msg_center/include/notify/pairing_notification.h
code/sdk/application/wearable/service/msg_center/src/notify/findwatch_notification.cpp
code/sdk/application/wearable/service/msg_center/src/notify/pairing_notification.cpp

index 883bad2..8cbb454 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-04-10 17:32:38
  * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-09-23 11:13:30
+ * @LastEditTime: 2024-10-09 17:19:01
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/flashligh/src/FlashlightPresenter.cpp
  */
 
index 762c562..2929ded 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * @Date: 2024-06-21 09:56:18
  * @LastEditors: SnickerSun snickersun@163.com
- * @LastEditTime: 2024-10-10 16:32:14
+ * @LastEditTime: 2024-10-10 21:51:13
  * @FilePath: /XTS_FD230/FD230/code/sdk/application/wearable/fd230app/nativeui/message/src/MessageModel.cpp
  */
 
@@ -185,24 +185,17 @@ static void Notify(void *args, const Topic topic, Request *request) {
           return;  
         }  
 
-        // 发送弹窗通知 会自动查询到数组的最新一个  
-        CustomEventPublish(TOPIC_EVENT_MESSAGENOTE, NULL, 0);  
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Message popup sent");  
-
-        // 发送完毕,重置标志  
-        shouldDisplayMessage = false; // 重置状态  
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,  
-                      "Reset shouldDisplayMessage to false");  
-      } else {  
-        WEARABLE_LOGE( WEARABLE_LOG_MODULE_APP, "Message display delayed, waiting for next opportunity %lld ms %lld ms",   
-                       std::chrono::duration_cast<std::chrono::milliseconds>(timeDiff).count(),   
-                       std::chrono::duration_cast<std::chrono::milliseconds>(updateDelay).count());  
-      }  
-    }  
-  } else {  
-    WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "No new message to display");  
-  }  
-}
+            // 发送信息进行弹窗 
+            if(uapi_dev_runtime_get_train_status()||uapi_dev_runtime_get_saveele_status()|| uapi_dev_runtime_get_respiratory_training_status())
+            {
+              //增加训练模式下,不弹窗
+              //省电模式,不弹窗
+              //呼吸训练,不弹窗
+                return;
+            }
+            CustomEventPublish(TOPIC_EVENT_MESSAGENOTE, NULL, 0);
+        }
+    }
 
     void saveancsdata()
     {
index 5866c38..7dc7479 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com\r
  * @Date: 2024-02-27 09:16:50\r
  * @LastEditors: luozheng 1732036298@qq.com\r
- * @LastEditTime: 2024-09-30 17:06:25\r
+ * @LastEditTime: 2024-10-09 17:53:56\r
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordListView.cpp\r
  */\r
 \r
index 1fd07d4..1e8faa6 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-08-05 15:20:03
  * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-08-31 09:26:00
+ * @LastEditTime: 2024-10-09 18:11:09
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingListAdapter.cpp
  */
 #include "record/include/RecordingListAdapter.h"
index b3acc03..86b7995 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-03-02 20:10:18
- * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-10-05 10:45:23
+ * @LastEditors: SnickerSun snickersun@163.com
+ * @LastEditTime: 2024-10-10 21:51:20
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingListitemView.cpp
  */
 #include "record/include/RecordingListitemView.h"
@@ -42,7 +42,7 @@ namespace OHOS
         m_recordId.SetText(itemInfo.recordId.c_str());
         m_recordTotalTime.SetText(itemInfo.recordTotalTime);
         m_recordTime.SetText(itemInfo.recordTime);
-        //·ÀÖ¹listÖÐÔªËØ³¬¹ý3¸öºó×îºóÒ»¸ö±»ÕÚס£¬ÇÒ½öÔÚ×îºóÒ»¸öÔªËØÉèÖÃÆä¸ß¶ÈΪ160
+        //防止list中元素超过3个后最后一个被遮住,且仅在最后一个元素设置其高度为160
         if (RecordingModel::GetInstance()->GetRecordingListNum() > 2 && GetViewIndex() == RecordingModel::GetInstance()->GetRecordingListNum() - 1)
         {
             SetHeight(160);
index 4149144..a6ad2c5 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-06-11 16:26:13
  * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-10-04 19:59:41
+ * @LastEditTime: 2024-10-09 12:22:31
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/respiratorytraining/include/RespiratoryTrainingModel.h
  */
 #ifndef RESPIRATORY_TRAINING_MODEL_H
index 838abbe..d054f78 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-06-11 16:26:20
  * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-10-04 20:05:04
+ * @LastEditTime: 2024-10-09 15:09:06
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/respiratorytraining/src/RespiratoryTrainingModel.cpp
  */
 #include "respiratorytraining/include/RespiratoryTrainingModel.h"
index d11c080..d7c988c 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-05-07 11:26:06
  * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-10-05 12:30:08
+ * @LastEditTime: 2024-10-09 15:08:31
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/RespiratoryTraining/src/RespiratoryTrainingPresenter.cpp
  */
 
index d340b33..6428903 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-05-07 11:25:58
  * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-10-05 12:37:07
+ * @LastEditTime: 2024-10-09 15:07:50
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/RespiratoryTraining/src/RespiratoryTrainingView.cpp
  */
 
index 143ef57..ae032a7 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-03-22 09:48:07
- * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-10-09 09:54:34
+ * @LastEditors: SnickerSun snickersun@163.com
+ * @LastEditTime: 2024-10-10 21:51:27
  * @FilePath: /FD230/code/sdk/application/wearable/service/msg_center/include/notify/pairing_notification.h
  */
 #ifndef PAIRING_NOTIFICATION_H
@@ -23,7 +23,7 @@ namespace OHOS
     public:
         static PairingViewEventListener &GetInstance(void);
         bool OnClick(OHOS::UIView &view, const OHOS::ClickEvent &event) override;
-        bool OnKeyAct(UIView &view, const KeyEvent &event) override; // Ôö¼Ó°´¼üʼþ
+        bool OnKeyAct(UIView &view, const KeyEvent &event) override; // 增加按键事件
         void SetDeviceName(char *Name);
         char *GetDeviceName();
         void DeviceUnBindingViewIsVisible(bool state);
index 4f0978e..dcf393d 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-03-25 17:33:47
  * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-09-14 17:31:21
+ * @LastEditTime: 2024-10-09 11:21:37
  * @FilePath: /FD230/code/sdk/application/wearable/service/msg_center/src/notify/findwatch_notification.cpp
  * @details:实现查找手表的功能一般需要手表和智能手机之间的配合,通常是通过手机上的应用(App)或其他设备发送指令给手表,触发手表的查找功能。
  * 以下是基本的实现步骤:
index 3ff1a9d..4ac3cc2 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-03-22 10:04:36
  * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-10-08 16:33:30
+ * @LastEditTime: 2024-10-09 10:08:29
  * @FilePath: /FD230/code/sdk/application/wearable/service/msg_center/src/notify/pairing_notification.cpp
  */
 #include "notification_manager.h"