Merge #1144 into sdk602patch0626 from refs/changes/1144/head
author罗正 <1732036298@qq.com>
Thu, 10 Oct 2024 13:28:18 +0000 (13:28 +0000)
committersnickersun@163.com <accounts_62b90f7fcf51ade33b6f628e@mail.teambition.com>
Thu, 10 Oct 2024 13:28:18 +0000 (13:28 +0000)
Code review from 罗正

* refs/changes/1144/head: (20 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

  - #686,解决Al语音思考界面,动画有白色线圈bug(重新修改动画资源文件解决)

  - 修改蓝牙耳机界面,适配多国语言

  - 通过添加最高和最低亮度宏,减少硬编码

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

  - #929,解决,手电筒选择彩色,点击上按键退出后再次进入,显示不是彩色bug

  - 关于手表页面添加显示APN protocol

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

  - 解决主界面天气卡片内存泄漏问题

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/1144
59 files changed:
code/sdk/application/wearable/fd230app/nativelauncher/include/UiConfig.h
code/sdk/application/wearable/fd230app/nativeui/bluetooth/include/BluetoothDeviceListView.h
code/sdk/application/wearable/fd230app/nativeui/bluetooth/include/BluetoothEarListView.h
code/sdk/application/wearable/fd230app/nativeui/bluetooth/include/BluetoothOptionsView.h
code/sdk/application/wearable/fd230app/nativeui/bluetooth/include/TipsFailMessageView.h
code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/BluetoothDeviceListView.cpp
code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/BluetoothEarListView.cpp
code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/BluetoothOptionsView.cpp
code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/TipsConnFailMessageView.cpp
code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/TipsFailMessageView.cpp
code/sdk/application/wearable/fd230app/nativeui/flashlight/include/FlashlightPresenter.h
code/sdk/application/wearable/fd230app/nativeui/flashlight/include/FlashlightView.h
code/sdk/application/wearable/fd230app/nativeui/flashlight/src/FlashlightPresenter.cpp
code/sdk/application/wearable/fd230app/nativeui/main/src/MainViewSample.cpp
code/sdk/application/wearable/fd230app/nativeui/message/src/MessageModel.cpp
code/sdk/application/wearable/fd230app/nativeui/sleepmode/src/SleepModeModel.cpp
code/sdk/application/wearable/fd230app/nativeui/system/include/SystemAboutTheWatchView.h
code/sdk/application/wearable/fd230app/nativeui/system/src/SystemAboutTheWatchView.cpp
code/sdk/application/wearable/service/msg_center/src/notify/findwatch_notification.cpp
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/1.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/10.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/11.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/12.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/13.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/14.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/15.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/16.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/17.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/18.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/19.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/2.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/21.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/22.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/23.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/24.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/25.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/26.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/27.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/28.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/29.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/3.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/30.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/31.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/32.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/33.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/34.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/35.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/36.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/37.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/38.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/39.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/4.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/40.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/5.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/6.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/7.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/8.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/AIVoiceThinking/9.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/flashlight/color_6.bin [new file with mode: 0644]

index 9e5c260..e47fae3 100644 (file)
@@ -73,6 +73,9 @@ namespace OHOS
 #define APP_LIST_PATH "/user/res/applist_icon"
 #define APP_HEARET_ICON_PATH "/user/res/heart_chart/hearticon"//心率动画
 
+#define MIN_BRIGHTNESS 51   /*最低亮度*/
+#define MAX_BRIGHTNESS 255  /*最高亮度*/
+
     static constexpr const char *CARD_CONFIG_PATH = "/user/cardconfig.bin";
 
     /* --------------------------------- 自定义表盘配置 -------------------------------- */
index 71eb905..03ebbe1 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com\r
  * @Date: 2024-08-05 15:20:01\r
  * @LastEditors: luozheng 1732036298@qq.com\r
- * @LastEditTime: 2024-08-16 17:33:49\r
+ * @LastEditTime: 2024-10-10 10:05:27\r
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/bluetooth/include/BluetoothDeviceListView.h\r
  */\r
 #ifndef BLUETOOTH_DEVICE_LIST_VIEW_H\r
@@ -35,7 +35,7 @@ private:
     UILabelExt *titleLabel{nullptr}; /*标题:蓝牙耳机*/\r
     UILabelExt *emptyLabel{nullptr}; /*暂无已配对设备*/\r
     BluetoothDeviceCaseListAdapter *adapterText{nullptr};\r
-    UILabelButtonExt *newEquipmentButton{nullptr};\r
+    UILabelExt *newEquipmentButton{nullptr};\r
 };\r
 } // namespace OHOS\r
 #endif // BLUETOOTH_DEVICE_LIST_VIEW_H
\ No newline at end of file
index 06d6111..8106fc8 100644 (file)
@@ -40,7 +40,7 @@ private:
     UIList *list{nullptr};\r
     UILabelExt *titleLabel{nullptr};\r
     BluetoothCaseListAdapter *adapterText{nullptr};\r
-    UILabelButtonExt *rescanButton{nullptr};\r
+    UILabelExt *rescanButton{nullptr};\r
     UILabelButtonExt *cancelConnedRequestButton{nullptr};\r
 };\r
 } // namespace OHOS\r
index 3d42f8d..ae1157b 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com\r
  * @Date: 2024-08-05 15:20:01\r
  * @LastEditors: luozheng 1732036298@qq.com\r
- * @LastEditTime: 2024-09-04 18:20:24\r
+ * @LastEditTime: 2024-10-09 19:52:58\r
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/bluetooth/include/BluetoothOptionsView.h\r
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\r
  */\r
@@ -48,6 +48,7 @@ namespace OHOS
         UILabelExt *EarPhoneDeviceName{nullptr};  // 蓝牙耳机设备名\r
         UILabelExt *pairState{nullptr};           // 已配对或者未配对\r
         UILabelButtonExt *unpairButton{nullptr};     // 取消配对按钮\r
+        UILabelExt *unpairLabel{nullptr};          // 取消配对标签\r
         bd_addr_t currentAddr;\r
 \r
         /*下面两个组件暂时设为不可见待到需要时使用*/\r
index 000cc6b..fe11194 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com\r
  * @Date: 2024-08-05 15:20:01\r
  * @LastEditors: luozheng 1732036298@qq.com\r
- * @LastEditTime: 2024-08-14 17:36:25\r
+ * @LastEditTime: 2024-10-10 10:19:05\r
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/bluetooth/include/TipsFailMessageView.h\r
  */\r
 \r
@@ -36,7 +36,7 @@ namespace OHOS
         UILabelExt *titleLabel{nullptr};             /*标题:蓝牙耳机 */\r
         UIImageView *btIconImage{nullptr};           /*灰色的蓝牙图标*/\r
         UILabelExt *btHeadsetNotFoundLabel{nullptr}; /*当前搜索不到耳机蓝牙设备*/\r
-        UILabelButtonExt *rescanButton{nullptr};     /*重新搜索按钮*/\r
+        UILabelExt *rescanButton{nullptr};     /*重新搜索按钮*/\r
     };\r
 } // namespace OHOS\r
 #endif // TIPS_FAIL_MESSAGE_VIEW_H
\ No newline at end of file
index e72f778..22489b0 100644 (file)
@@ -89,7 +89,7 @@ namespace OHOS
             list->SetStyle(STYLE_BORDER_RADIUS, 50);\r
             list->SetDragACCLevel(5);\r
             list->SetSwipeACCLevel(800);\r
-            // list->SetReboundSize(30);\r
+            list->SetReboundSize(30);\r
             // list->SetScrollBlankSize(30);\r
             list->SetAdapter(adapterText);\r
         }\r
@@ -131,22 +131,25 @@ namespace OHOS
     {\r
         if (newEquipmentButton == nullptr)\r
         {\r
-            newEquipmentButton = new UILabelButtonExt();\r
+            newEquipmentButton = new UILabelExt();\r
             if (newEquipmentButton == nullptr)\r
             {\r
                 WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "BluetoothDeviceListView newEquipmentButton new fail");\r
                 return;\r
             }\r
         }\r
-        newEquipmentButton->SetPosition(173, 390, 120, 40);\r
+        newEquipmentButton->SetPosition(133, 390, 200, 40);\r
         newEquipmentButton->SetTextId(STR_BT_HEADSET_RESCAN); // 重新搜索\r
         newEquipmentButton->SetViewId(BLUETOOTH_NEWEQUIPMENT_BUTTON);\r
         newEquipmentButton->SetStyle(STYLE_BACKGROUND_COLOR, 0xffffffff);\r
         newEquipmentButton->SetStyle(STYLE_BACKGROUND_OPA, 0x00);\r
         // newEquipmentButton->SetImageSrc(PNG_466x100BUTTON_IMAGE, PNG_466x100BUTTON_IMAGE);\r
         newEquipmentButton->SetTextColor(Color::GetColorFromRGBA(0x35, 0x49, 0xff, 0xff));\r
