重启设备走SysApi的实现

nx2024
Matthew 3 months ago
parent b7208d231d
commit baea01d47a

@ -1032,22 +1032,7 @@ bool CPhoneDevice::InstallAPP(const std::string& path, unsigned int delayedTime)
bool CPhoneDevice::Reboot(int resetType, const std::string& reason) bool CPhoneDevice::Reboot(int resetType, const std::string& reason)
{ {
if (resetType == REBOOT_TYPE_DEVICE) RestartApp(resetType, 1000, reason);
{
// reboot the device
std::thread t([]()
{
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
GpioControl::reboot();
});
t.detach();
}
else
{
long timeout = 1000;
RestartApp(resetType, timeout, reason);
}
return true; return true;
} }

Loading…
Cancel
Save