forked from qt-creator/qt-creator
Android: Get rid of the avd info fields in AndroidDeviceInfo
The AVD specific fields don't need to be carried out by QtC settings, these can be read from the AVD's config file when they are needed. This also is good because those values can change at any time, either manually or by some other IDE like Android Studio, and thus we don't really need to manage them ourselves. The fields in question are: skin name, target name, sdcard size, openGL status. Change-Id: I86163500ec2fed035e32ec02ed17e182778db4a7 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -753,28 +753,6 @@ QString AndroidConfig::getAvdName(const QString &serialnumber)
|
||||
return QString::fromLatin1(name).trimmed();
|
||||
}
|
||||
|
||||
AndroidConfig::OpenGl AndroidConfig::getOpenGLEnabled(const QString &emulator) const
|
||||
{
|
||||
QDir dir = QDir::home();
|
||||
if (!dir.cd(QLatin1String(".android")))
|
||||
return OpenGl::Unknown;
|
||||
if (!dir.cd(QLatin1String("avd")))
|
||||
return OpenGl::Unknown;
|
||||
if (!dir.cd(emulator + QLatin1String(".avd")))
|
||||
return OpenGl::Unknown;
|
||||
QFile file(dir.filePath(QLatin1String("config.ini")));
|
||||
if (!file.exists())
|
||||
return OpenGl::Unknown;
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
|
||||
return OpenGl::Unknown;
|
||||
while (!file.atEnd()) {
|
||||
QByteArray line = file.readLine();
|
||||
if (line.contains("hw.gpu.enabled") && line.contains("yes"))
|
||||
return OpenGl::Enabled;
|
||||
}
|
||||
return OpenGl::Disabled;
|
||||
}
|
||||
|
||||
//!
|
||||
//! \brief AndroidConfigurations::getProductModel
|
||||
//! \param device serial number
|
||||
|
@@ -156,8 +156,6 @@ public:
|
||||
static QLatin1String displayName(const ProjectExplorer::Abi &abi);
|
||||
|
||||
QString getProductModel(const QString &device) const;
|
||||
enum class OpenGl { Enabled, Disabled, Unknown };
|
||||
OpenGl getOpenGLEnabled(const QString &emulator) const;
|
||||
bool isConnected(const QString &serialNumber) const;
|
||||
|
||||
bool isCmdlineSdkToolsInstalled() const;
|
||||
|
@@ -99,11 +99,8 @@ const char SdkLocation[] = "SdkLocation"; // FileName
|
||||
const Utils::Id AndroidSerialNumber = "AndroidSerialNumber";
|
||||
const Utils::Id AndroidAvdName = "AndroidAvdName";
|
||||
const Utils::Id AndroidCpuAbi = "AndroidCpuAbi";
|
||||
const Utils::Id AndroidAvdTarget = "AndroidAvdTarget";
|
||||
const Utils::Id AndroidAvdDevice = "AndroidAvdDevice";
|
||||
const Utils::Id AndroidAvdSkin = "AndroidAvdSkin";
|
||||
const Utils::Id AndroidAvdSdcard = "AndroidAvdSdcard";
|
||||
const Utils::Id AndroidSdk = "AndroidSdk";
|
||||
const Utils::Id AndroidAvdPath = "AndroidAvdPath";
|
||||
|
||||
} // namespace Constants;
|
||||
} // namespace Android
|
||||
|
@@ -58,6 +58,7 @@
|
||||
#include <utils/qtcprocess.h>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
using namespace Utils;
|
||||
|
||||
namespace {
|
||||
static Q_LOGGING_CATEGORY(androidDeviceLog, "qtc.android.androiddevice", QtWarningMsg)
|
||||
@@ -116,7 +117,7 @@ AndroidDeviceWidget::AndroidDeviceWidget(const IDevice::Ptr &device)
|
||||
formLayout->addRow(AndroidDevice::tr("Android target flavor:"), new QLabel(targetName));
|
||||
formLayout->addRow(AndroidDevice::tr("SD card size:"), new QLabel(dev->sdcardSize()));
|
||||
formLayout->addRow(AndroidDevice::tr("Skin type:"), new QLabel(dev->skinName()));
|
||||
const QString openGlStatus = dev->openGlStatusString();
|
||||
const QString openGlStatus = dev->openGLStatus();
|
||||
formLayout->addRow(AndroidDevice::tr("OpenGL status:"), new QLabel(openGlStatus));
|
||||
}
|
||||
}
|
||||
@@ -160,7 +161,7 @@ AndroidDevice::AndroidDevice()
|
||||
setDefaultDisplayName(tr("Run on Android"));
|
||||
setDisplayType(tr("Android"));
|
||||
setMachineType(IDevice::Hardware);
|
||||
setOsType(Utils::OsTypeOtherUnix);
|
||||
setOsType(OsType::OsTypeOtherUnix);
|
||||
setDeviceState(DeviceConnected);
|
||||
|
||||
addDeviceAction({tr("Refresh"), [](const IDevice::Ptr &device, QWidget *parent) {
|
||||
@@ -215,6 +216,7 @@ void AndroidDevice::addEmulatorActionsIfNotFound()
|
||||
void AndroidDevice::fromMap(const QVariantMap &map)
|
||||
{
|
||||
IDevice::fromMap(map);
|
||||
initAvdSettings();
|
||||
// Add Actions for Emulator is not added already.
|
||||
// This is needed because actions for Emulators and physical devices are not the same.
|
||||
addEmulatorActionsIfNotFound();
|
||||
@@ -232,28 +234,14 @@ AndroidDeviceInfo AndroidDevice::androidDeviceInfoFromIDevice(const IDevice *dev
|
||||
info.avdname = dev->extraData(Constants::AndroidAvdName).toString();
|
||||
info.serialNumber = dev->extraData(Constants::AndroidSerialNumber).toString();
|
||||
info.cpuAbi = dev->extraData(Constants::AndroidCpuAbi).toStringList();
|
||||
info.avdTarget = dev->extraData(Constants::AndroidAvdTarget).toString();
|
||||
info.avdDevice = dev->extraData(Constants::AndroidAvdDevice).toString();
|
||||
info.avdSkin = dev->extraData(Constants::AndroidAvdSkin).toString();
|
||||
info.avdSdcardSize = dev->extraData(Constants::AndroidAvdSdcard).toString();
|
||||
const QString avdPath = dev->extraData(Constants::AndroidAvdPath).toString();
|
||||
info.avdPath = FilePath::fromUserInput(avdPath);
|
||||
info.sdk = dev->extraData(Constants::AndroidSdk).toInt();
|
||||
info.type = dev->machineType();
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
void AndroidDevice::setAndroidDeviceInfoExtras(IDevice *dev, const AndroidDeviceInfo &info)
|
||||
{
|
||||
dev->setExtraData(Constants::AndroidAvdName, info.avdname);
|
||||
dev->setExtraData(Constants::AndroidSerialNumber, info.serialNumber);
|
||||
dev->setExtraData(Constants::AndroidCpuAbi, info.cpuAbi);
|
||||
dev->setExtraData(Constants::AndroidAvdTarget, info.avdTarget);
|
||||
dev->setExtraData(Constants::AndroidAvdDevice, info.avdDevice);
|
||||
dev->setExtraData(Constants::AndroidAvdSkin, info.avdSkin);
|
||||
dev->setExtraData(Constants::AndroidAvdSdcard, info.avdSdcardSize);
|
||||
dev->setExtraData(Constants::AndroidSdk, info.sdk);
|
||||
}
|
||||
|
||||
QString AndroidDevice::displayNameFromInfo(const AndroidDeviceInfo &info)
|
||||
{
|
||||
return info.type == IDevice::Hardware
|
||||
@@ -261,15 +249,15 @@ QString AndroidDevice::displayNameFromInfo(const AndroidDeviceInfo &info)
|
||||
: info.avdname;
|
||||
}
|
||||
|
||||
Utils::Id AndroidDevice::idFromDeviceInfo(const AndroidDeviceInfo &info)
|
||||
Id AndroidDevice::idFromDeviceInfo(const AndroidDeviceInfo &info)
|
||||
{
|
||||
const QString id = (info.type == IDevice::Hardware ? info.serialNumber : info.avdname);
|
||||
return Utils::Id(Constants::ANDROID_DEVICE_ID).withSuffix(':' + id);
|
||||
return Id(Constants::ANDROID_DEVICE_ID).withSuffix(':' + id);
|
||||
}
|
||||
|
||||
Utils::Id AndroidDevice::idFromAvdInfo(const CreateAvdInfo &info)
|
||||
Id AndroidDevice::idFromAvdInfo(const CreateAvdInfo &info)
|
||||
{
|
||||
return Utils::Id(Constants::ANDROID_DEVICE_ID).withSuffix(':' + info.name);
|
||||
return Id(Constants::ANDROID_DEVICE_ID).withSuffix(':' + info.name);
|
||||
}
|
||||
|
||||
QStringList AndroidDevice::supportedAbis() const
|
||||
@@ -342,6 +330,17 @@ int AndroidDevice::sdkLevel() const
|
||||
return extraData(Constants::AndroidSdk).toInt();
|
||||
}
|
||||
|
||||
FilePath AndroidDevice::avdPath() const
|
||||
{
|
||||
return FilePath::fromUserInput(extraData(Constants::AndroidAvdPath).toString());
|
||||
}
|
||||
|
||||
void AndroidDevice::setAvdPath(const FilePath &path)
|
||||
{
|
||||
setExtraData(Constants::AndroidAvdPath, path.toUserOutput());
|
||||
initAvdSettings();
|
||||
}
|
||||
|
||||
QString AndroidDevice::androidVersion() const
|
||||
{
|
||||
return AndroidManager::androidNameForApiLevel(sdkLevel());
|
||||
@@ -350,46 +349,32 @@ QString AndroidDevice::androidVersion() const
|
||||
QString AndroidDevice::deviceTypeName() const
|
||||
{
|
||||
if (machineType() == Emulator)
|
||||
return tr("Emulator for ") + extraData(Constants::AndroidAvdDevice).toString();
|
||||
return tr("Emulator for \"%1\"").arg(avdSettings()->value("hw.device.name").toString());
|
||||
return tr("Physical device");
|
||||
}
|
||||
|
||||
QString AndroidDevice::skinName() const
|
||||
{
|
||||
const QString skin = extraData(Constants::AndroidAvdSkin).toString();
|
||||
const QString skin = avdSettings()->value("skin.name").toString();
|
||||
return skin.isEmpty() ? tr("None") : skin;
|
||||
}
|
||||
|
||||
QString AndroidDevice::androidTargetName() const
|
||||
{
|
||||
const QString target = extraData(Constants::AndroidAvdTarget).toString();
|
||||
const QString target = avdSettings()->value("tag.display").toString();
|
||||
return target.isEmpty() ? tr("Unknown") : target;
|
||||
}
|
||||
|
||||
QString AndroidDevice::sdcardSize() const
|
||||
{
|
||||
const QString size = extraData(Constants::AndroidAvdSdcard).toString();
|
||||
const QString size = avdSettings()->value("sdcard.size").toString();
|
||||
return size.isEmpty() ? tr("Unknown") : size;
|
||||
}
|
||||
|
||||
AndroidConfig::OpenGl AndroidDevice::openGlStatus() const
|
||||
QString AndroidDevice::openGLStatus() const
|
||||
{
|
||||
return AndroidConfigurations::currentConfig().getOpenGLEnabled(displayName());
|
||||
}
|
||||
|
||||
QString AndroidDevice::openGlStatusString() const
|
||||
{
|
||||
const AndroidConfig::OpenGl glStatus = AndroidConfigurations::currentConfig()
|
||||
.getOpenGLEnabled(displayName());
|
||||
switch (glStatus) {
|
||||
case (AndroidConfig::OpenGl::Enabled):
|
||||
return tr("Enabled");
|
||||
case (AndroidConfig::OpenGl::Disabled):
|
||||
return tr("Disabled");
|
||||
case (AndroidConfig::OpenGl::Unknown):
|
||||
return tr("Unknown");
|
||||
}
|
||||
return tr("Unknown");
|
||||
const QString openGL = avdSettings()->value("hw.gpu.enabled").toString();
|
||||
return openGL.isEmpty() ? tr("Unknown") : openGL;
|
||||
}
|
||||
|
||||
IDevice::DeviceInfo AndroidDevice::deviceInformation() const
|
||||
@@ -420,6 +405,17 @@ QUrl AndroidDevice::toolControlChannel(const ControlChannelHint &) const
|
||||
return url;
|
||||
}
|
||||
|
||||
QSettings *AndroidDevice::avdSettings() const
|
||||
{
|
||||
return m_avdSettings.get();
|
||||
}
|
||||
|
||||
void AndroidDevice::initAvdSettings()
|
||||
{
|
||||
const FilePath configPath = avdPath().resolvePath(QStringLiteral("config.ini"));
|
||||
m_avdSettings.reset(new QSettings(configPath.toUserOutput(), QSettings::IniFormat));
|
||||
}
|
||||
|
||||
void AndroidDeviceManager::updateAvdsList()
|
||||
{
|
||||
if (!m_avdsFutureWatcher.isRunning() && m_androidConfig.adbToolPath().exists())
|
||||
@@ -621,27 +617,26 @@ void AndroidDeviceManager::HandleAvdsListChange()
|
||||
{
|
||||
DeviceManager *const devMgr = DeviceManager::instance();
|
||||
|
||||
QVector<IDevice::ConstPtr> existingAvds;
|
||||
QVector<Id> existingAvds;
|
||||
for (int i = 0; i < devMgr->deviceCount(); ++i) {
|
||||
const IDevice::ConstPtr dev = devMgr->deviceAt(i);
|
||||
const bool isEmulator = dev->machineType() == IDevice::Emulator;
|
||||
if (isEmulator && dev->type() == Constants::ANDROID_DEVICE_TYPE)
|
||||
existingAvds.append(dev);
|
||||
existingAvds.append(dev->id());
|
||||
}
|
||||
|
||||
QVector<IDevice::ConstPtr> connectedDevs;
|
||||
QVector<Id> connectedDevs;
|
||||
for (auto item : m_avdsFutureWatcher.result()) {
|
||||
const Utils::Id deviceId = AndroidDevice::idFromDeviceInfo(item);
|
||||
const QString displayName = AndroidDevice::displayNameFromInfo(item);
|
||||
IDevice::ConstPtr dev = devMgr->find(deviceId);
|
||||
if (!dev.isNull()) {
|
||||
const auto androidDev = static_cast<const AndroidDevice *>(dev.data());
|
||||
// DeviceManager doens't seem to hav a way to directly update the name, if the name
|
||||
// DeviceManager doens't seem to have a way to directly update the name, if the name
|
||||
// of the device has changed, remove it and register it again with the new name.
|
||||
// Also account for the case of an AVD registered through old QC which might have
|
||||
// invalid data by checking the sdcard size value.
|
||||
if (dev->displayName() != displayName
|
||||
|| androidDev->sdcardSize() == AndroidDevice::tr("Unknown")) {
|
||||
// invalid data by checking if the avdPath is not empty.
|
||||
if (dev->displayName() != displayName || androidDev->avdPath().toString().isEmpty()) {
|
||||
devMgr->removeDevice(dev->id());
|
||||
} else {
|
||||
// Find the state of the AVD retrieved from the AVD watcher
|
||||
@@ -652,7 +647,7 @@ void AndroidDeviceManager::HandleAvdsListChange()
|
||||
qCDebug(androidDeviceLog, "Device id \"%s\" changed its state.",
|
||||
dev->id().toString().toUtf8().data());
|
||||
}
|
||||
connectedDevs.append(dev);
|
||||
connectedDevs.append(dev->id());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -662,20 +657,26 @@ void AndroidDeviceManager::HandleAvdsListChange()
|
||||
newDev->setDisplayName(displayName);
|
||||
newDev->setMachineType(item.type);
|
||||
newDev->setDeviceState(item.state);
|
||||
AndroidDevice::setAndroidDeviceInfoExtras(newDev, item);
|
||||
|
||||
newDev->setExtraData(Constants::AndroidAvdName, item.avdname);
|
||||
newDev->setExtraData(Constants::AndroidSerialNumber, item.serialNumber);
|
||||
newDev->setExtraData(Constants::AndroidCpuAbi, item.cpuAbi);
|
||||
newDev->setExtraData(Constants::AndroidSdk, item.sdk);
|
||||
newDev->setAvdPath(item.avdPath);
|
||||
|
||||
qCDebug(androidDeviceLog, "Registering new Android device id \"%s\".",
|
||||
newDev->id().toString().toUtf8().data());
|
||||
const IDevice::ConstPtr constNewDev = IDevice::ConstPtr(newDev);
|
||||
devMgr->addDevice(IDevice::ConstPtr(constNewDev));
|
||||
connectedDevs.append(constNewDev);
|
||||
connectedDevs.append(constNewDev->id());
|
||||
}
|
||||
|
||||
// Set devices no longer connected to disconnected state.
|
||||
for (const IDevice::ConstPtr &dev : existingAvds) {
|
||||
if (!connectedDevs.contains(dev)) {
|
||||
for (const Id &id : existingAvds) {
|
||||
if (!connectedDevs.contains(id)) {
|
||||
qCDebug(androidDeviceLog, "Removing AVD id \"%s\" because it no longer exists.",
|
||||
dev->id().toString().toUtf8().data());
|
||||
devMgr->removeDevice(dev->id());
|
||||
}
|
||||
id.toString().toUtf8().data());
|
||||
devMgr->removeDevice(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -35,6 +35,7 @@
|
||||
|
||||
#include <QFutureWatcher>
|
||||
#include <QFileSystemWatcher>
|
||||
#include <QSettings>
|
||||
|
||||
namespace Utils { class QtcProcess; }
|
||||
|
||||
@@ -50,7 +51,6 @@ public:
|
||||
|
||||
static IDevice::Ptr create();
|
||||
static AndroidDeviceInfo androidDeviceInfoFromIDevice(const IDevice *dev);
|
||||
static void setAndroidDeviceInfoExtras(IDevice *dev, const AndroidDeviceInfo &info);
|
||||
|
||||
static QString displayNameFromInfo(const AndroidDeviceInfo &info);
|
||||
static Utils::Id idFromDeviceInfo(const AndroidDeviceInfo &info);
|
||||
@@ -66,14 +66,17 @@ public:
|
||||
QString avdName() const;
|
||||
int sdkLevel() const;
|
||||
|
||||
Utils::FilePath avdPath() const;
|
||||
void setAvdPath(const Utils::FilePath &path);
|
||||
|
||||
QString deviceTypeName() const;
|
||||
QString androidVersion() const;
|
||||
|
||||
// AVD specific
|
||||
QString skinName() const;
|
||||
QString androidTargetName() const;
|
||||
QString sdcardSize() const;
|
||||
QString openGlStatusString() const;
|
||||
// TODO: remove not used
|
||||
AndroidConfig::OpenGl openGlStatus() const;
|
||||
QString openGLStatus() const;
|
||||
|
||||
protected:
|
||||
void fromMap(const QVariantMap &map) final;
|
||||
@@ -85,6 +88,11 @@ private:
|
||||
bool canAutoDetectPorts() const override;
|
||||
ProjectExplorer::DeviceProcessSignalOperation::Ptr signalOperation() const override;
|
||||
QUrl toolControlChannel(const ControlChannelHint &) const override;
|
||||
|
||||
QSettings *avdSettings() const;
|
||||
void initAvdSettings();
|
||||
|
||||
std::unique_ptr<QSettings> m_avdSettings;
|
||||
};
|
||||
|
||||
class AndroidDeviceFactory final : public ProjectExplorer::IDeviceFactory
|
||||
|
@@ -54,10 +54,9 @@ bool AndroidDeviceInfo::operator<(const AndroidDeviceInfo &other) const
|
||||
|
||||
bool AndroidDeviceInfo::operator==(const AndroidDeviceInfo &other) const
|
||||
{
|
||||
return serialNumber == other.serialNumber && avdname == other.avdname && cpuAbi == other.cpuAbi
|
||||
&& avdTarget == other.avdTarget && avdDevice == other.avdDevice
|
||||
&& avdSkin == other.avdSkin && avdSdcardSize == other.avdSdcardSize && sdk == other.sdk
|
||||
&& state == other.state && type == other.type;
|
||||
return serialNumber == other.serialNumber && avdname == other.avdname
|
||||
&& avdPath == other.avdPath && cpuAbi == other.cpuAbi
|
||||
&& sdk == other.sdk && state == other.state && type == other.type;
|
||||
}
|
||||
|
||||
QDebug &operator<<(QDebug &stream, const AndroidDeviceInfo &device)
|
||||
|
@@ -42,13 +42,10 @@ public:
|
||||
QString serialNumber;
|
||||
QString avdname;
|
||||
QStringList cpuAbi;
|
||||
QString avdTarget;
|
||||
QString avdDevice;
|
||||
QString avdSkin;
|
||||
QString avdSdcardSize;
|
||||
int sdk = -1;
|
||||
IDevice::DeviceState state = IDevice::DeviceDisconnected;
|
||||
IDevice::MachineType type = IDevice::Emulator;
|
||||
Utils::FilePath avdPath;
|
||||
|
||||
static QStringList adbSelector(const QString &serialNumber);
|
||||
|
||||
|
@@ -145,10 +145,6 @@ ProjectExplorer::IDevice::Ptr AvdDialog::device() const
|
||||
dev->setExtraData(Constants::AndroidAvdName, m_createdAvdInfo.name);
|
||||
dev->setExtraData(Constants::AndroidCpuAbi, {m_createdAvdInfo.abi});
|
||||
dev->setExtraData(Constants::AndroidSdk, m_createdAvdInfo.systemImage->apiLevel());
|
||||
dev->setExtraData(Constants::AndroidAvdSdcard, QString("%1 MB")
|
||||
.arg(m_createdAvdInfo.sdcardSize));
|
||||
dev->setExtraData(Constants::AndroidAvdDevice, m_createdAvdInfo.deviceDefinition);
|
||||
|
||||
return IDevice::Ptr(dev);
|
||||
}
|
||||
|
||||
|
@@ -46,10 +46,6 @@ const char avdInfoPathKey[] = "Path:";
|
||||
const char avdInfoAbiKey[] = "abi.type";
|
||||
const char avdInfoTargetKey[] = "target";
|
||||
const char avdInfoErrorKey[] = "Error:";
|
||||
const char avdInfoSdcardKey[] = "Sdcard";
|
||||
const char avdInfoTargetTypeKey[] = "Target";
|
||||
const char avdInfoDeviceKey[] = "Device";
|
||||
const char avdInfoSkinKey[] = "Skin";
|
||||
|
||||
namespace Android {
|
||||
namespace Internal {
|
||||
@@ -81,6 +77,7 @@ static Utils::optional<AndroidDeviceInfo> parseAvd(const QStringList &deviceInfo
|
||||
avd.avdname = value;
|
||||
} else if (valueForKey(avdInfoPathKey, line, &value)) {
|
||||
const Utils::FilePath avdPath = Utils::FilePath::fromUserInput(value);
|
||||
avd.avdPath = avdPath;
|
||||
if (avdPath.exists()) {
|
||||
// Get ABI.
|
||||
const Utils::FilePath configFile = avdPath.pathAppended("config.ini");
|
||||
@@ -103,14 +100,6 @@ static Utils::optional<AndroidDeviceInfo> parseAvd(const QStringList &deviceInfo
|
||||
qCDebug(avdOutputParserLog)
|
||||
<< "Avd Parsing: Cannot find sdk API:" << avdInfoFile.toString();
|
||||
}
|
||||
} else if (valueForKey(avdInfoDeviceKey, line, &value)) {
|
||||
avd.avdDevice = value.remove(0, 2);
|
||||
} else if (valueForKey(avdInfoTargetTypeKey, line, &value)) {
|
||||
avd.avdTarget = value.remove(0, 2);
|
||||
} else if (valueForKey(avdInfoSkinKey, line, &value)) {
|
||||
avd.avdSkin = value.remove(0, 2);
|
||||
} else if (valueForKey(avdInfoSdcardKey, line, &value)) {
|
||||
avd.avdSdcardSize = value.remove(0, 2);
|
||||
}
|
||||
}
|
||||
if (avd != AndroidDeviceInfo())
|
||||
|
@@ -58,13 +58,10 @@ void tst_AvdManagerOutputParser::parse_data()
|
||||
<< AndroidDeviceInfoList({{"",
|
||||
"Test",
|
||||
{"x86"},
|
||||
"Google APIs (Google Inc.)",
|
||||
"Galaxy Nexus (Google)",
|
||||
"",
|
||||
"512 MB",
|
||||
-1,
|
||||
IDevice::DeviceConnected,
|
||||
IDevice::Emulator}})
|
||||
IDevice::Emulator,
|
||||
Utils::FilePath::fromString(":Test.avd")}})
|
||||
<< QStringList();
|
||||
|
||||
QTest::newRow("two") << "Available Android Virtual Devices:\n"
|
||||
@@ -84,23 +81,18 @@ void tst_AvdManagerOutputParser::parse_data()
|
||||
<< AndroidDeviceInfoList({{"",
|
||||
"Test",
|
||||
{"x86"},
|
||||
"Google APIs (Google Inc.)",
|
||||
"Galaxy Nexus (Google)",
|
||||
"",
|
||||
"512 MB",
|
||||
-1,
|
||||
IDevice::DeviceConnected,
|
||||
IDevice::Emulator},
|
||||
IDevice::Emulator,
|
||||
Utils::FilePath::fromString(":Test.avd")},
|
||||
{"",
|
||||
"TestTablet",
|
||||
{"x86"},
|
||||
"Google APIs (Google Inc.)",
|
||||
"7in WSVGA (Tablet) (Generic)",
|
||||
"",
|
||||
"256 MB",
|
||||
-1,
|
||||
IDevice::DeviceConnected,
|
||||
IDevice::Emulator}})
|
||||
IDevice::Emulator,
|
||||
Utils::FilePath::fromString(":TestTablet.avd")}}
|
||||
)
|
||||
<< QStringList();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user