-        newEquipmentButton->SetStyleForState(STYLE_BACKGROUND_OPA, 0x00, UIButton::PRESSED);\r
+        // newEquipmentButton->SetStyleForState(STYLE_BACKGROUND_OPA, 0x00, UIButton::PRESSED);\r
+        newEquipmentButton->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
         newEquipmentButton->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);\r
+        newEquipmentButton->SetLineBreakMode(UILabel::LINE_BREAK_OSCILLATION);\r
+        newEquipmentButton->SetTouchable(true);\r
         UIView::OnClickListener *clickListener = (UIView::OnClickListener *)OHOS::PlayersPresenter::GetInstance();\r
         UIView::OnClickListener *clickListener2 = (UIView::OnClickListener *)OHOS::BluetoothPresenter::GetInstance();\r
         if ((clickListener == nullptr) && (clickListener2 == nullptr))\r
index ef37e1b..77199db 100644 (file)
@@ -176,21 +176,24 @@ namespace OHOS
     {\r
         if (rescanButton == nullptr)\r
         {\r
-            rescanButton = new UILabelButtonExt();\r
+            rescanButton = new UILabelExt();\r
             if (rescanButton == nullptr)\r
             {\r
                 WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "BluetoothDeviceListView rescanButton new fail");\r
                 return;\r
             }\r
         }\r
-        rescanButton->SetPosition(173, 390, 120, 40);\r
+        rescanButton->SetPosition(133, 390, 200, 40);\r
         rescanButton->SetTextId(STR_BT_HEADSET_RESCAN); // 重新搜索\r
         rescanButton->SetViewId(BLUETOOTH_RESCAN_BUTTON);\r
         rescanButton->SetStyle(STYLE_BACKGROUND_COLOR, 0xffffffff);\r
         rescanButton->SetStyle(STYLE_BACKGROUND_OPA, 0x00);\r
         rescanButton->SetTextColor(Color::GetColorFromRGBA(0x35, 0x49, 0xff, 0xff));\r
-        rescanButton->SetStyleForState(STYLE_BACKGROUND_OPA, 0x00, UIButton::PRESSED);\r
+        // rescanButton->SetStyleForState(STYLE_BACKGROUND_OPA, 0x00, UIButton::PRESSED);\r
         rescanButton->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);\r
+        rescanButton->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
+        rescanButton->SetLineBreakMode(UILabel::LINE_BREAK_OSCILLATION);\r
+        rescanButton->SetTouchable(true);\r
         group->Add(rescanButton);\r
         UIView::OnClickListener *clickListener = (UIView::OnClickListener *)OHOS::PlayersPresenter::GetInstance();\r
         UIView::OnClickListener *clickListener2 = (UIView::OnClickListener *)OHOS::BluetoothPresenter::GetInstance();\r
index 77ed596..a33b9fb 100644 (file)
@@ -54,6 +54,11 @@ namespace OHOS
                 delete unpairButton;\r
                 unpairButton = nullptr;\r
             }\r
+            if (unpairLabel)\r
+            {\r
+                delete unpairLabel;\r
+                unpairLabel = nullptr;\r
+            }\r
             if (connectStateLabel)\r
             {\r
                 delete connectStateLabel;\r
@@ -201,7 +206,7 @@ namespace OHOS
             }\r
         }\r
         unpairButton->SetPosition(0, 366, 466, 100);\r
-        unpairButton->SetTextId(STR_UNPAIR); // 取消配对\r
+        // unpairButton->SetTextId(STR_UNPAIR); // 取消配对\r
         unpairButton->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);\r
         unpairButton->SetViewId(BLUETOOTH_UNPAIR_BUTTON);\r
         unpairButton->SetImageSrc(PNG_BUTTON_466x100_IMAGE, PNG_BUTTON_466x100_IMAGE);\r
