From c85a5b9371a5537aaa0fb7f9d9c60a0f76b383a0 Mon Sep 17 00:00:00 2001 From: Matthew Date: Mon, 12 May 2025 16:33:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=B0=E7=9A=84=E9=87=8D?= =?UTF-8?q?=E5=90=AF=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/cpp/PhoneDevice.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/cpp/PhoneDevice.cpp b/app/src/main/cpp/PhoneDevice.cpp index caf3028d..d01497f8 100644 --- a/app/src/main/cpp/PhoneDevice.cpp +++ b/app/src/main/cpp/PhoneDevice.cpp @@ -1204,11 +1204,16 @@ bool CPhoneDevice::Reboot(int resetType, bool manually, const std::string& reaso GpioControl::reboot(); #else RestartApp(resetType, timeout, reason); - std::thread t([timeout]() + std::thread t([timeout, fileName]() { // Double Calls std::this_thread::sleep_for(std::chrono::milliseconds(timeout + 5000)); GpioControl::reboot(); + + writeFile(fileName + ".new", NULL, 0); + + std::this_thread::sleep_for(std::chrono::milliseconds(5000)); + GpioControl::reboot2(); }); t.detach();