From ca350aad2bca592af8068831918667aaa3f93df7 Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Mon, 9 Sep 2024 21:31:06 +0800 Subject: [PATCH] =?utf8?q?=20=E4=BF=AE=E6=94=B9=E6=9F=A5=E6=89=BE=E6=89=8B?= =?utf8?q?=E8=A1=A8=E4=BC=A0=E8=BF=9B=E6=9D=A5=E8=B7=AF=E5=BE=84path=5F?= =?utf8?q?=E7=B1=BB=E5=9E=8B=E4=B8=BAconst=20char*?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../msg_center/include/notify/findwatch_notification.h | 4 ++-- .../service/msg_center/src/notify/findwatch_notification.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/sdk/application/wearable/service/msg_center/include/notify/findwatch_notification.h b/code/sdk/application/wearable/service/msg_center/include/notify/findwatch_notification.h index aeb220956..3de15f56d 100644 --- a/code/sdk/application/wearable/service/msg_center/include/notify/findwatch_notification.h +++ b/code/sdk/application/wearable/service/msg_center/include/notify/findwatch_notification.h @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-03-25 17:31:19 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-09-09 21:19:46 + * @LastEditTime: 2024-09-09 21:29:37 * @FilePath: /FD230/code/sdk/application/wearable/service/msg_center/include/notify/findwatch_notification.h */ #ifndef FIND_WATCH_NOTIFICATION_H @@ -102,7 +102,7 @@ namespace OHOS AudioSession sessionId; AudioInterrupt interrupt; const char *RingMusicName = "/music/ring/findwatch.mp3"; - char * path_{nullptr}; + const char * path_{nullptr}; bool FindWatchNotifyFlag{false}; // 判断是查找手表, 由notify生成界面 bool X_DRAG_FLAG{false}; }; diff --git a/code/sdk/application/wearable/service/msg_center/src/notify/findwatch_notification.cpp b/code/sdk/application/wearable/service/msg_center/src/notify/findwatch_notification.cpp index 90ffabd55..439d3a34a 100644 --- a/code/sdk/application/wearable/service/msg_center/src/notify/findwatch_notification.cpp +++ b/code/sdk/application/wearable/service/msg_center/src/notify/findwatch_notification.cpp @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-03-25 17:33:47 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-09-09 21:20:56 + * @LastEditTime: 2024-09-09 21:29:58 * @FilePath: /FD230/code/sdk/application/wearable/service/msg_center/src/notify/findwatch_notification.cpp * @details:实现查找手表的功能一般需要手表和智能手机之间的配合,通常是通过手机上的应用(App)或其他设备发送指令给手表,触发手表的查找功能。 * 以下是基本的实现步骤: @@ -318,7 +318,7 @@ namespace OHOS */ void FindWatchViewEventListener::PopInterPlayMusic(const char *path) { - path_ = const_cast(path); + path_ = path; ScreenTurnOn(-1); // 亮屏操作 if(true == ConfigModel::GetInstance()->GetDnotdisturb() || (uapi_sleep_mode_flag_get())) -- 2.17.1