@@ -215,6 +220,26 @@ namespace OHOS
         {\r
             unpairButton->SetOnClickListener(clickListener2);\r
         }\r
+        /* -------------------------------------------------------------------------- */\r
+        if (unpairLabel == nullptr)\r
+        {\r
+            unpairLabel = new UILabelExt();\r
+            if (unpairLabel == nullptr)\r
+            {\r
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "unpairLabel new fail");\r
+                return false;\r
+            }\r
+        }\r
+        unpairLabel->SetPosition(173, unpairButton->GetY() + 33, 120, 35);\r
+        unpairLabel->SetStyle(STYLE_TEXT_FONT, 30);\r
+        unpairLabel->SetStyle(STYLE_LINE_HEIGHT, 35);\r
+        unpairLabel->SetTextId(STR_UNPAIR); // 取消配对\r
+        unpairLabel->SetTextColor(Color::GetColorFromRGBA(0xff, 0x5a, 0x36, 0xff));\r
+        unpairLabel->SetLineBreakMode(UILabel::LINE_BREAK_OSCILLATION);\r
+        unpairLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
+        unpairLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);\r
+        // unpairLabel->SetRollSpeed(70);\r
+        /* -------------------------------------------------------------------------- */\r
         return true;\r
     }\r
 \r
@@ -307,6 +332,7 @@ namespace OHOS
         group->Add(EarPhoneDeviceName);\r
         group->Add(pairState);\r
         group->Add(unpairButton);\r
+        group->Add(unpairLabel);\r
         group->Add(optionsOneButton);\r
         group->Add(connectStateLabel);\r
 \r
index 5fdfd13..d44de8c 100644 (file)
@@ -183,7 +183,7 @@ namespace OHOS
                 bluetoothNameLabel->SetStyle(STYLE_LINE_HEIGHT, 35);\r
                 bluetoothNameLabel->SetLineBreakMode(UILabel::LINE_BREAK_OSCILLATION);\r
                 bluetoothNameLabel->SetRollSpeed(70);\r
-                bluetoothNameLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);\r
+                bluetoothNameLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, 30);\r
                 bluetoothNameLabel->SetAlign(UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER, UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER);\r
             }\r
             /* ----------------------------- conn_fail_Label ---------------------------- */\r
@@ -201,7 +201,7 @@ namespace OHOS
                 conn_fail_Label->SetStyle(STYLE_LINE_HEIGHT, 35);\r
                 conn_fail_Label->SetLineBreakMode(UILabel::LINE_BREAK_OSCILLATION);\r
                 conn_fail_Label->SetRollSpeed(70);\r
-                conn_fail_Label->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, 30);\r
+                conn_fail_Label->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);\r
                 conn_fail_Label->SetAlign(UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER, UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER);\r
                 conn_fail_Label->SetTextColor(Color::GetColorFromRGBA(0xff, 0xff, 0xff, 0x7f));\r
             }\r
