Mrntt: Call initializeDeviceReattacher in init

It works surprisingly well on the first try.
This commit is contained in:
2025-09-29 01:07:32 -04:00
parent 6cebf6856e
commit cea65dcd00
3 changed files with 34 additions and 2 deletions
+20
View File
@@ -10,6 +10,7 @@
#include <callback.h>
#include <componentThread.h>
#include <deviceManager/deviceManager.h>
#include <deviceManager/deviceReattacher.h>
#include <senseApis/senseApiManager.h>
#include <marionette/marionette.h>
#include <mind.h>
@@ -26,6 +27,10 @@ std::vector<std::shared_ptr<DeviceRole>>
std::vector<DeviceAttachmentSpec>
DeviceManager::commandLineDASpecs;
DeviceManager::~DeviceManager()
{
}
const std::string DeviceManager::stringifyDeviceSpecs(void)
{
std::ostringstream oss;
@@ -700,5 +705,20 @@ void DeviceManager::detachAllAttachedDeviceRoles(
request.get(), request));
}
void DeviceManager::initializeDeviceReattacher()
{
deviceReattacher = std::make_unique<DeviceReattacher>(
*this, mrntt::mrntt.thread);
deviceReattacher->start();
}
void DeviceManager::finalizeDeviceReattacher()
{
if (deviceReattacher) {
deviceReattacher->stop();
}
}
} // namespace device
} // namespace smo