回撤native修改代码 1406/2
authorhcj <1224667075@qq.com>
Fri, 15 Nov 2024 02:56:27 +0000 (10:56 +0800)
committerhcj <1224667075@qq.com>
Fri, 15 Nov 2024 02:56:27 +0000 (10:56 +0800)
code/sdk/application/wearable/nativeapp/nativeui/rebootdevice/src/RebootPresenter.cpp

index df2f52c..948e0c9 100755 (executable)
@@ -55,14 +55,13 @@ bool RebootPresenter::OnClick(UIView& view, const ClickEvent& event)
         // 重启
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "REBOOTDEVICE_BUTTON OnClick");
         //GetPMSDefaultInterface()->RebootDevice(NULL, NULL);
-        // uapi_reboot_device();
-        shutdown_reboot_prejobs(REBOOT_TYPE);
-    } else if (strcmp(view.GetViewId(), SHUTDOWNDEVICE_BUTTON) == 0) {
+        uapi_reboot_device();
+            } else if (strcmp(view.GetViewId(), SHUTDOWNDEVICE_BUTTON) == 0) {
         // 关机
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SHUTDOWNDEVICE_BUTTON OnClick");
         //GetPMSDefaultInterface()->ShutDownDevice(NULL, NULL);
-        // uapi_poweroff_device();
-         shutdown_reboot_prejobs(SHUTDOWN_TYPE);
+        uapi_poweroff_device();
+         //shutdown_reboot_prejobs(SHUTDOWN_TYPE);
     }
     return true;
 }