index 49982ff..c8bd189 100644 (file)
@@ -131,7 +131,7 @@ namespace OHOS
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "TipsFailMessageView::CreateTipsFailMessageLabelButton");\r
         if (rescanButton == nullptr)\r
         {\r
-            rescanButton = new UILabelButtonExt();\r
+            rescanButton = new UILabelExt();\r
             if (rescanButton == nullptr)\r
             {\r
                 WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TipsFailMessageView rescanButton new fail");\r
@@ -151,7 +151,10 @@ namespace OHOS
             rescanButton->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);\r
             rescanButton->SetViewId(BLUETOOTH_FAIL_BACK_BUTTON);\r
             rescanButton->SetTextColor(Color::GetColorFromRGBA(0x35, 0x49, 0xff, 0xff));\r
-            rescanButton->SetStyleForState(STYLE_BACKGROUND_OPA, 0x00, UIButton::PRESSED);\r
+            // rescanButton->SetStyleForState(STYLE_BACKGROUND_OPA, 0x00, UIButton::PRESSED);\r
+            rescanButton->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
+            rescanButton->SetLineBreakMode(UILabel::LINE_BREAK_OSCILLATION);\r
+            rescanButton->SetTouchable(true);\r
             if (BluetoothModel::GetInstance()->GetBluetoothCalleridStatus() == CALLERPLAYERS)\r
             {\r
                 rescanButton->SetOnClickListener(clickListener);\r
index 9927f85..e19b0b6 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-04-10 17:32:31
  * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-06-07 17:52:25
+ * @LastEditTime: 2024-10-10 11:40:08
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/flashligh/include/FlashlightPresenter.h
  */
 
@@ -47,7 +47,7 @@ namespace OHOS
     constexpr int64_t ColorValue_ColorSettingItem_[COLOR_SETTING_ITEM_COUNT] = 
                                                     {
                                                         0xffffffff, 0xffff5a36, 0xff4fc34c,
-                                                        0xff3549ff, 0xffff8a36, 0xffffffff
+                                                        0xff3549ff, 0xffff8a36, 0xff8120e2
                                                     };
 
 
index a4aa0ff..efc1a0e 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-04-10 17:32:02
  * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-09-13 18:55:12
+ * @LastEditTime: 2024-10-10 11:42:10
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/flashligh/include/FlashlightView.h
  */
 
@@ -135,7 +135,8 @@ namespace OHOS
                                                         "/user/res/flashlight/color_2.bin", 
                                                         "/user/res/flashlight/color_3.bin", 
                                                         "/user/res/flashlight/color_4.bin", 
-                                                        "/user/res/flashlight/color_5.bin",
+                                                        // "/user/res/flashlight/color_5.bin", //自定义颜色
+                                                        "/user/res/flashlight/color_6.bin",   //紫色
                                                     };
 
         #define COLOR_CUSTOM_BACKGROUND_IMAGE "/user/res/flashlight/color_custom_bg.bin"
index 8cbb454..9a8c5c3 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-10-09 17:19:01
+ * @LastEditTime: 2024-10-10 11:31:51
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/flashligh/src/FlashlightPresenter.cpp
  */
 
@@ -19,6 +19,8 @@
 namespace OHOS
 {
 
+#define IS_SUPPORT_CUSTOM_COLOR 0 //是否支持自定义颜色
+
     // 当前Presenter属性实例化的内存指针
     static FlashlightPresenter *g_pFlashlightPresenter = nullptr;
 
@@ -138,13 +140,14 @@ namespace OHOS
 
         for(i = 0; i < COLOR_SETTING_ITEM_COUNT; i++)
         {
+#if IS_SUPPORT_CUSTOM_COLOR
             if(0 == strcmp(Flashlight_ViewId_ImageColorSettingItem_[COLOR_SETTING_ITEM_COUNT - 1], view.GetViewId()))
             {
                 FlashlightModel::GetInstance().SetColorIndex(COLOR_SETTING_ITEM_COUNT - 1);
                 view_->DisplayColorCustomScreen();
                 return true;
             }
-
+#endif
             if(0 == strcmp(Flashlight_ViewId_ImageColorSettingItem_[i], view.GetViewId()))
             {
                 FlashlightModel::GetInstance().SetColorIndex(i);
@@ -154,6 +157,7 @@ namespace OHOS
             }
         }
 
+#if IS_SUPPORT_CUSTOM_COLOR
         if(0 == strcmp(Flashlight_ViewId_ImageColorCustomBackground_, view.GetViewId()))
         {
             Point point = event.GetCurrentPos();
@@ -167,7 +171,7 @@ namespace OHOS
             view_->DisplayViewMainScreen();
             return true;
         }
-
+#endif
         return true;
     }
 
index 9ad7c3d..dabb123 100644 (file)
@@ -162,6 +162,11 @@ namespace OHOS
             delete traingView;
             traingView = nullptr;
         }
+        if (weatherControlView != nullptr)
+        {
+            delete weatherControlView;
+            weatherControlView = nullptr;
+        }
         if (GoalControlView != nullptr)
         {
             GoalControlView->RemoveAll();
@@ -182,8 +187,8 @@ namespace OHOS
         {
             delete callback;
             callback = nullptr;
-            g_pMainView = nullptr;
         }
+        g_pMainView = nullptr;
     }
     MainViewSample *MainViewSample::GetInstance(void)
     {
@@ -522,7 +527,7 @@ namespace OHOS
         weatherControlView = new WeatherControlView();
         if (weatherControlView == nullptr)
         {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "mainweatherView new fail");
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "weatherControlView new fail");
             return nullptr;
         }
         return weatherControlView;
