fixed default license issue

revert-dabc3590
hasuniea 9 years ago
parent cd759d9c12
commit 75d35dadca

@ -57,11 +57,13 @@ public class AndroidDeviceManager implements DeviceManager {
public AndroidDeviceManager() { public AndroidDeviceManager() {
this.daoFactory = new AndroidDAOFactory(); this.daoFactory = new AndroidDAOFactory();
this.licenseManager = new RegistryBasedLicenseManager(); this.licenseManager = new RegistryBasedLicenseManager();
License defaultLicense;
License defaultLicense = AndroidPluginUtils.getDefaultLicense();
try { try {
licenseManager if (licenseManager.getLicense(AndroidDeviceManagementService.DEVICE_TYPE_ANDROID, "en_US") == null) {
.addLicense(AndroidDeviceManagementService.DEVICE_TYPE_ANDROID, defaultLicense); defaultLicense = AndroidPluginUtils.getDefaultLicense();
licenseManager.addLicense(AndroidDeviceManagementService.DEVICE_TYPE_ANDROID, defaultLicense);
}
featureManager.addSupportedFeaturesToDB(); featureManager.addSupportedFeaturesToDB();
} catch (LicenseManagementException e) { } catch (LicenseManagementException e) {
log.error("Error occurred while adding default license for Android devices", e); log.error("Error occurred while adding default license for Android devices", e);

@ -61,7 +61,9 @@ public class WindowsDeviceManager implements DeviceManager {
License defaultLicense = WindowsPluginUtils.getDefaultLicense(); License defaultLicense = WindowsPluginUtils.getDefaultLicense();
try { try {
if (licenseManager.getLicense(WindowsDeviceManagementService.DEVICE_TYPE_WINDOWS, "en_US") == null) {
licenseManager.addLicense(WindowsDeviceManagementService.DEVICE_TYPE_WINDOWS, defaultLicense); licenseManager.addLicense(WindowsDeviceManagementService.DEVICE_TYPE_WINDOWS, defaultLicense);
}
featureManager.addSupportedFeaturesToDB(); featureManager.addSupportedFeaturesToDB();
} catch (LicenseManagementException e) { } catch (LicenseManagementException e) {
log.error("Error occurred while adding default license for Windows devices", e); log.error("Error occurred while adding default license for Windows devices", e);

Loading…
Cancel
Save