use of com.android.sdklib.repository.targets.SystemImage in project android by JetBrains.
the class AndroidVirtualDevice method getSystemImageDescription.
private SystemImageDescription getSystemImageDescription(AndroidSdkHandler sdkHandler) throws WizardException {
StudioLoggerProgressIndicator progress = new StudioLoggerProgressIndicator(getClass());
Collection<SystemImage> systemImages = sdkHandler.getSystemImageManager(progress).lookup(ID_ADDON_GOOGLE_API_IMG, myLatestVersion, ID_VENDOR_GOOGLE);
if (systemImages.isEmpty()) {
throw new WizardException("Missing system image required for an AVD setup");
}
return new SystemImageDescription(systemImages.iterator().next());
}
use of com.android.sdklib.repository.targets.SystemImage in project android by JetBrains.
the class AvdManagerConnection method getSystemImageUpdates.
/**
* The qemu2 emulator has changes in the system images for platform 22 and 23 (Intel CPU architecture only).
* This method will generate package updates if we detect that we have outdated system images for platform
* 22 and 23. We also check the addon system images which includes the Google API.
* @return a list of package paths that need to be updated.
*/
@NotNull
public List<String> getSystemImageUpdates() {
List<String> requested = Lists.newArrayList();
SystemImageUpdateDependency[] dependencies = getSystemImageUpdateDependencies();
if (dependencies == null) {
return requested;
}
assert mySdkHandler != null;
for (SystemImage systemImage : mySdkHandler.getSystemImageManager(REPO_LOG).getImages()) {
for (SystemImageUpdateDependency dependency : dependencies) {
if (dependency.updateRequired(systemImage)) {
requested.add(systemImage.getPackage().getPath());
break;
}
}
}
return requested;
}
Aggregations