Android: Show Google AVDs

They work too, we just need to parse which api level they have.

Change-Id: I8f9da57f738d142a849ca41cb678bed6abaefd17
Task-number: QTCREATORBUG-13980
Reviewed-by: BogDan Vatra <bogdan@kde.org>
This commit is contained in:
Daniel Teske
2015-04-10 15:13:25 +02:00
parent 87922f58fe
commit 513239bc61

View File

@@ -684,6 +684,8 @@ QVector<AndroidDeviceInfo> AndroidConfig::androidVirtualDevicesImpl(const FileNa
avds.removeFirst(); // remove the daemon logs
avds.removeFirst(); // remove "List of devices attached" header line
bool nextLineIsTargetLine = false;
AndroidDeviceInfo dev;
for (int i = 0; i < avds.size(); i++) {
QString line = QLatin1String(avds.at(i));
@@ -701,7 +703,15 @@ QVector<AndroidDeviceInfo> AndroidConfig::androidVirtualDevicesImpl(const FileNa
line = QLatin1String(avds[i]);
if (line.contains(QLatin1String("---------")))
break;
if (line.contains(QLatin1String("Target:"))) {
if (line.contains(QLatin1String("Target:")) || nextLineIsTargetLine) {
if (line.contains(QLatin1String("Google APIs"))) {
nextLineIsTargetLine = true;
continue;
}
nextLineIsTargetLine = false;
int lastIndex = line.lastIndexOf(QLatin1Char(' '));
if (lastIndex == -1) // skip line
break;