forked from qt-creator/qt-creator
Android: switch qmlpreview to use new Android Device mechanism
Amends261a39cbbd
, after switching Android plugin to use new device selection mechanism in96255208a5
. Change-Id: I7b2dd1950055f3e6f1a449778f44d57c0c0a8758 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
committed by
Alessandro Portale
parent
261a39cbbd
commit
2695bcb167
@@ -31,12 +31,16 @@
|
||||
#include "androidqmlpreviewworker.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
|
||||
#include <projectexplorer/buildsystem.h>
|
||||
#include <projectexplorer/devicesupport/devicemanager.h>
|
||||
#include <projectexplorer/kit.h>
|
||||
#include <projectexplorer/project.h>
|
||||
#include <projectexplorer/target.h>
|
||||
|
||||
#include <qmlprojectmanager/qmlprojectconstants.h>
|
||||
#include <qmlprojectmanager/qmlprojectmanagerconstants.h>
|
||||
|
||||
#include <qtsupport/baseqtversion.h>
|
||||
#include <qtsupport/qtkitinformation.h>
|
||||
|
||||
@@ -258,10 +262,11 @@ bool AndroidQmlPreviewWorker::ensureAvdIsRunning()
|
||||
|
||||
if (!avdMan.isAvdBooted(devSN)) {
|
||||
m_devInfo = {};
|
||||
int minTargetApi = AndroidManager::minimumSDK(m_rc->target());
|
||||
AndroidDeviceInfo devInfoLocal = AndroidConfigurations::showDeviceDialog(m_rc->project(),
|
||||
minTargetApi,
|
||||
apkInfo()->abis);
|
||||
int minTargetApi = AndroidManager::minimumSDK(m_rc->target()->kit());
|
||||
using namespace ProjectExplorer;
|
||||
const IDevice *dev = DeviceKitAspect::device(m_rc->target()->kit()).data();
|
||||
AndroidDeviceInfo devInfoLocal = AndroidDevice::androidDeviceInfoFromIDevice(dev);
|
||||
|
||||
if (devInfoLocal.isValid()) {
|
||||
if (devInfoLocal.type == AndroidDeviceInfo::Emulator) {
|
||||
appendMessage(tr("Launching AVD."), NormalMessageFormat);
|
||||
|
Reference in New Issue
Block a user