forked from qt-creator/qt-creator
Android: Use avdmanager tool
android tool is deprecated since sdk tools version 25.3.0. Use the new avdmanager tool Task-number: QTCREATORBUG-17814 Change-Id: Id6f495f14e12d0069df08164cac1929b76d9e932 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include "androidmanager.h"
|
||||
#include "androidconstants.h"
|
||||
#include "androidglobal.h"
|
||||
#include "androidavdmanager.h"
|
||||
|
||||
#include <coreplugin/fileutils.h>
|
||||
#include <coreplugin/icore.h>
|
||||
@@ -262,8 +263,9 @@ bool AndroidDeployQtStep::init(QList<const BuildStep *> &earlierSteps)
|
||||
|
||||
m_adbPath = AndroidConfigurations::currentConfig().adbToolPath().toString();
|
||||
|
||||
if (AndroidConfigurations::currentConfig().findAvd(m_avdName).isEmpty())
|
||||
AndroidConfigurations::currentConfig().startAVDAsync(m_avdName);
|
||||
AndroidAvdManager avdManager;
|
||||
if (avdManager.findAvd(m_avdName).isEmpty())
|
||||
avdManager.startAvdAsync(m_avdName);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -414,7 +416,7 @@ void AndroidDeployQtStep::slotSetSerialNumber(const QString &serialNumber)
|
||||
void AndroidDeployQtStep::run(QFutureInterface<bool> &fi)
|
||||
{
|
||||
if (!m_avdName.isEmpty()) {
|
||||
QString serialNumber = AndroidConfigurations::currentConfig().waitForAvd(m_avdName, fi);
|
||||
QString serialNumber = AndroidAvdManager().waitForAvd(m_avdName, fi);
|
||||
if (serialNumber.isEmpty()) {
|
||||
reportRunResult(fi, false);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user