From: luozheng <1732036298@qq.com> Date: Mon, 9 Sep 2024 13:22:51 +0000 (+0800) Subject: 修改查找手表传进来路径path_类型为char* X-Git-Tag: release_V1.2.70_20241020_135402~516^2~4 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=9903e388347153e6f78ccc7a856611efc2676037;p=mirrors%2FFD230.git 修改查找手表传进来路径path_类型为char* --- 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 c54e251f7..aeb220956 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 20:34:46 + * @LastEditTime: 2024-09-09 21:19:46 * @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"; - const char * path_{nullptr}; + 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 be9adac89..90ffabd55 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 20:43:23 + * @LastEditTime: 2024-09-09 21:20:56 * @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_ = path; + path_ = const_cast(path); ScreenTurnOn(-1); // 亮屏操作 if(true == ConfigModel::GetInstance()->GetDnotdisturb() || (uapi_sleep_mode_flag_get()))