@@ -531,11 +536,11 @@ namespace OHOS
     // 主界面每日目标卡片
     UICardPage *MainViewSample::InitGoalPage(void)
     {
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainViewSample::InitWeatherPage");
+        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainViewSample::InitGoalPage");
         GoalControlView = new goalControlView();
         if (GoalControlView == nullptr)
         {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "mainweatherView new fail");
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "GoalControlView new fail");
             return nullptr;
         }
         return GoalControlView;
index 0142b4b..3f820ad 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * @Date: 2024-06-21 09:56:18
  * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-10-09 14:53:41
+ * @LastEditTime: 2024-10-10 11:50:09
  * @FilePath:
  * /XTS_FD230/FD230/code/sdk/application/wearable/fd230app/nativeui/message/src/MessageModel.cpp
  */
index cc330ff..672dacd 100644 (file)
@@ -44,7 +44,7 @@ namespace OHOS
 
         // turn down brightness
         const power_display_svr_api_t *display_api = power_display_svr_get_api();
-        display_api->set_brightness(51);
+        display_api->set_brightness(MIN_BRIGHTNESS);
     }
 
     void SleepModeModel::SetSleepModeDisabled(void)
index 8916e25..f15f0d4 100644 (file)
@@ -1,8 +1,8 @@
 /*\r
  * @Author: luozheng 1732036298@qq.com\r
  * @Date: 2024-03-30 09:14:38\r
- * @LastEditors: penglei 1624952103@qq.com\r
- * @LastEditTime: 2024-08-31 18:57:13\r
+ * @LastEditors: luozheng 1732036298@qq.com\r
+ * @LastEditTime: 2024-10-10 14:48:08\r
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/system/include/SystemAboutTheWatchView.h\r
  */\r
 #ifndef SYSTEM_ABOUT_VIEW_H\r
@@ -66,6 +66,8 @@ namespace OHOS
         UILabel *HWVER = nullptr;\r
         UILabel *CyweeVersionTitle = nullptr;\r
         UILabel *CyweeVersion = nullptr;\r
+        UILabel *APNprotocolTitle = nullptr;     //APN协议\r
+        UILabel * APNprotocol = nullptr;\r
         bool initViewStatus{false};\r
     };\r
 }\r
index f627103..7dc7d45 100644 (file)
@@ -3,6 +3,7 @@
 #include "wearable_log.h"\r
 #include "custom_utils.h"\r
 #include "ConfigModel.h"\r
+#include "ui_resource_string.h"\r
 \r
 #define WATCH_ABOUT_TITLE_HEIGHT 50\r
 #define WATCH_ABOUT_VALUE_HEIGHT 80\r
@@ -20,7 +21,9 @@
 #define WATCH_MODEM_VERSION_VALUE_TOP (WATCH_MODEM_VERSION_TOP + WATCH_ABOUT_TITLE_HEIGHT)\r
 #define WATCH_MODEM_APP_VERSION_TOP (WATCH_MODEM_VERSION_VALUE_TOP + WATCH_ABOUT_VALUE_HEIGHT)\r
 #define WATCH_MODEM_APP_VERSION_VALUE_TOP (WATCH_MODEM_APP_VERSION_TOP + WATCH_ABOUT_TITLE_HEIGHT)\r
-#define WATCH_IMEI_TOP (WATCH_MODEM_APP_VERSION_VALUE_TOP + WATCH_ABOUT_VALUE_HEIGHT)\r
+#define WATCH_APN_PROTOCOL_TOP (WATCH_MODEM_APP_VERSION_VALUE_TOP + WATCH_ABOUT_VALUE_HEIGHT)\r
+#define WATCH_APN_PROTOCOL_VALUE_TOP (WATCH_APN_PROTOCOL_TOP + WATCH_ABOUT_TITLE_HEIGHT)\r
+#define WATCH_IMEI_TOP (WATCH_APN_PROTOCOL_VALUE_TOP + WATCH_ABOUT_VALUE_HEIGHT)\r
 #define WATCH_IMEI_VALUE_TOP (WATCH_IMEI_TOP + WATCH_ABOUT_TITLE_HEIGHT)\r
 #define WATCH_FONT_TOP (WATCH_IMEI_VALUE_TOP + WATCH_ABOUT_VALUE_HEIGHT)\r
 #define WATCH_FONT_VALUE_TOP (WATCH_FONT_TOP + WATCH_ABOUT_TITLE_HEIGHT)\r
