use of com.android.sdklib.devices.DeviceManager in project android by JetBrains.
the class ConfigurationManager method getDevices.
/** Returns the list of available devices for the current platform, if any */
@NotNull
public List<Device> getDevices() {
if (myDevices == null || myDevices.isEmpty()) {
List<Device> devices = null;
AndroidPlatform platform = AndroidPlatform.getInstance(myModule);
if (platform != null) {
final AndroidSdkData sdkData = platform.getSdkData();
devices = new ArrayList<Device>();
DeviceManager deviceManager = sdkData.getDeviceManager();
devices.addAll(deviceManager.getDevices(EnumSet.of(DeviceManager.DeviceFilter.DEFAULT, DeviceManager.DeviceFilter.VENDOR)));
devices.addAll(myUserDeviceManager.parseUserDevices(new MessageBuildingSdkLog()));
}
if (devices == null) {
myDevices = Collections.emptyList();
} else {
myDevices = devices;
}
}
return myDevices;
}
Aggregations