fix(设备发现): 添加检查UUID路径逻辑
添加检查UUID路径逻辑 Closes 146038 【多端协同】平板模式下,安卓设备向麒麟设备投屏后,投屏窗口不会自动弹出,需要再次点击多端协同应用可以弹出(复现概率:2/10)
This commit is contained in:
parent
5a65637b25
commit
bf0c4f5fbf
|
@ -7,6 +7,9 @@
|
|||
#include <unistd.h>
|
||||
#include <QFile>
|
||||
#include <QThread>
|
||||
#include <QDir>
|
||||
|
||||
const QString DSOFTBUS_UUID_PATH = "/data/data";
|
||||
|
||||
ConnectivityManager::ConnectivityManager() {}
|
||||
|
||||
|
@ -92,6 +95,13 @@ void ConnectivityManager::startDiscServer(QString cmd)
|
|||
{
|
||||
qInfo() << "disc softbus init";
|
||||
m_discServer = new QProcess(this);
|
||||
QDir dir;
|
||||
if (dir.exists(DSOFTBUS_UUID_PATH)) {
|
||||
qInfo() << "DSoftbus is useful";
|
||||
} else {
|
||||
dir.mkdir(DSOFTBUS_UUID_PATH);
|
||||
}
|
||||
|
||||
connect(m_discServer, &QProcess::started, this, [=]() {
|
||||
Q_EMIT sigInitDiscServer(true);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue