Refactor license management

revert-dabc3590
manoj 10 years ago
parent 7cbf71ddd7
commit dcac237380

@ -133,7 +133,8 @@ public class Device {
@GET @GET
@Path("/license") @Path("/license")
@Produces("text/plain") @Produces("text/plain")
public String getLicense() { public String getLicense() throws AndroidAgentException{
License license = null; License license = null;
try { try {
try { try {
@ -141,10 +142,12 @@ public class Device {
.MobileDeviceTypes .MobileDeviceTypes
.MOBILE_DEVICE_TYPE_ANDROID, DeviceManagementConstants.LanguageCodes.LANGUAGE_CODE_ENGLISH_US); .MOBILE_DEVICE_TYPE_ANDROID, DeviceManagementConstants.LanguageCodes.LANGUAGE_CODE_ENGLISH_US);
} catch (LicenseManagementException e) { } catch (LicenseManagementException e) {
e.printStackTrace(); String errorMsg = "License management service error";
throw new AndroidAgentException(errorMsg, e);
} }
}catch(DeviceManagementServiceException deviceMgtEx){ }catch(DeviceManagementServiceException deviceMgtEx){
deviceMgtEx.printStackTrace(); String errorMsg = "Device management service error";
throw new AndroidAgentException(errorMsg, deviceMgtEx);
} }
return license.getLicenseText(); return license.getLicenseText();
} }

Loading…
Cancel
Save