@@ -127,6 +130,11 @@ namespace OHOS
             delete CyweeVersion;\r
             CyweeVersion = nullptr;\r
 \r
+            delete APNprotocolTitle;\r
+            APNprotocolTitle = nullptr;\r
+            delete APNprotocol;\r
+            APNprotocol = nullptr;\r
+\r
             FocusManager::GetInstance()->ClearFocus();\r
             delete SystemAboutTheWatchScrollView;\r
             SystemAboutTheWatchScrollView = nullptr;\r
@@ -480,6 +488,43 @@ namespace OHOS
         PyVer->SetTextColor(Color::GetColorFromRGBA(0xff, 0xff, 0xff, 0x87));\r
         SystemAboutTheWatchScrollView->Add(PyVer);\r
         /* -------------------------------------------------------------------------- */\r
+        Config = {\r
+            .left = TITLE_LABEL_X,\r
+            .top = WATCH_APN_PROTOCOL_TOP,\r
+            .width = TITLE_LABEL_W,\r
+            .height = TITLE_LABEL_H,\r
+            .fontSize = TITLE_LABEL_FONTSIZE,\r
+            .lineHeigh = TITLE_LABEL_LINEHEIGHT,\r
+            .text = "APN protocol",\r
+            .lineBreakMode = UILabel::LINE_BREAK_OSCILLATION,\r
+        };\r
+        APNprotocolTitle = InitLabel(Config);\r
+        if (APNprotocolTitle == nullptr)\r
+        {\r
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemAboutTheWatchView::APNprotocolTitle new fail!");\r
+            return nullptr;\r
+        }\r
+        SystemAboutTheWatchScrollView->Add(APNprotocolTitle);\r
+        /* -------------------------------------------------------------------------- */\r
+        Config = {\r
+            .left = LABEL_X,\r
+            .top = WATCH_APN_PROTOCOL_VALUE_TOP,\r
+            .width = LABEL_W,\r
+            .height = LABEL_H,\r
+            .fontSize = LABEL_FONTSIZE,\r
+            .lineHeigh = TITLE_LABEL_LINEHEIGHT,\r
+            .text = "IPV4/IPV6",\r
+            .lineBreakMode = UILabel::LINE_BREAK_WRAP,\r
+        };\r
+        APNprotocol = InitLabel(Config);\r
+        if (APNprotocol == nullptr)\r
+        {\r
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemAboutTheWatchView::APNprotocol new fail!");\r
+            return nullptr;\r
+        }\r
+        APNprotocol->SetTextColor(Color::GetColorFromRGBA(0xff, 0xff, 0xff, 0x87));\r
+        SystemAboutTheWatchScrollView->Add(APNprotocol);\r
+        /* -------------------------------------------------------------------------- */\r
         Config = {\r
             .left = TITLE_LABEL_X,\r
             .top = WATCH_IMEI_TOP,\r
index dcf393d..f040736 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-10-09 11:21:37
+ * @LastEditTime: 2024-10-10 11:50:28
  * @FilePath: /FD230/code/sdk/application/wearable/service/msg_center/src/notify/findwatch_notification.cpp
  * @details:实现查找手表的功能一般需要手表和智能手机之间的配合,通常是通过手机上的应用(App)或其他设备发送指令给手表,触发手表的查找功能。
  * 以下是基本的实现步骤:
@@ -157,7 +157,7 @@ namespace OHOS
         if (display_api)
         {
             /*100%亮度*/
-            int max_brightness_value = 255;
+            int max_brightness_value = MAX_BRIGHTNESS;
             if (display_api->set_brightness(max_brightness_value) != ERRCODE_SUCC)
             {
                 WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[FindWatchViewEventListener] set_brightness fail!!");
@@ -175,7 +175,7 @@ namespace OHOS
             int brightnessValue;
             if(uapi_dev_runtime_get_saveele_status()) //如果是省电模式状态下退出要把亮度设置为最低
             {
-                brightnessValue = 51;
+                brightnessValue = MIN_BRIGHTNESS;//恢复到最低亮度
             }
             else
             {
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/flashlight/color_6.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/flashlight/color_6.bin
new file mode 100644 (file)
index 0000000..5d9fd6d
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:db64294ada1a7af09d5867cb260b37777eb5f43220b1ce13060330d23641d72d
+size 4504