启动电源控制线程

hdrplus
Matthew 7 months ago
parent 36750d6e85
commit cd220aa256

@ -363,7 +363,10 @@ bool GpioControl::Startup()
// if (m_thread.)
m_exitSignal = false;
m_thread = std::thread(PowerControlThreadProc);
#ifdef _DEBUG
pthread_t nativeHandle = m_thread.native_handle();
pthread_setname_np(nativeHandle, "gpioclose");
#endif
return true;
}

@ -441,6 +441,8 @@ CPhoneDevice::CPhoneDevice(JavaVM* vm, jobject service, const std::string& appPa
RegisterHandlerForSignal(SIGUSR2);
GpioControl::Startup();
LoadNetworkInfo();
m_vm = vm;
@ -533,6 +535,8 @@ CPhoneDevice::~CPhoneDevice()
delete m_network;
m_network = NULL;
}
GpioControl::Stop();
}
void CPhoneDevice::SetListener(IListener* listener)

Loading…
Cancel
Save