Android: Search for a suitable emulator before starting a new avd

Note, that we don't know the names of the started avds, so we look
for a avd that has the same abi and apiLevel.

Task-number: QTCREATORBUG-10411
Change-Id: I5f6ff3ee0dddcf2bb8fca981ccedf437e32da677
Reviewed-by: BogDan Vatra <bogdan@kde.org>
This commit is contained in:
Daniel Teske
2013-10-17 17:40:56 +02:00
parent 3e789de36d
commit 04ea1898b5
4 changed files with 21 additions and 3 deletions

View File

@@ -389,7 +389,8 @@ void AndroidDeployStep::deployFiles(QProcess *process, const QList<DeployItem> &
bool AndroidDeployStep::deployPackage()
{
if (!m_avdName.isEmpty()) {
if (!AndroidConfigurations::instance().startAVDAsync(m_avdName))
if (!AndroidConfigurations::instance().findAvd(m_deviceAPILevel, m_targetArch)
&& !AndroidConfigurations::instance().startAVDAsync(m_avdName))
return false;
m_deviceSerialNumber = AndroidConfigurations::instance().waitForAvd(m_deviceAPILevel, m_targetArch);
}