From: xue <2144439972@qq.com> Date: Fri, 28 Nov 2025 02:05:47 +0000 (+0800) Subject: 优化时间同步 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=7feef455fff5c7a249fbed7db8a08c78d1c7e312;p=mirrors%2FFD230.git 优化时间同步 --- diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp index bd612f2c2..2e44a377b 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp @@ -1545,10 +1545,11 @@ extern "C" { { if (init_falg == false) { - #if defined(SUPPORT_CAT1_SERVICE) || defined(SUPPORT_PPP_SERVICE) - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "HandlePowerKey: restart_time_sync"); - restart_time_sync(); - #endif + // #if defined(SUPPORT_CAT1_SERVICE) || defined(SUPPORT_PPP_SERVICE) + // WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "HandlePowerKey: restart_time_sync"); + // restart_time_sync(); + // #endif + cat1_gettime(); //发送获取绑定用户ID do_ln_http_server_send_data(LN_HTTP_SERVICE_CMD_GET_USER_ID, NULL, 0); // 网络连接成功,调用HTTP服务获取设备Token diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdPresenter.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdPresenter.cpp index 0201030d2..603a8936d 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdPresenter.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdPresenter.cpp @@ -278,10 +278,11 @@ namespace OHOS // 按下电源键 if (keyState == InputDevice::STATE_PRESS) { powerKeyPressed = true; // 设置按下标志位 - #if defined(SUPPORT_CAT1_SERVICE) || defined(SUPPORT_PPP_SERVICE) - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "HandlePowerKey: restart_time_sync"); - restart_time_sync(); - #endif + // #if defined(SUPPORT_CAT1_SERVICE) || defined(SUPPORT_PPP_SERVICE) + // WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "HandlePowerKey: restart_time_sync"); + // restart_time_sync(); + // #endif + cat1_gettime(); if (screenState == 1) { // 息屏状态下按下:亮屏(由系统自动处理) // 亮屏时触发时间同步 @@ -925,10 +926,12 @@ namespace OHOS */ void ThunderBirdPresenter::HandleFuncKeyLongPress(void) { - #if defined(SUPPORT_CAT1_SERVICE) || defined(SUPPORT_PPP_SERVICE) - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "HandleFuncKeyLongPress: restart_time_sync"); - restart_time_sync(); - #endif + // #if defined(SUPPORT_CAT1_SERVICE) || defined(SUPPORT_PPP_SERVICE) + // WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "HandleFuncKeyLongPress: restart_time_sync"); + // restart_time_sync(); + // #endif + cat1_gettime(); + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ThunderBirdPresenter::HandleFuncKeyLongPress - FUNC key long press detected"); // 长按FUNC键2秒的处理逻辑 // 触发对话模式切换