Android virtual devices: Fix starting a avd

This cleans up various bits of the avd support in Creator.
- Adds a abi combobox to the create avd dialog.
- Moves the startAvd code into a separate thread, so that
  starting a avd while deploying doesn't block creator anymore.
- Implements a better waitForAvd function that works even
  if a emulator is already running and accurately can
  detect that it has finished booting.

Note: There are still many problems in the avd support in creator.
- The "clean libs on device" and "install qasi" functionality block
  the gui thread if they are run on a avd.
- If no avd exists and no suitable hardware is attached, the user gets
  a create Avd dialog, which doesn't tell him why he needs to create a
  avd. That information is hidden in the compile output.

Still this fixes the main use case of hitting run on a newly created
project with no actual device attached.

Change-Id: I76b3fdb1bdf3eadac07f82ad7d145ce6af453326
Reviewed-by: BogDan Vatra <bogdan@kde.org>
This commit is contained in:
Daniel Teske
2013-07-05 18:54:42 +02:00
parent 14d05eade8
commit 480f7c09fc
6 changed files with 168 additions and 93 deletions

View File

@@ -75,7 +75,7 @@ QVariant AvdModel::data(const QModelIndex &index, int role) const
case 1:
return QString::fromLatin1("API %1").arg(m_list[index.row()].sdk);
case 2:
return m_list[index.row()].cpuAbi;
return m_list[index.row()].cpuAbi.first();
}
return QVariant();
}
@@ -401,8 +401,7 @@ void AndroidSettingsWidget::removeAVD()
void AndroidSettingsWidget::startAVD()
{
int tempApiLevel = -1;
AndroidConfigurations::instance().startAVD(&tempApiLevel, m_AVDModel.avdName(m_ui->AVDTableView->currentIndex()));
AndroidConfigurations::instance().startAVDAsync(m_AVDModel.avdName(m_ui->AVDTableView->currentIndex()));
}
void AndroidSettingsWidget::avdActivated(QModelIndex index)