|
|
@ -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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|