forked from qt-creator/qt-creator
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:
@@ -684,6 +684,8 @@ QVector<AndroidDeviceInfo> AndroidConfig::androidVirtualDevicesImpl(const FileNa
|
|||||||
avds.removeFirst(); // remove the daemon logs
|
avds.removeFirst(); // remove the daemon logs
|
||||||
avds.removeFirst(); // remove "List of devices attached" header line
|
avds.removeFirst(); // remove "List of devices attached" header line
|
||||||
|
|
||||||
|
bool nextLineIsTargetLine = false;
|
||||||
|
|
||||||
AndroidDeviceInfo dev;
|
AndroidDeviceInfo dev;
|
||||||
for (int i = 0; i < avds.size(); i++) {
|
for (int i = 0; i < avds.size(); i++) {
|
||||||
QString line = QLatin1String(avds.at(i));
|
QString line = QLatin1String(avds.at(i));
|
||||||
@@ -701,7 +703,15 @@ QVector<AndroidDeviceInfo> AndroidConfig::androidVirtualDevicesImpl(const FileNa
|
|||||||
line = QLatin1String(avds[i]);
|
line = QLatin1String(avds[i]);
|
||||||
if (line.contains(QLatin1String("---------")))
|
if (line.contains(QLatin1String("---------")))
|
||||||
break;
|
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(' '));
|
int lastIndex = line.lastIndexOf(QLatin1Char(' '));
|
||||||
if (lastIndex == -1) // skip line
|
if (lastIndex == -1) // skip line
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user