Android: Do not instantiate the DeviceManager in initialize().

It is not guaranteed that all device creation factories have been set up
at that point, meaning that some devices will not be loaded from the
settings.

Change-Id: Ibce0e6c125980b1807efca4ce97693f9af7ab79a
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
Christian Kandeler
2012-09-06 12:07:29 +02:00
committed by Tobias Hunger
parent 889f16c345
commit 87529e30e3

View File

@@ -71,14 +71,15 @@ bool AndroidPlugin::initialize(const QStringList &arguments, QString *errorMessa
addAutoReleasedObject(new Internal::AndroidToolChainFactory);
addAutoReleasedObject(new Internal::AndroidDeployConfigurationFactory);
addAutoReleasedObject(new Internal::AndroidDeviceFactory);
ProjectExplorer::DeviceManager *dm = ProjectExplorer::DeviceManager::instance();
if (dm->find(Core::Id(Constants::ANDROID_DEVICE_ID)).isNull())
dm->addDevice(ProjectExplorer::IDevice::Ptr(new Internal::AndroidDevice));
return true;
}
void AndroidPlugin::extensionsInitialized()
{ }
{
ProjectExplorer::DeviceManager *dm = ProjectExplorer::DeviceManager::instance();
if (dm->find(Core::Id(Constants::ANDROID_DEVICE_ID)).isNull())
dm->addDevice(ProjectExplorer::IDevice::Ptr(new Internal::AndroidDevice));
}
} // namespace Android